diff --git a/atf-20231013-0ea67d76a/config.in b/atf-20231013-0ea67d76a/config.in deleted file mode 100644 index 3d1f35194..000000000 --- a/atf-20231013-0ea67d76a/config.in +++ /dev/null @@ -1,345 +0,0 @@ -mainmenu "ATF SDK configuration" -# -# ============================ MENU ============================== -# -menu "Platform" - choice CHIP - bool "Target Platforms" - config PLAT_MT7622 - bool "MT7622" - config PLAT_MT7629 - bool "MT7629" - config PLAT_MT7981 - bool "MT7981" - config PLAT_MT7986 - bool "MT7986" - config PLAT_MT7988 - bool "MT7988" - endchoice - config FPGA - bool "Build for FPGA emulation" - default n -endmenu - -menu "Target" - choice - bool "Target Images" - default TARGET_BL2 if !NEED_SBC - default TARGET_ALL_HAS_SEC_BOOT if NEED_SBC - config TARGET_BL2 - bool "BL2" - depends on !NEED_SBC - config TARGET_BL31 - bool "BL31" - depends on !NEED_SBC - config TARGET_FIP_NO_SEC_BOOT - bool "BL31 + FIP image without secure boot" - depends on !NEED_SBC - config TARGET_ALL_NO_SEC_BOOT - bool "BL2 + FIP image without secure boot" - depends on !NEED_SBC - config TARGET_ALL_HAS_SEC_BOOT - bool "BL2 + FIP image with secure boot" - depends on NEED_SBC - endchoice - config NEED_SBC - bool "Enable Secure Boot" - default n - choice FLASH_DEVICE - bool "Target Flash Devices" - default FLASH_DEVICE_SNFI_SNAND - config FLASH_DEVICE_SNFI_SNAND - bool "snfi-snand" - depends on MTK_SNFI_SUPPORT - help - spi-nand flash with snfi controller - config FLASH_DEVICE_SNOR - bool "snor" - depends on MTK_SNOR_SUPPORT - help - spi-nor flash with snor controller - config FLASH_DEVICE_SPIM_NAND - bool "spim-snand" - depends on MTK_SPIM_SUPPORT - help - spi-nand flash with spim controller - config FLASH_DEVICE_SPIM_NOR - bool "spim-snor" - depends on MTK_SPIM_SUPPORT - help - spi-nor flash with spim controller - config FLASH_DEVICE_EMMC - bool "emmc" - depends on MTK_SDMMC_SUPPORT - help - emmc device - config FLASH_DEVICE_SDMMC - bool "sdcard" - depends on MTK_SDMMC_SUPPORT - help - sd card device - config FLASH_DEVICE_RAM - bool "ram" - help - ram device - endchoice - config SNFI_SNAND_TYPE - string "nand flash type" - depends on FLASH_DEVICE_SNFI_SNAND - default 'hsm:2k+64' - config NMBM - bool "Enable NAND mapping block management" - depends on FLASH_DEVICE_SNFI_SNAND || FLASH_DEVICE_SPIM_NAND - default y if PLAT_MT7622 || PLAT_MT7629 || \ - PLAT_MT7981 || PLAT_MT7986 || PLAT_MT7988 - config SPIM_NAND_TYPE - string "nand flash type" - depends on FLASH_DEVICE_SPIM_NAND - default 'spim:2k+64' -endmenu - -menu "DRAM" - depends on !FPGA - choice DDR_TYPE - bool "DRAM type" - config DRAM_DDR3 - bool "DDR3" - depends on PLAT_MT7622 || \ - PLAT_MT7629 || \ - PLAT_MT7981 || \ - PLAT_MT7986 || \ - PLAT_MT7988 - config DRAM_DDR4 - bool "DDR4" - depends on PLAT_MT7981 || \ - PLAT_MT7986 || \ - PLAT_MT7988 - endchoice - choice BOARD_TYPE - bool "BOARD type" - config QFN - bool "QFN" - depends on PLAT_MT7981 && DRAM_DDR3 - config BGA - bool "BGA" - depends on PLAT_MT7981 - endchoice - config DRAM_DDR3_FLYBY - bool "Enable Fly-by topology (Uses 2x DDR3 chips)" - default n - depends on PLAT_MT7622 - choice DDR_SIZE - bool "DRAM size limitation" - default DRAM_SIZE_AUTO - depends on PLAT_MT7981 || \ - PLAT_MT7986 || \ - PLAT_MT7988 - config DRAM_SIZE_AUTO - bool "Auto detect" - depends on PLAT_MT7981 || \ - PLAT_MT7986 || \ - PLAT_MT7988 - config DRAM_SIZE_256 - bool "256MB" - depends on (PLAT_MT7981 && DRAM_DDR3) || \ - (PLAT_MT7986 && DRAM_DDR3) - config DRAM_SIZE_512 - bool "512MB" - depends on (PLAT_MT7981 && DRAM_DDR3) || \ - (PLAT_MT7986 && DRAM_DDR3) || \ - (PLAT_MT7981 && DRAM_DDR4) || \ - (PLAT_MT7986 && DRAM_DDR4) || \ - (PLAT_MT7988 && DRAM_DDR3) || \ - (PLAT_MT7988 && DRAM_DDR4) - config DRAM_SIZE_1024 - bool "1GB" - depends on (PLAT_MT7981 && DRAM_DDR4) || \ - (PLAT_MT7986 && DRAM_DDR4) || \ - (PLAT_MT7988 && DRAM_DDR4) - config DRAM_SIZE_2048 - bool "2GB" - depends on (PLAT_MT7986 && DRAM_DDR4) || \ - (PLAT_MT7988 && DRAM_DDR4) - endchoice - choice DDR3_FREQUENCY - bool "DDR3 frequency" - default DDR3_FREQ_2133 - depends on (PLAT_MT7981 && DRAM_DDR3) || \ - (PLAT_MT7988 && DRAM_DDR3) - config DDR3_FREQ_2133 - bool "DDR3 2133MHz" - depends on (PLAT_MT7981 && DRAM_DDR3) || \ - (PLAT_MT7988 && DRAM_DDR3) - config DDR3_FREQ_1866 - bool "DDR3 1866MHz" - depends on (PLAT_MT7981 && DRAM_DDR3) || \ - (PLAT_MT7988 && DRAM_DDR3) - endchoice - - choice DDR4_FREQUENCY - bool "DDR4 frequency" - default DDR4_FREQ_3200 - depends on (PLAT_MT7986 && DRAM_DDR4) || \ - (PLAT_MT7988 && DRAM_DDR4) - config DDR4_FREQ_3200 - bool "DDR4 3200MHz" - depends on (PLAT_MT7986 && DRAM_DDR4) || \ - (PLAT_MT7988 && DRAM_DDR4) - config DDR4_FREQ_2666 - bool "DDR4 2666MHz" - depends on (PLAT_MT7986 && DRAM_DDR4) || \ - (PLAT_MT7988 && DRAM_DDR4) - endchoice - - -endmenu - -menu "Log" - choice LOG_LEVEL - bool "Log level" - default LOG_LEVEL_NOTICE - config LOG_LEVEL_NONE - bool "NONE" - config LOG_LEVEL_ERROR - bool "ERROR" - config LOG_LEVEL_NOTICE - bool "NOTICE" - config LOG_LEVEL_WARNING - bool "WARNING" - config LOG_LEVEL_INFO - bool "INFO" - config LOG_LEVEL_VERBOSE - bool "VERBOSE" - endchoice - config DRAM_DEBUG_LOG - bool "Enable DRAM debug log" - default n -endmenu - - -# -# ============================ PLATFORM ============================== -# - -config PLAT - def_string "mt7622" if PLAT_MT7622 - def_string "mt7629" if PLAT_MT7629 - def_string "mt7981" if PLAT_MT7981 - def_string "mt7986" if PLAT_MT7986 - def_string "mt7988" if PLAT_MT7988 - -config AARCH64 - def_bool y if PLAT_MT7622 - def_bool n if PLAT_MT7629 - def_bool y if PLAT_MT7981 - def_bool y if PLAT_MT7986 - def_bool y if PLAT_MT7988 - -config AARCH32 - def_bool y if !AARCH64 - def_bool n if AARCH64 - -# -# ============================ TARGET ============================== -# - -config NEED_BL2 - def_bool y if TARGET_BL2 - def_bool y if TARGET_ALL_NO_SEC_BOOT - def_bool y if TARGET_ALL_HAS_SEC_BOOT - -config NEED_BL31 - def_bool y if TARGET_BL31 - def_bool y if TARGET_ALL_NO_SEC_BOOT - def_bool y if TARGET_ALL_HAS_SEC_BOOT - def_bool y if TARGET_FIP_NO_SEC_BOOT - -config NEED_BL33 - def_bool y if TARGET_ALL_NO_SEC_BOOT - def_bool y if TARGET_ALL_HAS_SEC_BOOT - def_bool y if TARGET_FIP_NO_SEC_BOOT - -config NEED_FIP - def_bool y if TARGET_ALL_NO_SEC_BOOT - def_bool y if TARGET_ALL_HAS_SEC_BOOT - def_bool y if TARGET_FIP_NO_SEC_BOOT - -config NEED_MBEDTLS - def_bool y if TARGET_ALL_HAS_SEC_BOOT - -if NEED_BL33 - config BL33 - string "Path to BL33 image" - default "./u-boot.bin" -endif - -MBEDTLS_FOUND := $(shell, ls | grep mbedtls-mbedtls- && echo -n "" || echo "0") -MBEDTLS_DEFAULT := $(shell, echo $(MBEDTLS_FOUND) | awk '{ print $NF }') - -if NEED_MBEDTLS - config MBEDTLS_DIR - string "Path to mbedtls library" - default $(MBEDTLS_DEFAULT) if $(MBEDTLS_FOUND)!=0 -endif - -if NEED_SBC - config ROT_KEY - string "Path to ROT_KEY" - default "fip_private_key.pem" - - config BROM_SIGN_KEY - string "Path to BROM_SIGN_KEY" - default "bl2_private_key.pem" -endif - -# -# ============================ TOOLCHAIN ============================== -# - -CC_1 := "/mtkoss/aarch64/7.5.0/x86_64/bin/aarch64-linux-gnu-gcc" -TEST_1 := $(shell, test -e $(CC_1) && echo "1" || echo "0") -CC_2 := "/usr/bin/aarch64-linux-gnu-gcc" -TEST_2 := $(shell, test -e $(CC_2) && echo "1" || echo "0") -CC_3 := "/usr/bin/arm-linux-gnueabi-gcc" -TEST_3 := $(shell, test -e $(CC_3) && echo "1" || echo "0") - -config CROSS_COMPILER - string "cross compile prefix" - default $(shell, echo $(CC_1) | sed 's/-gcc/-/g') if $(TEST_1)="1" && AARCH64 - default $(shell, echo $(CC_2) | sed 's/-gcc/-/g') if $(TEST_2)="1" && AARCH64 - default $(shell, echo $(CC_3) | sed 's/-gcc/-/g') if $(TEST_3)="1" && AARCH32 - -# -# ============================ FLASH ============================== -# - -config MTK_SPIM_SUPPORT - def_bool y if PLAT_MT7981 - def_bool y if PLAT_MT7986 - def_bool y if PLAT_MT7988 - -config MTK_SNOR_SUPPORT - def_bool y if PLAT_MT7622 - def_bool y if PLAT_MT7629 - -config MTK_SNFI_SUPPORT - def_bool y if PLAT_MT7622 - def_bool y if PLAT_MT7629 - def_bool y if PLAT_MT7981 - def_bool y if PLAT_MT7986 - def_bool y if PLAT_MT7988 - -config MTK_SDMMC_SUPPORT - def_bool y if PLAT_MT7622 - def_bool y if PLAT_MT7981 - def_bool y if PLAT_MT7986 - def_bool y if PLAT_MT7988 - -config BOOT_DEVICE - def_string "nor" if FLASH_DEVICE_SNOR - def_string "nor" if FLASH_DEVICE_SPIM_NOR - def_string "snand" if FLASH_DEVICE_SNFI_SNAND - def_string "spim-nand" if FLASH_DEVICE_SPIM_NAND - def_string "emmc" if FLASH_DEVICE_EMMC - def_string "sdmmc" if FLASH_DEVICE_SDMMC - def_string "ram" if FLASH_DEVICE_RAM diff --git a/atf-20231013-0ea67d76a/configs b/atf-20231013-0ea67d76a/configs deleted file mode 120000 index 6f9c15fcb..000000000 --- a/atf-20231013-0ea67d76a/configs +++ /dev/null @@ -1 +0,0 @@ -../atf-20220606-637ba581b/configs \ No newline at end of file diff --git a/atf-20231013-0ea67d76a/docs/perf/psci-performance-n1sdp.rst b/atf-20231013-0ea67d76a/docs/perf/psci-performance-n1sdp.rst deleted file mode 100644 index ae1b89b29..000000000 --- a/atf-20231013-0ea67d76a/docs/perf/psci-performance-n1sdp.rst +++ /dev/null @@ -1,202 +0,0 @@ -Runtime Instrumentation Testing - N1SDP -======================================= - -For this test we used the N1 System Development Platform (`N1SDP`_), which -contains an SoC consisting of two dual-core Arm N1 clusters. - -The following source trees and binaries were used: - -- TF-A [`v2.9-rc0-16-g666aec401`_] -- TFTF [`v2.9-rc0`_] -- SCP/MCP `Prebuilt Images`_ - -Please see the Runtime Instrumentation :ref:`Testing Methodology -` page for more details. - -Procedure ---------- - -#. Build TFTF with runtime instrumentation enabled: - - .. code:: shell - - make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ - TESTS=runtime-instrumentation all - -#. Build TF-A with the following build options: - - .. code:: shell - - make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ - ENABLE_RUNTIME_INSTRUMENTATION=1 fiptool all - -#. Fetch the SCP firmware images: - - .. code:: shell - - curl --fail --connect-timeout 5 --retry 5 \ - -sLS -o build/n1sdp/release/scp_rom.bin \ - https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-bl1.bin - curl --fail --connect-timeout 5 \ - --retry 5 -sLS -o build/n1sdp/release/scp_ram.bin \ - https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-bl2.bin - -#. Fetch the MCP firmware images: - - .. code:: shell - - curl --fail --connect-timeout 5 --retry 5 \ - -sLS -o build/n1sdp/release/mcp_rom.bin \ - https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-mcp-bl1.bin - curl --fail --connect-timeout 5 --retry 5 \ - -sLS -o build/n1sdp/release/mcp_ram.bin \ - https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-mcp-bl2.bin - -#. Using the fiptool, create a new FIP package and append the SCP ram image onto - it. - - .. code:: shell - - ./tools/fiptool/fiptool create --blob \ - uuid=cfacc2c4-15e8-4668-82be-430a38fad705,file=build/n1sdp/release/bl1.bin \ - --scp-fw build/n1sdp/release/scp_ram.bin build/n1sdp/release/scp_fw.bin - -#. Append the MCP image to the FIP. - - .. code:: shell - - ./tools/fiptool/fiptool create \ - --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file=build/n1sdp/release/mcp_ram.bin \ - build/n1sdp/release/mcp_fw.bin - -#. Then, add TFTF as the Non-Secure workload in the FIP image: - - .. code:: shell - - make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ - ENABLE_RUNTIME_INSTRUMENTATION=1 SCP_BL2=/dev/null \ - BL33= fip - -#. Load the following images onto the development board: ``fip.bin``, - ``scp_rom.bin``, ``scp_ram.bin``, ``mcp_rom.bin``, and ``mcp_ram.bin``. - -.. note:: - - These instructions presume you have a complete firmware stack. The N1SDP - `user guide`_ provides a detailed explanation on how to get setup from - scratch. - -Results -------- - -``CPU_SUSPEND`` to deepest power level -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in - parallel - - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 3.44 | 10.04 | 0.4 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 4.98 | 12.72 | 0.16 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 3.58 | 15.42 | 0.2 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 5.24 | 17.78 | 0.18 | - +---------+------+-----------+---------+-------------+ - -.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in - serial - - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 1.82 | 9.98 | 0.32 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 1.96 | 9.96 | 0.18 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 2.0 | 10.5 | 0.16 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 2.22 | 10.56 | 0.16 | - +---------+------+-----------+---------+-------------+ - -``CPU_SUSPEND`` to power level 0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in - parallel - - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 1.52 | 11.84 | 0.34 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 1.1 | 13.66 | 0.14 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 2.18 | 9.48 | 0.18 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 2.06 | 14.4 | 0.16 | - +---------+------+-----------+---------+-------------+ - -.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial - - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 1.54 | 9.34 | 0.3 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 1.88 | 9.5 | 0.16 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 1.86 | 9.86 | 0.2 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 2.02 | 9.64 | 0.18 | - +---------+------+-----------+---------+-------------+ - -``CPU_OFF`` on all non-lead CPUs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``CPU_OFF`` on all non-lead CPUs in sequence then, ``CPU_SUSPEND`` on the lead -core to the deepest power level. - -.. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs - - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 1.86 | 9.88 | 0.32 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 21.1 | 12.44 | 0.42 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 21.22 | 13.2 | 0.32 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 21.56 | 13.18 | 0.54 | - +---------+------+-----------+---------+-------------+ - -``CPU_VERSION`` in parallel -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores - - +-------------+--------+--------------+ - | Cluster | Core | Latency | - +=============+========+==============+ - | 0 | 0 | 0.08 | - +-------------+--------+--------------+ - | 0 | 1 | 0.22 | - +-------------+--------+--------------+ - | 1 | 0 | 0.28 | - +-------------+--------+--------------+ - | 1 | 1 | 0.26 | - +-------------+--------+--------------+ - --------------- - -*Copyright (c) 2023, Arm Limited. All rights reserved.* - -.. _v2.9-rc0-16-g666aec401: https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/heads/v2.9-rc0-16-g666aec401 -.. _v2.9-rc0: https://review.trustedfirmware.org/plugins/gitiles/TF-A/tf-a-tests/+/refs/tags/v2.9-rc0 -.. _user guide: https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/n1sdp/user-guide.rst -.. _Prebuilt Images: https://downloads.trustedfirmware.org/tf-a/css_scp_2.11.0/n1sdp/release/ -.. _N1SDP: https://developer.arm.com/documentation/101489/latest diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-ns-interrupt-handling-managed-exit.png b/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-ns-interrupt-handling-managed-exit.png deleted file mode 100644 index 0619cf260..000000000 Binary files a/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-ns-interrupt-handling-managed-exit.png and /dev/null differ diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-ns-interrupt-handling-sp-preemption.png b/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-ns-interrupt-handling-sp-preemption.png deleted file mode 100644 index f11002889..000000000 Binary files a/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-ns-interrupt-handling-sp-preemption.png and /dev/null differ diff --git a/atf-20231013-0ea67d76a/docs/threat_model/threat_model_spm.rst b/atf-20231013-0ea67d76a/docs/threat_model/threat_model_spm.rst deleted file mode 100644 index 24a115bfa..000000000 --- a/atf-20231013-0ea67d76a/docs/threat_model/threat_model_spm.rst +++ /dev/null @@ -1,1340 +0,0 @@ -SPMC Threat Model -***************** - -************************ -Introduction -************************ -This document provides a threat model for the TF-A :ref:`Secure Partition Manager` -(SPM) implementation or more generally the S-EL2 reference firmware running on -systems implementing the FEAT_SEL2 (formerly Armv8.4 Secure EL2) architecture -extension. The SPM implementation is based on the `Arm Firmware Framework for -Arm A-profile`_ specification. - -In brief, the broad FF-A specification and S-EL2 firmware implementation -provide: - -- Isolation of mutually mistrusting SW components, or endpoints in the FF-A - terminology. -- Distinct sandboxes in the secure world called secure partitions. This permits - isolation of services from multiple vendors. -- A standard protocol for communication and memory sharing between FF-A - endpoints. -- Mutual isolation of the normal world and the secure world (e.g. a Trusted OS - is prevented to map an arbitrary NS physical memory region such as the kernel - or the Hypervisor). - -************************ -Target of Evaluation -************************ -In this threat model, the target of evaluation is the S-EL2 firmware or the -``Secure Partition Manager Core`` component (SPMC). -The monitor and SPMD at EL3 are covered by the :ref:`Generic TF-A threat model -`. - -The scope for this threat model is: - -- The TF-A implementation for the S-EL2 SPMC based on the Hafnium hypervisor - running in the secure world of TrustZone (at S-EL2 exception level). - The threat model is not related to the normal world Hypervisor or VMs. - The S-EL1 and EL3 SPMC solutions are not covered. -- The implementation complies with the FF-A v1.0 specification, and a few - features of FF-A v1.1 specification. -- Secure partitions are statically provisioned at boot time. -- Focus on the run-time part of the life-cycle (no specific emphasis on boot - time, factory firmware provisioning, firmware udpate etc.) -- Not covering advanced or invasive physical attacks such as decapsulation, - FIB etc. -- Assumes secure boot or in particular TF-A trusted boot (TBBR or dual CoT) is - enabled. An attacker cannot boot arbitrary images that are not approved by the - SiP or platform providers. - -Data Flow Diagram -====================== -Figure 1 shows a high-level data flow diagram for the SPM split into an SPMD -component at EL3 and an SPMC component at S-EL2. The SPMD mostly acts as a -relayer/pass-through between the normal world and the secure world. It is -assumed to expose small attack surface. - -A description of each diagram element is given in Table 1. In the diagram, the -red broken lines indicate trust boundaries. - -Components outside of the broken lines are considered untrusted. - -.. uml:: ../resources/diagrams/plantuml/spm_dfd.puml - :caption: Figure 1: SPMC Data Flow Diagram - -.. table:: Table 1: SPMC Data Flow Diagram Description - - +---------------------+--------------------------------------------------------+ - | Diagram Element | Description | - +=====================+========================================================+ - | ``DF1`` | SP to SPMC communication. FF-A function invocation or | - | | implementation-defined Hypervisor call. | - +---------------------+--------------------------------------------------------+ - | ``DF2`` | SPMC to SPMD FF-A call. | - +---------------------+--------------------------------------------------------+ - | ``DF3`` | SPMD to NS forwarding. | - +---------------------+--------------------------------------------------------+ - | ``DF4`` | SP to SP FF-A direct message request/response. | - | | Note as a matter of simplifying the diagram | - | | the SP to SP communication happens through the SPMC | - | | (SP1 performs a direct message request to the | - | | SPMC targeting SP2 as destination. And similarly for | - | | the direct message response from SP2 to SP1). | - +---------------------+--------------------------------------------------------+ - | ``DF5`` | HW control. | - +---------------------+--------------------------------------------------------+ - | ``DF6`` | Bootloader image loading. | - +---------------------+--------------------------------------------------------+ - | ``DF7`` | External memory access. | - +---------------------+--------------------------------------------------------+ - -********************* -Threat Analysis -********************* - -This threat model follows a similar methodology to the :ref:`Generic TF-A threat model -`. -The following sections define: - -- Trust boundaries -- Assets -- Theat agents -- Threat types - -Trust boundaries -============================ - -- Normal world is untrusted. -- Secure world and normal world are separate trust boundaries. -- EL3 monitor, SPMD and SPMC are trusted. -- Bootloaders (in particular BL1/BL2 if using TF-A) and run-time BL31 are - implicitely trusted by the usage of secure boot. -- EL3 monitor, SPMD, SPMC do not trust SPs. - -.. figure:: ../resources/diagrams/spm-threat-model-trust-boundaries.png - - Figure 2: Trust boundaries - -Assets -============================ - -The following assets are identified: - -- SPMC state. -- SP state. -- Information exchange between endpoints (partition messages). -- SPMC secrets (e.g. pointer authentication key when enabled) -- SP secrets (e.g. application keys). -- Scheduling cycles. -- Shared memory. - -Threat Agents -============================ - -The following threat agents are identified: - -- NS-Endpoint identifies a non-secure endpoint: normal world client at NS-EL2 - (Hypervisor) or NS-EL1 (VM or OS kernel). -- S-Endpoint identifies a secure endpoint typically a secure partition. -- Hardware attacks (non-invasive) requiring a physical access to the device, - such as bus probing or DRAM stress. - -Threat types -============================ - -The following threat categories as exposed in the :ref:`Generic TF-A threat model -` -are re-used: - -- Spoofing -- Tampering -- Repudiation -- Information disclosure -- Denial of service -- Elevation of privileges - -Similarly this threat model re-uses the same threat risk ratings. The risk -analysis is evaluated based on the environment being ``Server`` or ``Mobile``. - -Threat Assessment -============================ - -The following threats are identified by applying STRIDE analysis on each diagram -element of the data flow diagram. - -+------------------------+----------------------------------------------------+ -| ID | 01 | -+========================+====================================================+ -| ``Threat`` | **An endpoint impersonates the sender or receiver | -| | FF-A ID in a direct request/response invocation.** | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF4 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMD, SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Spoofing | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------++----------------+---------------+ -| ``Impact`` | Critical(5) | Critical(5) | | -+------------------------+------------------++----------------+---------------+ -| ``Likelihood`` | Critical(5) | Critical(5) | | -+------------------------+------------------++----------------+---------------+ -| ``Total Risk Rating`` | Critical(25) | Critical(25) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | -| | The guidance below is left for a system integrator | -| | to implemented as necessary. | -| | The SPMC must enforce checks in the direct message | -| | request/response interfaces such an endpoint cannot| -| | spoof the origin and destination worlds (e.g. a NWd| -| | originated message directed to the SWd cannot use a| -| | SWd ID as the sender ID). | -| | Additionally a software component residing in the | -| | SPMC can be added for the purpose of direct | -| | request/response filtering. | -| | It can be configured with the list of known IDs | -| | and about which interaction can occur between one | -| | and another endpoint (e.g. which NWd endpoint ID | -| | sends a direct request to which SWd endpoint ID). | -| | This component checks the sender/receiver fields | -| | for a legitimate communication between endpoints. | -| | A similar component can exist in the OS kernel | -| | driver, or Hypervisor although it remains untrusted| -| | by the SPMD/SPMC. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 02 | -+========================+====================================================+ -| ``Threat`` | **Tampering with memory shared between an endpoint | -| | and the SPMC.** | -| | A malicious endpoint may attempt tampering with its| -| | RX/TX buffer contents while the SPMC is processing | -| | it (TOCTOU). | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF3, DF4, DF7 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | Shared memory, Information exchange | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | High (4) | High (4) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | High (4) | High (4) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | High (16) | High (16) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | In context of FF-A v1.0 and v1.1 this is the case | -| | of sharing the RX/TX buffer pair and usage in the | -| | PARTITION_INFO_GET or mem sharing primitives. | -| | The SPMC must copy the contents of the TX buffer | -| | to an internal temporary buffer before processing | -| | its contents. The SPMC must implement hardened | -| | input validation on data transmitted through the TX| -| | buffer by an untrusted endpoint. | -| | The TF-A SPMC mitigates this threat by enforcing | -| | checks on data transmitted through RX/TX buffers. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 03 | -+========================+====================================================+ -| ``Threat`` | **An endpoint may tamper with its own state or the | -| | state of another endpoint.** | -| | A malicious endpoint may attempt violating: | -| | - its own or another SP state by using an unusual | -| | combination (or out-of-order) FF-A function | -| | invocations. | -| | This can also be an endpoint emitting | -| | FF-A function invocations to another endpoint while| -| | the latter is not in a state to receive it (e.g. a | -| | SP sends a direct request to the normal world early| -| | while the normal world is not booted yet). | -| | - the SPMC state itself by employing unexpected | -| | transitions in FF-A memory sharing, direct requests| -| | and responses, or handling of interrupts. | -| | This can be led by random stimuli injection or | -| | fuzzing. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF4 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMD, SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP state, SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | High (4) | High (4) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | High (12) | High (12) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC provides mitigation against such | -| | threat by following the guidance for partition | -| | runtime models as described in FF-A v1.1 EAC0 spec.| -| | The SPMC performs numerous checks in runtime to | -| | prevent illegal state transitions by adhering to | -| | the partition runtime model. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 04 | -+========================+====================================================+ -| ``Threat`` | *An attacker may attempt injecting errors by the | -| | use of external DRAM stress techniques.** | -| | A malicious agent may attempt toggling an SP | -| | Stage-2 MMU descriptor bit within the page tables | -| | that the SPMC manages. This can happen in Rowhammer| -| | types of attack. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF7 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP or SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | Hardware attack | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering | -+------------------------+------------------+---------------+-----------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+---------------+-----------------+ -| ``Impact`` | High (4) | High (4) | | -+------------------------+------------------+---------------+-----------------+ -| ``Likelihood`` | Low (2) | Medium (3) | | -+------------------------+------------------+---------------+-----------------+ -| ``Total Risk Rating`` | Medium (8) | High (12) | | -+------------------------+------------------+---------------+-----------------+ -| ``Mitigations`` | The TF-A SPMC does not provide mitigations to this | -| | type of attack. It can be addressed by the use of | -| | dedicated HW circuity or hardening at the chipset | -| | or platform level left to the integrator. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 05 | -+========================+====================================================+ -| ``Threat`` | **Protection of the SPMC from a DMA capable device | -| | upstream to an SMMU.** | -| | A device may attempt to tamper with the internal | -| | SPMC code/data sections. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF5 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC or SP state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering, Elevation of privileges | -+------------------------+------------------+---------------+-----------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+---------------+-----------------+ -| ``Impact`` | High (4) | High (4) | | -+------------------------+------------------+---------------+-----------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+---------------+-----------------+ -| ``Total Risk Rating`` | High (12) | High (12) | | -+------------------------+------------------+---------------+-----------------+ -| ``Mitigations`` | A platform may prefer assigning boot time, | -| | statically alocated memory regions through the SMMU| -| | configuration and page tables. The FF-A v1.1 | -| | specification provisions this capability through | -| | static DMA isolation. | -| | The TF-A SPMC does not mitigate this threat. | -| | It will adopt the static DMA isolation approach in | -| | a future release. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 06 | -+========================+====================================================+ -| ``Threat`` | **Replay fragments of past communication between | -| | endpoints.** | -| | A malicious endpoint may replay a message exchange | -| | that occured between two legitimate endpoint as | -| | a matter of triggering a malfunction or extracting | -| | secrets from the receiving endpoint. In particular | -| | the memory sharing operation with fragmented | -| | messages between an endpoint and the SPMC may be | -| | replayed by a malicious agent as a matter of | -| | getting access or gaining permissions to a memory | -| | region which does not belong to this agent. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF2, DF3 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | Information exchange | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Repdudiation | -+------------------------+------------------+---------------+-----------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+---------------+-----------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+---------------+-----------------+ -| ``Likelihood`` | High (4) | High (4) | | -+------------------------+------------------+---------------+-----------------+ -| ``Total Risk Rating`` | High (12) | High (12) | | -+------------------------+------------------+---------------+-----------------+ -| ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 07 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint may attempt to extract data | -| | or state information by the use of invalid or | -| | incorrect input arguments.** | -| | Lack of input parameter validation or side effects | -| | of maliciously forged input parameters might affect| -| | the SPMC. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF4 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMD, SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP secrets, SPMC secrets, SP state, SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Information discolure | -+------------------------+------------------+---------------+-----------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+---------------+-----------------+ -| ``Impact`` | High (4) | High (4) | | -+------------------------+------------------+---------------+-----------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+---------------+-----------------+ -| ``Total Risk Rating`` | High (12) | High (12) | | -+------------------------+------------------+---------------+-----------------+ -| ``Mitigations`` | Secure Partitions must follow security standards | -| | and best practises as a way to mitigate the risk | -| | of common vulnerabilities to be exploited. | -| | The use of software (canaries) or hardware | -| | hardening techniques (XN, WXN, BTI, pointer | -| | authentication, MTE) helps detecting and stopping | -| | an exploitation early. | -| | The TF-A SPMC mitigates this threat by implementing| -| | stack protector, pointer authentication, BTI, XN, | -| | WXN, security hardening techniques. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 08 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint may forge a direct message | -| | request such that it reveals the internal state of | -| | another endpoint through the direct message | -| | response.** | -| | The secure partition or SPMC replies to a partition| -| | message by a direct message response with | -| | information which may reveal its internal state | -| | (.e.g. partition message response outside of | -| | allowed bounds). | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF4 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC or SP state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Information discolure | -+------------------------+------------------+---------------+-----------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+---------------+-----------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+---------------+-----------------+ -| ``Likelihood`` | Low (2) | Low (2) | | -+------------------------+------------------+---------------+-----------------+ -| ``Total Risk Rating`` | Medium (6) | Medium (6) | | -+------------------------+------------------+---------------+-----------------+ -| ``Mitigations`` | For the specific case of direct requests targeting | -| | the SPMC, the latter is hardened to prevent | -| | its internal state or the state of an SP to be | -| | revealed through a direct message response. | -| | Further, SPMC performs numerous checks in runtime | -| | on the basis of the rules established by partition | -| | runtime models to stop any malicious attempts by | -| | an endpoint to extract internal state of another | -| | endpoint. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 09 | -+========================+====================================================+ -| ``Threat`` | **Probing the FF-A communication between | -| | endpoints.** | -| | SPMC and SPs are typically loaded to external | -| | memory (protected by a TrustZone memory | -| | controller). A malicious agent may use non invasive| -| | methods to probe the external memory bus and | -| | extract the traffic between an SP and the SPMC or | -| | among SPs when shared buffers are held in external | -| | memory. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF7 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP/SPMC state, SP/SPMC secrets | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | Hardware attack | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Information disclosure | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Low (2) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (6) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | It is expected the platform or chipset provides | -| | guarantees in protecting the DRAM contents. | -| | The TF-A SPMC does not mitigate this class of | -| | attack and this is left to the integrator. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 10 | -+========================+====================================================+ -| ``Threat`` | **A malicious agent may attempt revealing the SPMC | -| | state or secrets by the use of software-based cache| -| | side-channel attack techniques.** | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF7 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP or SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Information disclosure | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Low (2) | Low (2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (6) | Medium (6) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | From an integration perspective it is assumed | -| | platforms consuming the SPMC component at S-EL2 | -| | (hence implementing the Armv8.4 FEAT_SEL2 | -| | architecture extension) implement mitigations to | -| | Spectre, Meltdown or other cache timing | -| | side-channel type of attacks. | -| | The TF-A SPMC implements one mitigation (barrier | -| | preventing speculation past exeception returns). | -| | The SPMC may be hardened further with SW | -| | mitigations (e.g. speculation barriers) for the | -| | cases not covered in HW. Usage of hardened | -| | compilers and appropriate options, code inspection | -| | are recommended ways to mitigate Spectre types of | -| | attacks. For non-hardened cores, the usage of | -| | techniques such a kernel page table isolation can | -| | help mitigating Meltdown type of attacks. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 11 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint may attempt flooding the | -| | SPMC with requests targeting a service within an | -| | endpoint such that it denies another endpoint to | -| | access this service.** | -| | Similarly, the malicious endpoint may target a | -| | a service within an endpoint such that the latter | -| | is unable to request services from another | -| | endpoint. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF4 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (9) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | -| | Bounding the time for operations to complete can | -| | be achieved by the usage of a trusted watchdog. | -| | Other quality of service monitoring can be achieved| -| | in the SPMC such as counting a number of operations| -| | in a limited timeframe. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 12 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint may attempt to allocate | -| | notifications bitmaps in the SPMC, through the | -| | FFA_NOTIFICATION_BITMAP_CREATE.** | -| | This might be an attempt to exhaust SPMC's memory, | -| | or to allocate a bitmap for a VM that was not | -| | intended to receive notifications from SPs. Thus | -| | creating the possibility for a channel that was not| -| | meant to exist. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of service, Spoofing | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium(3) | Medium(3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium(3) | Medium(3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium(9) | Medium(9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC mitigates this threat by defining a | -| | a fixed size pool for bitmap allocation. | -| | It also limits the designated FF-A calls to be used| -| | from NWd endpoints. | -| | In the NWd the hypervisor is supposed to limit the | -| | access to the designated FF-A call. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 13 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint may attempt to destroy the | -| | notifications bitmaps in the SPMC, through the | -| | FFA_NOTIFICATION_BITMAP_DESTROY.** | -| | This might be an attempt to tamper with the SPMC | -| | state such that a partition isn't able to receive | -| | notifications. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Low(4) | Low(4) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC mitigates this issue by limiting the | -| | designated FF-A call to be issued by the NWd. | -| | Also, the notifications bitmap can't be destroyed | -| | if there are pending notifications. | -| | In the NWd, the hypervisor must restrict the | -| | NS-endpoints that can issue the designated call. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 14 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint might attempt to give | -| | permissions to an unintended sender to set | -| | notifications targeting another receiver using the | -| | FF-A call FFA_NOTIFICATION_BIND.** | -| | This might be an attempt to tamper with the SPMC | -| | state such that an unintended, and possibly | -| | malicious, communication channel is established. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering, Spoofing | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium(3) | Medium(3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium(6) | Medium(6) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC mitigates this by restricting | -| | designated FFA_NOTIFICATION_BIND call to be issued | -| | by the receiver only. The receiver is responsible | -| | for allocating the notifications IDs to one | -| | specific partition. | -| | Also, receivers that are not meant to receive | -| | notifications, must have notifications receipt | -| | disabled in the respective partition's manifest. | -| | As for calls coming from NWd, if the NWd VM has had| -| | its bitmap allocated at initialization, the TF-A | -| | SPMC can't guarantee this threat won't happen. | -| | The Hypervisor must mitigate in the NWd, similarly | -| | to SPMC for calls in SWd. Though, if the Hypervisor| -| | has been compromised, the SPMC won't be able to | -| | mitigate it for calls forwarded from NWd. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 15 | -+========================+====================================================+ -| ``Threat`` | **A malicious partition endpoint might attempt to | -| | set notifications that are not bound to it.** | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Spoofing | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Low(4) | Low(4) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC mitigates this by checking the | -| | sender's ID provided in the input to the call | -| | FFA_NOTIFICATION_SET. The SPMC keeps track of which| -| | notifications are bound to which sender, for a | -| | given receiver. If the sender is an SP, the | -| | provided sender ID must match the ID of the | -| | currently running partition. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 16 | -+========================+====================================================+ -| ``Threat`` | **A malicious partition endpoint might attempt to | -| | get notifications that are not targeted to it.** | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Spoofing | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Informational(1) | Informational(1)| | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC mitigates this by checking the | -| | receiver's ID provided in the input to the call | -| | FFA_NOTIFICATION_GET. The SPMC keeps track of which| -| | notifications are pending for each receiver. | -| | The provided receiver ID must match the ID of the | -| | currently running partition, if it is an SP. | -| | For calls forwarded from NWd, the SPMC will return | -| | the pending notifications if the receiver had its | -| | bitmap created, and has pending notifications. | -| | If Hypervisor or OS kernel are compromised, the | -| | SPMC won't be able to mitigate calls from rogue NWd| -| | endpoints. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 17 | -+========================+====================================================+ -| ``Threat`` | **A malicious partition endpoint might attempt to | -| | get the information about pending notifications, | -| | through the FFA_NOTIFICATION_INFO_GET call.** | -| | This call is meant to be used by the NWd FF-A | -| | driver. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Information disclosure | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium(3) | Medium(3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium(6) | Medium(6) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC mitigates this by returning error to | -| | calls made by SPs to FFA_NOTIFICATION_INFO_GET. | -| | If Hypervisor or OS kernel are compromised, the | -| | SPMC won't be able mitigate calls from rogue NWd | -| | endpoints. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 18 | -+========================+====================================================+ -| ``Threat`` | **A malicious partition endpoint might attempt to | -| | flood another partition endpoint with notifications| -| | hindering its operation.** | -| | The intent of the malicious endpoint could be to | -| | interfere with both the receiver's and/or primary | -| | endpoint execution, as they can both be preempted | -| | by the NPI and SRI, respectively. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF4 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state, SP state, CPU cycles | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | DoS | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Low(2) | Low(2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium(3) | Medium(3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium(6) | Medium(6) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | -| | However, the impact is limited due to the | -| | architecture: | -| | - Notifications are not queued, one that has been | -| | signaled needs to be retrieved by the receiver, | -| | until it can be sent again. | -| | - Both SRI and NPI can't be pended until handled | -| | which limits the amount of spurious interrupts. | -| | - A given receiver could only bind a maximum number| -| | of notifications to a given sender, within a given | -| | execution context. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 19 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint may abuse FFA_RUN call to | -| | resume or turn on other endpoint execution | -| | contexts, attempting to alter the internal state of| -| | SPMC and SPs, potentially leading to illegal state | -| | transitions and deadlocks.** | -| | An endpoint can call into another endpoint | -| | execution context using FFA_MSG_SEND_DIRECT_REQ | -| | ABI to create a call chain. A malicious endpoint | -| | could abuse this to form loops in a call chain that| -| | could lead to potential deadlocks. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF4 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC, SPMD | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state, SP state, Scheduling cycles | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering, Denial of Service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (9) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC provides mitigation against such | -| | threats by following the guidance for partition | -| | runtime models as described in FF-A v1.1 EAC0 spec.| -| | The SPMC performs numerous checks in runtime to | -| | prevent illegal state transitions by adhering to | -| | the partition runtime model. Further, if the | -| | receiver endpoint is a predecessor of current | -| | endpoint in the present call chain, the SPMC denies| -| | any attempts to form loops by returning FFA_DENIED | -| | error code. Only the primary scheduler is allowed | -| | to turn on execution contexts of other partitions | -| | though SPMC does not have the ability to | -| | scrutinize its identity. Secure partitions have | -| | limited ability to resume execution contexts of | -| | other partitions based on the runtime model. Such | -| | attempts cannot compromise the integrity of the | -| | SPMC. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 20 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint can perform a | -| | denial-of-service attack by using FFA_INTERRUPT | -| | call that could attempt to cause the system to | -| | crash or enter into an unknown state as no physical| -| | interrupt could be pending for it to be handled in | -| | the SPMC.** | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF5 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC, SPMD | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state, SP state, Scheduling cycles | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering, Denial of Service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (9) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC provides mitigation against such | -| | attack by detecting invocations from partitions | -| | and simply returning FFA_ERROR status interface. | -| | SPMC only allows SPMD to use FFA_INTERRUPT ABI to | -| | communicate a pending secure interrupt triggered | -| | while execution was in normal world. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 21 | -+========================+====================================================+ -| ``Threat`` | **A malicious secure endpoint might deactivate a | -| | (virtual) secure interrupt that was not originally | -| | signaled by SPMC, thereby attempting to alter the | -| | state of the SPMC and potentially lead to system | -| | crash.** | -| | SPMC maps the virtual interrupt ids to the physical| -| | interrupt ids to keep the implementation of virtual| -| | interrupt driver simple. | -| | Similarly, a malicious secure endpoint might invoke| -| | the deactivation ABI more than once for a secure | -| | interrupt. Moreover, a malicious secure endpoint | -| | might attempt to deactivate a (virtual) secure | -| | interrupt that was signaled to another endpoint | -| | execution context by the SPMC even before secure | -| | interrupt was handled. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF5 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state, SP state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (9) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | At initialization, the TF-A SPMC parses the | -| | partition manifests to find the target execution | -| | context responsible for handling the various | -| | secure physical interrupts. The TF-A SPMC provides | -| | mitigation against above mentioned threats by: | -| | | -| | - Keeping track of each pending virtual interrupt | -| | signaled to an execution context of a secure | -| | secure partition. | -| | - Denying any deactivation call from SP if there is| -| | no pending physical interrupt mapped to the | -| | given virtual interrupt. | -| | - Denying any deactivation call from SP if the | -| | virtual interrupt has not been signaled to the | -| | current execution context. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 22 | -+========================+====================================================+ -| ``Threat`` | **A malicious secure endpoint might not deactivate | -| | a virtual interrupt signaled to it by the SPMC but | -| | perform secure interrupt signal completion. This | -| | attempt to corrupt the internal state of the SPMC | -| | could lead to an unknown state and further lead to | -| | system crash.** | -| | Similarly, a malicious secure endpoint could | -| | deliberately not perform either interrupt | -| | deactivation or interrupt completion signal. Since,| -| | the SPMC can only process one secure interrupt at a| -| | time, this could choke the system where all | -| | interrupts are indefinitely masked which could | -| | potentially lead to system crash or reboot. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF5 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state, SP state, Scheduling cycles | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Tampering, Denial of Service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (9) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC does not provide mitigation against | -| | such threat. This is a limitation of the current | -| | SPMC implementation and needs to be handled in the | -| | future releases. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 23 | -+========================+====================================================+ -| ``Threat`` | **A malicious endpoint could leverage non-secure | -| | interrupts to preempt a secure endpoint, thereby | -| | attempting to render it unable to handle a secure | -| | virtual interrupt targetted for it. This could lead| -| | to priority inversion as secure virtual interrupts | -| | are kept pending while non-secure interrupts are | -| | handled by normal world VMs.** | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF5 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC, SPMD | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state, SP state, Scheduling cycles | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of Service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (9) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC alone does not provide mitigation | -| | against such threats. System integrators must take | -| | necessary high level design decisions that takes | -| | care of interrupt prioritization. The SPMC performs| -| | its role of enabling SPs to specify appropriate | -| | action towards non-secure interrupt with the help | -| | of partition manifest based on the guidance in the | -| | FF-A v1.1 EAC0 specification. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 24 | -+========================+====================================================+ -| ``Threat`` | **A secure endpoint depends on primary scheduler | -| | for CPU cycles. A malicious endpoint could delay | -| | the secure endpoint from being scheduled. Secure | -| | interrupts, if not handled timely, could compromise| -| | the state of SP and SPMC, thereby rendering the | -| | system unresponsive.** | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2, DF3, DF5 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC, SPMD | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state, SP state, Scheduling cycles | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of Service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (9) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC does not provide full mitigation | -| | against such threats. However, based on the | -| | guidance provided in the FF-A v1.1 EAC0 spec, SPMC | -| | provisions CPU cycles to run a secure endpoint | -| | execution context in SPMC schedule mode which | -| | cannot be preempted by a non-secure interrupt. | -| | This reduces the dependency on primary scheduler | -| | for cycle allocation. Moreover, all further | -| | interrupts are masked until pending secure virtual | -| | interrupt on current CPU is handled. This allows SP| -| | execution context to make progress even upon being | -| | interrupted. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 25 | -+========================+====================================================+ -| ``Threat`` | **A rogue FF-A endpoint can use memory sharing | -| | calls to exhaust SPMC resources.** | -| | For each on-going operation that involves an SP, | -| | the SPMC allocates resources to track its state. | -| | If the operation is never concluded, the resources | -| | are never freed. | -| | In the worst scenario, multiple operations that | -| | never conclude may exhaust the SPMC resources to a | -| | point in which renders memory sharing operations | -| | impossible. This could affect other, non-harmful | -| | FF-A endpoints, from legitimately using memory | -| | share functionality. The intent might even be | -| | to cause the SPMC to consume excessive CPU cycles, | -| | attempting to make it deny its service to the NWd. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC, SPMD | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SPMC state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of Service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | High (4) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | High (4) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | High (16) | Medium (9) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC uses a statically allocated pool of | -| | memory to keep track of on-going memory sharing | -| | operations. After a possible attack, this could | -| | fail due to insufficient memory, and return an | -| | error to the caller. At this point, any other | -| | endpoint that requires use of memory sharing for | -| | its operation could get itself in an unusable | -| | state. | -| | Regarding CPU cycles starving threat, the SPMC | -| | doesn't provide any mitigation for this, as any | -| | FF-A endpoint, at the virtual FF-A instance is | -| | allowed to invoke memory share/lend/donate. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 26 | -+========================+====================================================+ -| ``Threat`` | **A borrower may interfere with lender's | -| | operation, if it terminates due to a fatal error | -| | condition without releasing the memory | -| | shared/lent.** | -| | Such scenario may render the lender inoperable. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of Service | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | High (4) | Low (2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | High (12) | Medium(6) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC does not provide mitigation for such | -| | scenario. The FF-A endpoints must attempt to | -| | relinquish memory shared/lent themselves in | -| | case of failure. The memory used to track the | -| | operation in the SPMC will also remain usuable. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 27 | -+========================+====================================================+ -| ``Threat`` | **A rogue FF-A endpoint may attempt to tamper with | -| | the content of the memory shared/lent, whilst | -| | being accessed by other FF-A endpoints.** | -| | It might attempt to do so: using one of the clear | -| | flags, when either retrieving or relinquishing | -| | access to the memory via the respective FF-A | -| | calls; or directly accessing memory without | -| | respecting the synchronization protocol between | -| | all involved endpoints. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC, FF-A endpoint | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of Service, Tampering | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | Low (2) | Low (2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Medium (3) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | Medium (6) | Medium(6) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The first case defined in the threat, the TF-A | -| | SPMC mitigates it, by ensuring a memory is cleared | -| | only when all borrowers have relinquished access | -| | to the memory, in a scenario involving multiple | -| | borrowers. Also, if the receiver is granted RO, | -| | permissions, the SPMC will reject any request | -| | to clear memory on behalf of the borrower, by | -| | returning an error to the respective FF-A call. | -| | The second case defined in the threat can't be | -| | mitigated by the SPMC. It is up to the NS/S FF-A | -| | endpoints to establish a robust protocol for using | -| | the shared memory. | -+------------------------+----------------------------------------------------+ - -+------------------------+----------------------------------------------------+ -| ID | 28 | -+========================+====================================================+ -| ``Threat`` | **A rogue FF-A endpoint may attempt to share | -| | memory that is not in its translation regime, or | -| | attempt to specify attributes more permissive than | -| | those it possesses at a given time.** | -| | Both ways could be an attempt for escalating its | -| | privileges. | -+------------------------+----------------------------------------------------+ -| ``Diagram Elements`` | DF1, DF2 | -+------------------------+----------------------------------------------------+ -| ``Affected TF-A | SPMC, FF-A endpoint | -| Components`` | | -+------------------------+----------------------------------------------------+ -| ``Assets`` | SP state | -+------------------------+----------------------------------------------------+ -| ``Threat Agent`` | NS-Endpoint, S-Endpoint | -+------------------------+----------------------------------------------------+ -| ``Threat Type`` | Denial of Service, Tampering | -+------------------------+------------------+-----------------+---------------+ -| ``Application`` | ``Server`` | ``Mobile`` | | -+------------------------+------------------+-----------------+---------------+ -| ``Impact`` | High (4) | Low (2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Likelihood`` | Medium (3) | Low (2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Total Risk Rating`` | High (12) | Low (2) | | -+------------------------+------------------+-----------------+---------------+ -| ``Mitigations`` | The TF-A SPMC mitigates this threat by performing | -| | sanity checks to the provided memory region | -| | descriptor. | -| | For operations at the virtual FF-A instance, and | -| | once the full memory descriptor is provided, | -| | the SPMC validates that the memory is part of the | -| | caller's translation regime. The SPMC also checks | -| | that the memory attributes provided are within | -| | those the owner possesses, in terms of | -| | permissiveness. If more permissive attributes are | -| | specified, the SPMC returns an error | -| | FFA_INVALID_PARAMETERS. The permissiveness rules | -| | are enforced in any call to share/lend or donate | -| | the memory, and in retrieve requests. | -+------------------------+----------------------------------------------------+ - --------------- - -*Copyright (c) 2021-2023, Arm Limited. All rights reserved.* - -.. _Arm Firmware Framework for Arm A-profile: https://developer.arm.com/docs/den0077/latest -.. _FF-A ACS: https://github.com/ARM-software/ff-a-acs/releases - diff --git a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/712/cryptocell_crypto.c b/atf-20231013-0ea67d76a/drivers/auth/cryptocell/712/cryptocell_crypto.c deleted file mode 100644 index bba13f8bb..000000000 --- a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/712/cryptocell_crypto.c +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define LIB_NAME "CryptoCell 712 SBROM" -#define RSA_SALT_LEN 32 -#define RSA_EXPONENT 65537 - -/* - * AlgorithmIdentifier ::= SEQUENCE { - * algorithm OBJECT IDENTIFIER, - * parameters ANY DEFINED BY algorithm OPTIONAL - * } - * - * SubjectPublicKeyInfo ::= SEQUENCE { - * algorithm AlgorithmIdentifier, - * subjectPublicKey BIT STRING - * } - * - * DigestInfo ::= SEQUENCE { - * digestAlgorithm AlgorithmIdentifier, - * digest OCTET STRING - * } - * - * RSASSA-PSS-params ::= SEQUENCE { - * hashAlgorithm [0] HashAlgorithm, - * maskGenAlgorithm [1] MaskGenAlgorithm, - * saltLength [2] INTEGER, - * trailerField [3] TrailerField DEFAULT trailerFieldBC - * } - */ - -/* - * Initialize the library and export the descriptor - */ -static void init(void) -{ - CCError_t ret; - uint32_t lcs; - - /* Initialize CC SBROM */ - ret = CC_BsvSbromInit((uintptr_t)PLAT_CRYPTOCELL_BASE); - if (ret != CC_OK) { - ERROR("CryptoCell CC_BsvSbromInit() error %x\n", ret); - panic(); - } - - /* Initialize lifecycle state */ - ret = CC_BsvLcsGetAndInit((uintptr_t)PLAT_CRYPTOCELL_BASE, &lcs); - if (ret != CC_OK) { - ERROR("CryptoCell CC_BsvLcsGetAndInit() error %x\n", ret); - panic(); - } - - /* If the lifecyclestate is `SD`, then stop further execution */ - if (lcs == CC_BSV_SECURITY_DISABLED_LCS) { - ERROR("CryptoCell LCS is security-disabled\n"); - panic(); - } -} - -/* - * Verify a signature. - * - * Parameters are passed using the DER encoding format following the ASN.1 - * structures detailed above. - */ -static int verify_signature(void *data_ptr, unsigned int data_len, - void *sig_ptr, unsigned int sig_len, - void *sig_alg, unsigned int sig_alg_len, - void *pk_ptr, unsigned int pk_len) -{ - CCError_t error; - CCSbNParams_t pk; - CCSbSignature_t signature; - int rc, exp, expected_salt_len; - mbedtls_asn1_buf sig_oid, alg_oid, params; - mbedtls_md_type_t md_alg, mgf1_hash_id; - mbedtls_pk_type_t pk_alg; - size_t len; - uint8_t *p, *end; - /* Temp buf to store the public key modulo (N) in LE format */ - uint32_t RevN[SB_RSA_MOD_SIZE_IN_WORDS]; - - /* Verify the signature algorithm */ - /* Get pointers to signature OID and parameters */ - p = sig_alg; - end = p + sig_alg_len; - rc = mbedtls_asn1_get_alg(&p, end, &sig_oid, ¶ms); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Get the actual signature algorithm (MD + PK) */ - rc = mbedtls_oid_get_sig_alg(&sig_oid, &md_alg, &pk_alg); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - /* The CryptoCell only supports RSASSA-PSS signature */ - if ((pk_alg != MBEDTLS_PK_RSASSA_PSS) || (md_alg != MBEDTLS_MD_NONE)) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Verify the RSASSA-PSS params */ - /* The trailer field is verified to be 0xBC internally by this API */ - rc = mbedtls_x509_get_rsassa_pss_params(¶ms, &md_alg, - &mgf1_hash_id, - &expected_salt_len); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - /* The CryptoCell only supports SHA256 as hash algorithm */ - if ((md_alg != MBEDTLS_MD_SHA256) || (mgf1_hash_id != MBEDTLS_MD_SHA256)) { - return CRYPTO_ERR_SIGNATURE; - } - - if (expected_salt_len != RSA_SALT_LEN) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Parse the public key */ - p = pk_ptr; - end = p + pk_len; - rc = mbedtls_asn1_get_tag(&p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - end = p + len; - rc = mbedtls_asn1_get_alg_null(&p, end, &alg_oid); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (mbedtls_oid_get_pk_alg(&alg_oid, &pk_alg) != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (pk_alg != MBEDTLS_PK_RSA) { - return CRYPTO_ERR_SIGNATURE; - } - - rc = mbedtls_asn1_get_bitstring_null(&p, end, &len); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - rc = mbedtls_asn1_get_tag(&p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - rc = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_INTEGER); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (*p == 0) { - p++; len--; - } - - if (len != RSA_MOD_SIZE_IN_BYTES || ((p + len) > end)) { - return CRYPTO_ERR_SIGNATURE; - } - - /* - * The CCSbVerifySignature() API expects N and Np in BE format and - * the signature in LE format. Copy N from certificate. - */ - memcpy(pk.N, p, RSA_MOD_SIZE_IN_BYTES); - - /* Verify the RSA exponent */ - p += len; - rc = mbedtls_asn1_get_int(&p, end, &exp); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (exp != RSA_EXPONENT) { - return CRYPTO_ERR_SIGNATURE; - } - - /* - * Calculate the Np (Barrett n' value). The RSA_CalcNp() API expects - * N in LE format. Hence reverse N into a temporary buffer `RevN`. - */ - UTIL_ReverseMemCopy((uint8_t *)RevN, (uint8_t *)pk.N, sizeof(RevN)); - - RSA_CalcNp((uintptr_t)PLAT_CRYPTOCELL_BASE, RevN, pk.Np); - - /* Np is in LE format. Reverse it to BE */ - UTIL_ReverseBuff((uint8_t *)pk.Np, sizeof(pk.Np)); - - /* Get the signature (bitstring) */ - p = sig_ptr; - end = p + sig_len; - rc = mbedtls_asn1_get_bitstring_null(&p, end, &len); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (len != RSA_MOD_SIZE_IN_BYTES || ((p + len) > end)) { - return CRYPTO_ERR_SIGNATURE; - } - - /* - * The signature is BE format. Convert it to LE before calling - * CCSbVerifySignature(). - */ - UTIL_ReverseMemCopy((uint8_t *)signature.sig, p, RSA_MOD_SIZE_IN_BYTES); - - /* - * CryptoCell utilises DMA internally to transfer data. Flush the data - * from caches. - */ - flush_dcache_range((uintptr_t)data_ptr, data_len); - - /* Verify the signature */ - error = CCSbVerifySignature((uintptr_t)PLAT_CRYPTOCELL_BASE, - (uint32_t *)data_ptr, &pk, &signature, - data_len, RSA_PSS); - if (error != CC_OK) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Signature verification success */ - return CRYPTO_SUCCESS; -} - -/* - * Match a hash - * - * Digest info is passed in DER format following the ASN.1 structure detailed - * above. - */ -static int verify_hash(void *data_ptr, unsigned int data_len, - void *digest_info_ptr, unsigned int digest_info_len) -{ - mbedtls_asn1_buf hash_oid, params; - mbedtls_md_type_t md_alg; - uint8_t *p, *end, *hash; - CCHashResult_t pubKeyHash; - size_t len; - int rc; - CCError_t error; - - /* Digest info should be an MBEDTLS_ASN1_SEQUENCE */ - p = digest_info_ptr; - end = p + digest_info_len; - rc = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - /* Get the hash algorithm */ - rc = mbedtls_asn1_get_alg(&p, end, &hash_oid, ¶ms); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - rc = mbedtls_oid_get_md_alg(&hash_oid, &md_alg); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - /* Verify that hash algorithm is SHA256 */ - if (md_alg != MBEDTLS_MD_SHA256) { - return CRYPTO_ERR_HASH; - } - - /* Hash should be octet string type */ - rc = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - /* Length of hash must match the algorithm's size */ - if (len != HASH_RESULT_SIZE_IN_BYTES) { - return CRYPTO_ERR_HASH; - } - - /* - * CryptoCell utilises DMA internally to transfer data. Flush the data - * from caches. - */ - flush_dcache_range((uintptr_t)data_ptr, data_len); - - hash = p; - error = SBROM_CryptoHash((uintptr_t)PLAT_CRYPTOCELL_BASE, - (uintptr_t)data_ptr, data_len, pubKeyHash); - if (error != CC_OK) { - return CRYPTO_ERR_HASH; - } - - rc = memcmp(pubKeyHash, hash, HASH_RESULT_SIZE_IN_BYTES); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - return CRYPTO_SUCCESS; -} - -/* - * Register crypto library descriptor - */ -REGISTER_CRYPTO_LIB(LIB_NAME, init, verify_signature, verify_hash, NULL, NULL, NULL); - diff --git a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/712/cryptocell_plat_helpers.c b/atf-20231013-0ea67d76a/drivers/auth/cryptocell/712/cryptocell_plat_helpers.c deleted file mode 100644 index 53d77dbe1..000000000 --- a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/712/cryptocell_plat_helpers.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -/* - * Return the ROTPK hash - * - * dst: buffer into which the ROTPK hash will be copied into - * len: length of the provided buffer, which must be at least enough for a - * SHA256 hash - * flags: a pointer to integer that will be set to indicate the ROTPK status - * - * Return: 0 = success, Otherwise = error - */ -int cc_get_rotpk_hash(unsigned char *dst, unsigned int len, unsigned int *flags) -{ - CCError_t error; - uint32_t lcs; - - assert(dst != NULL); - assert(len >= HASH_RESULT_SIZE_IN_WORDS); - assert(flags != NULL); - - error = NVM_GetLCS(PLAT_CRYPTOCELL_BASE, &lcs); - if (error != CC_OK) - return 1; - - /* If the lifecycle state is `SD`, return failure */ - if (lcs == CC_BSV_SECURITY_DISABLED_LCS) - return 1; - - /* - * If the lifecycle state is `CM` or `DM`, ROTPK shouldn't be verified. - * Return success after setting ROTPK_NOT_DEPLOYED flag - */ - if ((lcs == CC_BSV_CHIP_MANUFACTURE_LCS) || - (lcs == CC_BSV_DEVICE_MANUFACTURE_LCS)) { - *flags = ROTPK_NOT_DEPLOYED; - return 0; - } - - /* Copy the DER header */ - error = NVM_ReadHASHPubKey(PLAT_CRYPTOCELL_BASE, - CC_SB_HASH_BOOT_KEY_256B, - (uint32_t *)dst, HASH_RESULT_SIZE_IN_WORDS); - if (error != CC_OK) - return 1; - - *flags = ROTPK_IS_HASH; - return 0; -} - -/* - * Return the non-volatile counter value stored in the platform. The cookie - * specifies the OID of the counter in the certificate. - * - * Return: 0 = success, Otherwise = error - */ -int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr) -{ - CCError_t error = CC_FAIL; - - if (strcmp(cookie, TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = NVM_GetSwVersion(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_COUNTER1, nv_ctr); - } else if (strcmp(cookie, NON_TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = NVM_GetSwVersion(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_COUNTER2, nv_ctr); - } - - return (error != CC_OK); -} - -/* - * Store a new non-volatile counter value in the counter specified by the OID - * in the cookie. This function is not expected to be called if the Lifecycle - * state is RMA as the values in the certificate are expected to always match - * the nvcounter values. But if called when the LCS is RMA, the underlying - * helper functions will return success but without updating the counter. - * - * Return: 0 = success, Otherwise = error - */ -int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr) -{ - CCError_t error = CC_FAIL; - - if (strcmp(cookie, TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = NVM_SetSwVersion(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_COUNTER1, nv_ctr); - } else if (strcmp(cookie, NON_TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = NVM_SetSwVersion(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_COUNTER2, nv_ctr); - } - - return (error != CC_OK); -} - diff --git a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/713/cryptocell_crypto.c b/atf-20231013-0ea67d76a/drivers/auth/cryptocell/713/cryptocell_crypto.c deleted file mode 100644 index 6601b3a88..000000000 --- a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/713/cryptocell_crypto.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (c) 2017-2023 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#define LIB_NAME "CryptoCell 713 SBROM" -#define RSA_SALT_LEN 32 -#define RSA_EXPONENT 65537 - -/* - * AlgorithmIdentifier ::= SEQUENCE { - * algorithm OBJECT IDENTIFIER, - * parameters ANY DEFINED BY algorithm OPTIONAL - * } - * - * SubjectPublicKeyInfo ::= SEQUENCE { - * algorithm AlgorithmIdentifier, - * subjectPublicKey BIT STRING - * } - * - * DigestInfo ::= SEQUENCE { - * digestAlgorithm AlgorithmIdentifier, - * digest OCTET STRING - * } - * - * RSASSA-PSS-params ::= SEQUENCE { - * hashAlgorithm [0] HashAlgorithm, - * maskGenAlgorithm [1] MaskGenAlgorithm, - * saltLength [2] INTEGER, - * trailerField [3] TrailerField DEFAULT trailerFieldBC - * } - */ - -/* - * Initialize the library and export the descriptor - */ -static void init(void) -{ - CCError_t ret; - uint32_t lcs; - - /* Initialize CC SBROM */ - ret = CC_BsvInit((uintptr_t)PLAT_CRYPTOCELL_BASE); - if (ret != CC_OK) { - ERROR("CryptoCell CC_BsvInit() error %x\n", ret); - panic(); - } - - /* Initialize lifecycle state */ - ret = CC_BsvGetAndInitLcs((uintptr_t)PLAT_CRYPTOCELL_BASE, &lcs); - if (ret != CC_OK) { - ERROR("CryptoCell CC_BsvGetAndInitLcs() error %x\n", ret); - panic(); - } -} - -/* - * Verify a signature. - * - * Parameters are passed using the DER encoding format following the ASN.1 - * structures detailed above. - */ -static int verify_signature(void *data_ptr, unsigned int data_len, - void *sig_ptr, unsigned int sig_len, - void *sig_alg, unsigned int sig_alg_len, - void *pk_ptr, unsigned int pk_len) -{ - CCError_t error; - CCBsvNBuff_t NBuff; - CCBsvSignature_t signature; - int rc, exp, expected_salt_len; - mbedtls_asn1_buf sig_oid, alg_oid, params; - mbedtls_md_type_t md_alg, mgf1_hash_id; - mbedtls_pk_type_t pk_alg; - - size_t len; - uint8_t *p, *end; - CCHashResult_t digest; - CCBool_t is_verified; - /* This is a rather large array, we don't want it on stack */ - static uint32_t workspace[BSV_RSA_WORKSPACE_MIN_SIZE]; - - /* Verify the signature algorithm */ - /* Get pointers to signature OID and parameters */ - p = sig_alg; - end = p + sig_alg_len; - rc = mbedtls_asn1_get_alg(&p, end, &sig_oid, ¶ms); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Get the actual signature algorithm (MD + PK) */ - rc = mbedtls_oid_get_sig_alg(&sig_oid, &md_alg, &pk_alg); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - /* The CryptoCell only supports RSASSA-PSS signature */ - if (pk_alg != MBEDTLS_PK_RSASSA_PSS || md_alg != MBEDTLS_MD_NONE) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Verify the RSASSA-PSS params */ - /* The trailer field is verified to be 0xBC internally by this API */ - rc = mbedtls_x509_get_rsassa_pss_params(¶ms, &md_alg, - &mgf1_hash_id, - &expected_salt_len); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - /* The CryptoCell only supports SHA256 as hash algorithm */ - if (md_alg != MBEDTLS_MD_SHA256 || - mgf1_hash_id != MBEDTLS_MD_SHA256) { - return CRYPTO_ERR_SIGNATURE; - } - - if (expected_salt_len != RSA_SALT_LEN) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Parse the public key */ - p = pk_ptr; - end = p + pk_len; - rc = mbedtls_asn1_get_tag(&p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - end = p + len; - rc = mbedtls_asn1_get_alg_null(&p, end, &alg_oid); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (mbedtls_oid_get_pk_alg(&alg_oid, &pk_alg) != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (pk_alg != MBEDTLS_PK_RSA) { - return CRYPTO_ERR_SIGNATURE; - } - - rc = mbedtls_asn1_get_bitstring_null(&p, end, &len); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - rc = mbedtls_asn1_get_tag(&p, end, &len, - MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - rc = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_INTEGER); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (*p == 0) { - p++; len--; - } - if (len != BSV_CERT_RSA_KEY_SIZE_IN_BYTES || ((p + len) > end)) { - return CRYPTO_ERR_SIGNATURE; - } - - /* - * Copy N from certificate. - */ - memcpy(NBuff, p, BSV_CERT_RSA_KEY_SIZE_IN_BYTES); - - /* Verify the RSA exponent */ - p += len; - rc = mbedtls_asn1_get_int(&p, end, &exp); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (exp != RSA_EXPONENT) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Get the signature (bitstring) */ - p = sig_ptr; - end = p + sig_len; - rc = mbedtls_asn1_get_bitstring_null(&p, end, &len); - if (rc != 0) { - return CRYPTO_ERR_SIGNATURE; - } - - if (len != BSV_CERT_RSA_KEY_SIZE_IN_BYTES || ((p + len) > end)) { - return CRYPTO_ERR_SIGNATURE; - } - - /* - * Copy the signature (in BE format) - */ - memcpy((uint8_t *)signature, p, BSV_CERT_RSA_KEY_SIZE_IN_BYTES); - - error = CC_BsvSha256((uintptr_t)PLAT_CRYPTOCELL_BASE, - data_ptr, data_len, digest); - if (error != CC_OK) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Verify the signature */ - error = CC_BsvRsaPssVerify((uintptr_t)PLAT_CRYPTOCELL_BASE, NBuff, - NULL, signature, digest, workspace, - BSV_RSA_WORKSPACE_MIN_SIZE, &is_verified); - if ((error != CC_OK) || (is_verified != CC_TRUE)) { - return CRYPTO_ERR_SIGNATURE; - } - - /* Signature verification success */ - return CRYPTO_SUCCESS; -} - -/* - * Match a hash - * - * Digest info is passed in DER format following the ASN.1 structure detailed - * above. - */ -static int verify_hash(void *data_ptr, unsigned int data_len, - void *digest_info_ptr, unsigned int digest_info_len) -{ - mbedtls_asn1_buf hash_oid, params; - mbedtls_md_type_t md_alg; - uint8_t *p, *end, *hash; - CCHashResult_t pubKeyHash; - size_t len; - int rc; - CCError_t error; - - /* Digest info should be an MBEDTLS_ASN1_SEQUENCE */ - p = digest_info_ptr; - end = p + digest_info_len; - rc = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | - MBEDTLS_ASN1_SEQUENCE); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - /* Get the hash algorithm */ - rc = mbedtls_asn1_get_alg(&p, end, &hash_oid, ¶ms); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - rc = mbedtls_oid_get_md_alg(&hash_oid, &md_alg); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - /* Verify that hash algorithm is SHA256 */ - if (md_alg != MBEDTLS_MD_SHA256) { - return CRYPTO_ERR_HASH; - } - - /* Hash should be octet string type */ - rc = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - /* Length of hash must match the algorithm's size */ - if (len != HASH_RESULT_SIZE_IN_BYTES) { - return CRYPTO_ERR_HASH; - } - - hash = p; - error = CC_BsvSha256((uintptr_t)PLAT_CRYPTOCELL_BASE, data_ptr, - data_len, pubKeyHash); - if (error != CC_OK) { - return CRYPTO_ERR_HASH; - } - - rc = memcmp(pubKeyHash, hash, HASH_RESULT_SIZE_IN_BYTES); - if (rc != 0) { - return CRYPTO_ERR_HASH; - } - - return CRYPTO_SUCCESS; -} - -/* - * Register crypto library descriptor - */ -REGISTER_CRYPTO_LIB(LIB_NAME, init, verify_signature, verify_hash, NULL, NULL, NULL); diff --git a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/713/cryptocell_plat_helpers.c b/atf-20231013-0ea67d76a/drivers/auth/cryptocell/713/cryptocell_plat_helpers.c deleted file mode 100644 index 17e12807c..000000000 --- a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/713/cryptocell_plat_helpers.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include -#include - -#include -#include - -#include -#include -#include - -/* - * Return the ROTPK hash - * - * Return: 0 = success, Otherwise = error - */ -int cc_get_rotpk_hash(unsigned char *dst, unsigned int len, unsigned int *flags) -{ - CCError_t error; - uint32_t lcs; - int i; - uint32_t *key = (uint32_t *)dst; - - assert(dst != NULL); - assert(len >= HASH_RESULT_SIZE_IN_WORDS); - assert(flags != NULL); - - error = CC_BsvLcsGet(PLAT_CRYPTOCELL_BASE, &lcs); - if (error != CC_OK) - return 1; - - if ((lcs == CC_BSV_CHIP_MANUFACTURE_LCS) || (lcs == CC_BSV_RMA_LCS)) { - *flags = ROTPK_NOT_DEPLOYED; - return 0; - } - - error = CC_BsvPubKeyHashGet(PLAT_CRYPTOCELL_BASE, - CC_SB_HASH_BOOT_KEY_256B, - key, HASH_RESULT_SIZE_IN_WORDS); - - if (error == CC_BSV_HASH_NOT_PROGRAMMED_ERR) { - *flags = ROTPK_NOT_DEPLOYED; - return 0; - } - - if (error == CC_OK) { - - /* Keys are stored in OTP in little-endian format */ - for (i = 0; i < HASH_RESULT_SIZE_IN_WORDS; i++) - key[i] = le32toh(key[i]); - - *flags = ROTPK_IS_HASH; - return 0; - } - - return 1; -} - -/* - * Return the non-volatile counter value stored in the platform. The cookie - * specifies the OID of the counter in the certificate. - * - * Return: 0 = success, Otherwise = error - */ -int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr) -{ - CCError_t error = CC_FAIL; - - if (strcmp(cookie, TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = CC_BsvSwVersionGet(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_TRUSTED, nv_ctr); - } else if (strcmp(cookie, NON_TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = CC_BsvSwVersionGet(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_NON_TRUSTED, nv_ctr); - } - - return (error != CC_OK); -} - -/* - * Store a new non-volatile counter value in the counter specified by the OID - * in the cookie. This function is not expected to be called if the Lifecycle - * state is RMA as the values in the certificate are expected to always match - * the nvcounter values. But if called when the LCS is RMA, the underlying - * helper functions will return success but without updating the counter. - * - * Return: 0 = success, Otherwise = error - */ -int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr) -{ - CCError_t error = CC_FAIL; - - if (strcmp(cookie, TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = CC_BsvSwVersionSet(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_TRUSTED, nv_ctr); - } else if (strcmp(cookie, NON_TRUSTED_FW_NVCOUNTER_OID) == 0) { - error = CC_BsvSwVersionSet(PLAT_CRYPTOCELL_BASE, - CC_SW_VERSION_NON_TRUSTED, nv_ctr); - } - - return (error != CC_OK); -} - diff --git a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/cryptocell_crypto.mk b/atf-20231013-0ea67d76a/drivers/auth/cryptocell/cryptocell_crypto.mk deleted file mode 100644 index db390471f..000000000 --- a/atf-20231013-0ea67d76a/drivers/auth/cryptocell/cryptocell_crypto.mk +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause -# - -include drivers/auth/mbedtls/mbedtls_common.mk - -# The algorithm is RSA when using Cryptocell crypto driver -TF_MBEDTLS_KEY_ALG_ID := TF_MBEDTLS_RSA - -# Needs to be set to drive mbed TLS configuration correctly -$(eval $(call add_define,TF_MBEDTLS_KEY_ALG_ID)) - -$(eval $(call add_define,KEY_SIZE)) - -# CCSBROM_LIB_PATH must be set to the Cryptocell SBROM library path -ifeq (${CCSBROM_LIB_PATH},) - $(error Error: CCSBROM_LIB_PATH not set) -endif - -CRYPTOCELL_VERSION ?= 712 -ifeq (${CRYPTOCELL_VERSION},712) - CCSBROM_LIB_FILENAME := cc_712sbromx509 -else ifeq (${CRYPTOCELL_VERSION},713) - CCSBROM_LIB_FILENAME := cc_713bsv -else - $(error Error: CRYPTOCELL_VERSION set to invalid version) -endif - -CRYPTOCELL_SRC_DIR := drivers/auth/cryptocell/${CRYPTOCELL_VERSION}/ - -CRYPTOCELL_SOURCES := ${CRYPTOCELL_SRC_DIR}/cryptocell_crypto.c \ - ${CRYPTOCELL_SRC_DIR}/cryptocell_plat_helpers.c - -TF_LDFLAGS += -L$(CCSBROM_LIB_PATH) -LDLIBS += -l$(CCSBROM_LIB_FILENAME) - -BL1_SOURCES += ${CRYPTOCELL_SOURCES} -BL2_SOURCES += ${CRYPTOCELL_SOURCES} diff --git a/atf-20231013-0ea67d76a/drivers/partition/partition.c b/atf-20231013-0ea67d76a/drivers/partition/partition.c deleted file mode 100644 index 6b9863c51..000000000 --- a/atf-20231013-0ea67d76a/drivers/partition/partition.c +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (c) 2016-2022, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static uint8_t mbr_sector[PLAT_PARTITION_BLOCK_SIZE]; -static partition_entry_list_t list; - -#if LOG_LEVEL >= LOG_LEVEL_VERBOSE -static void dump_entries(int num) -{ - char name[EFI_NAMELEN]; - int i, j, len; - - VERBOSE("Partition table with %d entries:\n", num); - for (i = 0; i < num; i++) { - len = snprintf(name, EFI_NAMELEN, "%s", list.list[i].name); - for (j = 0; j < EFI_NAMELEN - len - 1; j++) { - name[len + j] = ' '; - } - name[EFI_NAMELEN - 1] = '\0'; - VERBOSE("%d: %s %" PRIx64 "-%" PRIx64 "\n", i + 1, name, list.list[i].start, - list.list[i].start + list.list[i].length - 4); - } -} -#else -#define dump_entries(num) ((void)num) -#endif - -/* - * Load the first sector that carries MBR header. - * The MBR boot signature should be always valid whether it's MBR or GPT. - */ -static int load_mbr_header(uintptr_t image_handle, mbr_entry_t *mbr_entry) -{ - size_t bytes_read; - uintptr_t offset; - int result; - - assert(mbr_entry != NULL); - /* MBR partition table is in LBA0. */ - result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); - if (result != 0) { - WARN("Failed to seek (%i)\n", result); - return result; - } - result = io_read(image_handle, (uintptr_t)&mbr_sector, - PLAT_PARTITION_BLOCK_SIZE, &bytes_read); - if (result != 0) { - WARN("Failed to read data (%i)\n", result); - return result; - } - - /* Check MBR boot signature. */ - if ((mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 2] != MBR_SIGNATURE_FIRST) || - (mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 1] != MBR_SIGNATURE_SECOND)) { - return -ENOENT; - } - offset = (uintptr_t)&mbr_sector + MBR_PRIMARY_ENTRY_OFFSET; - memcpy(mbr_entry, (void *)offset, sizeof(mbr_entry_t)); - return 0; -} - -/* - * Load GPT header and check the GPT signature and header CRC. - * If partition numbers could be found, check & update it. - */ -static int load_gpt_header(uintptr_t image_handle, uint64_t offset) -{ - gpt_header_t header; - size_t bytes_read; - int result; - uint32_t header_crc, calc_crc; - - result = io_seek(image_handle, IO_SEEK_SET, offset); - if (result != 0) { - return result; - } - result = io_read(image_handle, (uintptr_t)&header, - sizeof(gpt_header_t), &bytes_read); - if ((result != 0) || (sizeof(gpt_header_t) != bytes_read)) { - return result; - } - if (memcmp(header.signature, GPT_SIGNATURE, - sizeof(header.signature)) != 0) { - return -EINVAL; - } - - /* - * UEFI Spec 2.8 March 2019 Page 119: HeaderCRC32 value is - * computed by setting this field to 0, and computing the - * 32-bit CRC for HeaderSize bytes. - */ - header_crc = header.header_crc; - header.header_crc = 0U; - - calc_crc = tf_crc32(0U, (uint8_t *)&header, DEFAULT_GPT_HEADER_SIZE); - if (header_crc != calc_crc) { - ERROR("Invalid GPT Header CRC: Expected 0x%x but got 0x%x.\n", - header_crc, calc_crc); - return -EINVAL; - } - - header.header_crc = header_crc; - - /* partition numbers can't exceed PLAT_PARTITION_MAX_ENTRIES */ - list.entry_count = header.list_num; - if (list.entry_count > PLAT_PARTITION_MAX_ENTRIES) { - list.entry_count = PLAT_PARTITION_MAX_ENTRIES; - } - return 0; -} - -static int load_mbr_entry(uintptr_t image_handle, mbr_entry_t *mbr_entry, - int part_number) -{ - size_t bytes_read; - uintptr_t offset; - int result; - - assert(mbr_entry != NULL); - /* MBR partition table is in LBA0. */ - result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); - if (result != 0) { - WARN("Failed to seek (%i)\n", result); - return result; - } - result = io_read(image_handle, (uintptr_t)&mbr_sector, - PLAT_PARTITION_BLOCK_SIZE, &bytes_read); - if (result != 0) { - WARN("Failed to read data (%i)\n", result); - return result; - } - - /* Check MBR boot signature. */ - if ((mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 2] != MBR_SIGNATURE_FIRST) || - (mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 1] != MBR_SIGNATURE_SECOND)) { - return -ENOENT; - } - offset = (uintptr_t)&mbr_sector + - MBR_PRIMARY_ENTRY_OFFSET + - MBR_PRIMARY_ENTRY_SIZE * part_number; - memcpy(mbr_entry, (void *)offset, sizeof(mbr_entry_t)); - - return 0; -} - -static int load_mbr_entries(uintptr_t image_handle) -{ - mbr_entry_t mbr_entry; - int i; - - list.entry_count = MBR_PRIMARY_ENTRY_NUMBER; - - for (i = 0; i < list.entry_count; i++) { - load_mbr_entry(image_handle, &mbr_entry, i); - list.list[i].start = mbr_entry.first_lba * 512; - list.list[i].length = mbr_entry.sector_nums * 512; - list.list[i].name[0] = mbr_entry.type; - } - - return 0; -} - -static int load_gpt_entry(uintptr_t image_handle, gpt_entry_t *entry) -{ - size_t bytes_read; - int result; - - assert(entry != NULL); - result = io_read(image_handle, (uintptr_t)entry, sizeof(gpt_entry_t), - &bytes_read); - if (sizeof(gpt_entry_t) != bytes_read) - return -EINVAL; - return result; -} - -static int verify_partition_gpt(uintptr_t image_handle) -{ - gpt_entry_t entry; - int result, i; - - for (i = 0; i < list.entry_count; i++) { - result = load_gpt_entry(image_handle, &entry); - assert(result == 0); - result = parse_gpt_entry(&entry, &list.list[i]); - if (result != 0) { - break; - } - } - if (i == 0) { - return -EINVAL; - } - /* - * Only records the valid partition number that is loaded from - * partition table. - */ - list.entry_count = i; - dump_entries(list.entry_count); - - return 0; -} - -static int load_partition_table_internal(unsigned int image_id, - bool load_secondary_gpt) -{ - uintptr_t dev_handle, image_handle, image_spec = 0; - size_t gpt_header_offset, gpt_entry_offset; - mbr_entry_t mbr_entry; - int result; - - result = plat_get_image_source(image_id, &dev_handle, &image_spec); - if (result != 0) { - WARN("Failed to obtain reference to image id=%u (%i)\n", - image_id, result); - return result; - } - - result = io_open(dev_handle, image_spec, &image_handle); - if (result != 0) { - WARN("Failed to access image id=%u (%i)\n", image_id, result); - return result; - } - - if (!load_secondary_gpt) { - result = load_mbr_header(image_handle, &mbr_entry); - if (result != 0) { - WARN("Failed to access image id=%u (%i)\n", image_id, result); - return result; - } - } else { - mbr_entry.type = PARTITION_TYPE_GPT; - } - - if (mbr_entry.type == PARTITION_TYPE_GPT) { - if (load_secondary_gpt) { - gpt_header_offset = 32 * PLAT_PARTITION_BLOCK_SIZE; - gpt_entry_offset = 0; - } else { - gpt_header_offset = GPT_HEADER_OFFSET; - gpt_entry_offset = GPT_ENTRY_OFFSET; - } - - result = load_gpt_header(image_handle, gpt_header_offset); - assert(result == 0); - result = io_seek(image_handle, IO_SEEK_SET, gpt_entry_offset); - assert(result == 0); - result = verify_partition_gpt(image_handle); - } else { - result = load_mbr_entries(image_handle); - } - - io_close(image_handle); - return result; -} - -const partition_entry_t *get_partition_entry(const char *name) -{ - int i; - - for (i = 0; i < list.entry_count; i++) { - if (strcmp(name, list.list[i].name) == 0) { - return &list.list[i]; - } - } - return NULL; -} - -const partition_entry_t *get_partition_entry_by_type(const uuid_t *type_uuid) -{ - int i; - - for (i = 0; i < list.entry_count; i++) { - if (guidcmp(type_uuid, &list.list[i].type_guid) == 0) { - return &list.list[i]; - } - } - - return NULL; -} - -const partition_entry_t *get_partition_entry_by_uuid(const uuid_t *part_uuid) -{ - int i; - - for (i = 0; i < list.entry_count; i++) { - if (guidcmp(part_uuid, &list.list[i].part_guid) == 0) { - return &list.list[i]; - } - } - - return NULL; -} - -const partition_entry_list_t *get_partition_entry_list(void) -{ - return &list; -} - -void partition_init(unsigned int image_id) -{ - load_partition_table_internal(image_id, false); -} - -void partition_init_secondary_gpt(unsigned int image_id) -{ - load_partition_table_internal(image_id, true); -} diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-bl32.dtsi b/atf-20231013-0ea67d76a/fdts/stm32mp15-bl32.dtsi deleted file mode 100644 index 7b63f1bda..000000000 --- a/atf-20231013-0ea67d76a/fdts/stm32mp15-bl32.dtsi +++ /dev/null @@ -1,60 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) -/* - * Copyright (c) 2020-2023, STMicroelectronics - All Rights Reserved - */ - -/omit-if-no-ref/ &fmc_pins_a; -/omit-if-no-ref/ &i2c2_pins_a; -/omit-if-no-ref/ &i2c4_pins_a; -/omit-if-no-ref/ &i2c6; -/omit-if-no-ref/ &qspi_bk1_pins_a; -/omit-if-no-ref/ &qspi_bk2_pins_a; -/omit-if-no-ref/ &qspi_clk_pins_a; -/omit-if-no-ref/ &sdmmc1_b4_pins_a; -/omit-if-no-ref/ &sdmmc1_dir_pins_a; -/omit-if-no-ref/ &sdmmc1_dir_pins_b; -/omit-if-no-ref/ &sdmmc2_b4_pins_a; -/omit-if-no-ref/ &sdmmc2_b4_pins_b; -/omit-if-no-ref/ &sdmmc2_d47_pins_a; -/omit-if-no-ref/ &sdmmc2_d47_pins_b; -/omit-if-no-ref/ &sdmmc2_d47_pins_c; -/omit-if-no-ref/ &sdmmc2_d47_pins_d; -/omit-if-no-ref/ &spi6; -/omit-if-no-ref/ &uart4_pins_a; -/omit-if-no-ref/ &uart4_pins_b; -/omit-if-no-ref/ &uart7_pins_a; -/omit-if-no-ref/ &uart7_pins_b; -/omit-if-no-ref/ &uart7_pins_c; -/omit-if-no-ref/ &uart8_pins_a; -/omit-if-no-ref/ &usart2_pins_a; -/omit-if-no-ref/ &usart2_pins_b; -/omit-if-no-ref/ &usart2_pins_c; -/omit-if-no-ref/ &usart3_pins_a; -/omit-if-no-ref/ &usart3_pins_b; -/omit-if-no-ref/ &usart3_pins_c; -/omit-if-no-ref/ &usbotg_fs_dp_dm_pins_a; -/omit-if-no-ref/ &usbotg_hs_pins_a; - -/ { - aliases { - /delete-property/ mmc0; - /delete-property/ mmc1; - }; - - cpus { - /delete-node/ cpu@1; - }; - - /delete-node/ psci; - - soc { - /delete-node/ usb-otg@49000000; - /delete-node/ hash@54002000; - /delete-node/ memory-controller@58002000; - /delete-node/ spi@58003000; - /delete-node/ mmc@58005000; - /delete-node/ mmc@58007000; - /delete-node/ usbphyc@5a006000; - /delete-node/ stgen@5c008000; - }; -}; diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_crypto_boot_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_crypto_boot_defs.h deleted file mode 100644 index 2cb8938d2..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_crypto_boot_defs.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CC_CRYPTO_BOOT_DEFS_H -#define _CC_CRYPTO_BOOT_DEFS_H - -/*! @file -@brief This file contains SBROM definitions -*/ - -/*! Version counters value. */ -typedef enum { - - CC_SW_VERSION_COUNTER1 = 1, /*!< Counter 1 - trusted version. */ - CC_SW_VERSION_COUNTER2, /*!< Counter 2 - non trusted version. */ - - CC_SW_VERSION_MAX = 0x7FFFFFFF - -} CCSbSwVersionId_t; - -/* HASH boot key definition */ -typedef enum { - CC_SB_HASH_BOOT_KEY_0_128B = 0, /*!< 128-bit truncated SHA256 digest of public key 0. */ - CC_SB_HASH_BOOT_KEY_1_128B = 1, /*!< 128-bit truncated SHA256 digest of public key 1. */ - CC_SB_HASH_BOOT_KEY_256B = 2, /*!< 256-bit SHA256 digest of public key. */ - CC_SB_HASH_BOOT_NOT_USED = 0xFF, - CC_SB_HASH_MAX_NUM = 0x7FFFFFFF, /*!\internal use external 128-bit truncated SHA256 digest */ -} CCSbPubKeyIndexType_t; - - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_sb_plat.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_sb_plat.h deleted file mode 100644 index 212a710be..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_sb_plat.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/*! -@file -@brief This file contains the platform-dependent definitions that are used in the SBROM code. -*/ - -#ifndef _CC_PAL_SB_PLAT_H -#define _CC_PAL_SB_PLAT_H - -#include "cc_pal_types.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! Definition of DMA address type, can be 32 bits or 64 bits according to CryptoCell's HW. */ -typedef uint64_t CCDmaAddr_t; -/*! Definition of CryptoCell address type, can be 32 bits or 64 bits according to platform. */ -typedef uintptr_t CCAddr_t; - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_types.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_types.h deleted file mode 100644 index 8c09b23cc..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_types.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef CC_PAL_TYPES_H -#define CC_PAL_TYPES_H - -/*! -@file -@brief This file contains platform-dependent definitions and types. -*/ - -#include "cc_pal_types_plat.h" - -typedef enum { - CC_FALSE = 0, - CC_TRUE = 1 -} CCBool; - -#define CC_SUCCESS 0UL -#define CC_FAIL 1UL - -#define CC_1K_SIZE_IN_BYTES 1024 -#define CC_BITS_IN_BYTE 8 -#define CC_BITS_IN_32BIT_WORD 32 -#define CC_32BIT_WORD_SIZE (sizeof(uint32_t)) - -#define CC_OK CC_SUCCESS - -#define CC_UNUSED_PARAM(prm) ((void)prm) - -#define CC_MAX_UINT32_VAL (0xFFFFFFFF) - -#define CALC_FULL_BYTES(numBits) (((numBits) + (CC_BITS_IN_BYTE - 1))/CC_BITS_IN_BYTE) -#define CALC_FULL_32BIT_WORDS(numBits) (((numBits) + (CC_BITS_IN_32BIT_WORD - 1))/CC_BITS_IN_32BIT_WRD) -#define CALC_32BIT_WORDS_FROM_BYTES(sizeBytes) (((sizeBytes) + CC_32BIT_WORD_SIZE - 1)/CC_32BIT_WORD_SIZE) - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_types_plat.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_types_plat.h deleted file mode 100644 index f6d41d786..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_pal_types_plat.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/*! @file -@brief This file contains basic type definitions that are platform-dependent. -*/ -#ifndef _CC_PAL_TYPES_PLAT_H -#define _CC_PAL_TYPES_PLAT_H -/* Host specific types for standard (ISO-C99) compliant platforms */ - -#include -#include - -typedef uint32_t CCStatus; - -#define CCError_t CCStatus -#define CC_INFINITE 0xFFFFFFFF - -#define CEXPORT_C -#define CIMPORT_C - -#endif /*_CC_PAL_TYPES_PLAT_H*/ diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_sec_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_sec_defs.h deleted file mode 100644 index d41921855..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/cc_sec_defs.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CC_SEC_DEFS_H -#define _CC_SEC_DEFS_H - -/*! -@file -@brief This file contains general hash definitions and types. -*/ - - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! The hashblock size in words. */ -#define HASH_BLOCK_SIZE_IN_WORDS 16 -/*! The hash - SHA2 results in words. */ -#define HASH_RESULT_SIZE_IN_WORDS 8 -#define HASH_RESULT_SIZE_IN_BYTES 32 - -/*! Definition for hash result array. */ -typedef uint32_t CCHashResult_t[HASH_RESULT_SIZE_IN_WORDS]; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/crypto_driver.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/crypto_driver.h deleted file mode 100644 index 18104dd7d..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/crypto_driver.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CRYPTO_DRIVER_H -#define _CRYPTO_DRIVER_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "cc_pal_sb_plat.h" -#include "cc_sec_defs.h" - -/*---------------------------- - PUBLIC FUNCTIONS ------------------------------------*/ -/*! - * @brief This function gives the functionality of integrated hash - * - * @param[in] hwBaseAddress - CryptoCell base address - * @param[out] hashResult - the HASH result. - * - */ -CCError_t SBROM_CryptoHash(unsigned long hwBaseAddress, CCDmaAddr_t inputDataAddr, uint32_t BlockSize, - CCHashResult_t hashResult); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/nvm.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/nvm.h deleted file mode 100644 index a70289fb8..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/nvm.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _NVM__H -#define _NVM__H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "cc_crypto_boot_defs.h" -#include "cc_pal_types.h" -#include "cc_sec_defs.h" - -/*------------------------------------ - DEFINES --------------------------------------*/ - -/** - * @brief This function reads the LCS from the SRAM/NVM - * - * @param[in] hwBaseAddress - CryptoCell base address - * - * @param[in/out] lcs_ptr - pointer to memory to store the LCS - * - * @return CCError_t - On success the value CC_OK is returned, and on failure -a value from NVM_error.h - */ -CCError_t NVM_GetLCS(unsigned long hwBaseAddress, uint32_t *lcs_ptr); - -/** - * @brief The NVM_ReadHASHPubKey function is a NVM interface function - - * The function retrieves the HASH of the device Public key from the SRAM/NVM - * - * @param[in] hwBaseAddress - CryptoCell base address - * - * @param[in] pubKeyIndex - Index of HASH in the OTP - * - * @param[out] PubKeyHASH - the public key HASH. - * - * @param[in] hashSizeInWords - hash size (valid values: 4W, 8W) - * - * @return CCError_t - On success the value CC_OK is returned, and on failure -a value from NVM_error.h - */ - -CCError_t NVM_ReadHASHPubKey(unsigned long hwBaseAddress, CCSbPubKeyIndexType_t pubKeyIndex, CCHashResult_t PubKeyHASH, uint32_t hashSizeInWords); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/nvm_otp.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/nvm_otp.h deleted file mode 100644 index 390d62bc1..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/nvm_otp.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _NVM_OTP_H -#define _NVM_OTP_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "cc_crypto_boot_defs.h" -#include "cc_pal_types.h" - -/*------------------------------------ - DEFINES --------------------------------------*/ - - - -/** - * @brief The NVM_GetSwVersion function is a NVM interface function - - * The function retrieves the SW version from the SRAM/NVM. - * In case of OTP, we support up to 16 anti-rollback counters (taken from the certificate) - * - * @param[in] hwBaseAddress - CryptoCell base address - * - * @param[in] counterId - relevant only for OTP (valid values: 1,2) - * - * @param[out] swVersion - the minimum SW version - * - * @return CCError_t - On success the value CC_OK is returned, and on failure -a value from NVM_error.h - */ -CCError_t NVM_GetSwVersion(unsigned long hwBaseAddress, CCSbSwVersionId_t counterId, uint32_t *swVersion); - - -/** - * @brief The NVM_SetSwVersion function is a NVM interface function - - * The function writes the SW version into the SRAM/NVM. - * In case of OTP, we support up to 16 anti-rollback counters (taken from the certificate) - * - * @param[in] hwBaseAddress - CryptoCell base address - * - * @param[in] counterId - relevant only for OTP (valid values: 1,2) - * - * @param[in] swVersion - the minimum SW version - * - * @return CCError_t - On success the value CC_OK is returned, and on failure -a value from NVM_error.h - */ -CCError_t NVM_SetSwVersion(unsigned long hwBaseAddress, CCSbSwVersionId_t counterId, uint32_t swVersion); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/rsa.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/rsa.h deleted file mode 100644 index 825214d20..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/rsa.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef RSA_H -#define RSA_H - -/* - * All the includes that are needed for code using this module to - * compile correctly should be #included here. - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "cc_pal_types.h" - -/************************ Defines ******************************/ - -/* the modulus size in bits */ -#if (KEY_SIZE == 2048) -#define RSA_MOD_SIZE_IN_BITS 2048UL -#elif (KEY_SIZE == 3072) -#define RSA_MOD_SIZE_IN_BITS 3072UL -#else -#error Unsupported CryptoCell key size requested -#endif - -#define RSA_MOD_SIZE_IN_BYTES (CALC_FULL_BYTES(RSA_MOD_SIZE_IN_BITS)) -#define RSA_MOD_SIZE_IN_WORDS (CALC_FULL_32BIT_WORDS(RSA_MOD_SIZE_IN_BITS)) -#define RSA_MOD_SIZE_IN_256BITS (RSA_MOD_SIZE_IN_WORDS/8) -#define RSA_EXP_SIZE_IN_BITS 17UL -#define RSA_EXP_SIZE_IN_BYTES (CALC_FULL_BYTES(RSA_EXP_SIZE_IN_BITS)) - -/* - * @brief The RSA_CalcNp calculates Np value and saves it into Np_ptr: - * - * - - * @param[in] hwBaseAddress - HW base address. Relevant for HW - * implementation, for SW it is ignored. - * @N_ptr[in] - The pointer to the modulus buffer. - * @Np_ptr[out] - pointer to Np vector buffer. Its size must be >= 160. - */ -void RSA_CalcNp(unsigned long hwBaseAddress, - uint32_t *N_ptr, - uint32_t *Np_ptr); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/sbrom_bsv_api.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/sbrom_bsv_api.h deleted file mode 100644 index de835461f..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/sbrom_bsv_api.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _SBROM_BSV_API_H -#define _SBROM_BSV_API_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! @file -@brief This file contains all SBROM library APIs and definitions. -*/ -#include "cc_pal_types.h" - -/* Life cycle state definitions */ -#define CC_BSV_CHIP_MANUFACTURE_LCS 0x0 /*!< CM lifecycle value. */ -#define CC_BSV_DEVICE_MANUFACTURE_LCS 0x1 /*!< DM lifecycle value. */ -#define CC_BSV_SECURITY_DISABLED_LCS 0x3 /*!< SD lifecycle value. */ -#define CC_BSV_SECURE_LCS 0x5 /*!< Secure lifecycle value. */ -#define CC_BSV_RMA_LCS 0x7 /*!< RMA lifecycle value. */ - -/*---------------------------- - PUBLIC FUNCTIONS ------------------------------------*/ - -/*! -@brief This function should be the first ARM TrustZone CryptoCell TEE SBROM library API called. -It verifies the HW product and version numbers. - -@return CC_OK On success. -@return A non-zero value from sbrom_bsv_error.h on failure. -*/ -CCError_t CC_BsvSbromInit( - unsigned long hwBaseAddress /*!< [in] HW registers base address. */ - ); - - -/*! -@brief This function can be used for checking the LCS value, after CC_BsvLcsGetAndInit was called by the Boot ROM. - -@return CC_OK On success. -@return A non-zero value from sbrom_bsv_error.h on failure. -*/ -CCError_t CC_BsvLcsGet( - unsigned long hwBaseAddress, /*!< [in] HW registers base address. */ - uint32_t *pLcs /*!< [out] Returned lifecycle state. */ - ); - -/*! -@brief This function retrieves the HW security lifecycle state, performs validity checks, -and additional initializations in case the LCS is RMA (sets the Kce to fixed value). -\note Invalid LCS results in an error returned. -In this case, the customer's code must completely disable the device. - -@return CC_OK On success. -@return A non-zero value from sbrom_bsv_error.h on failure. -*/ -CCError_t CC_BsvLcsGetAndInit( - unsigned long hwBaseAddress, /*!< [in] HW registers base address. */ - uint32_t *pLcs /*!< [out] Returned lifecycle state. */ - ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/secureboot_base_func.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/secureboot_base_func.h deleted file mode 100644 index 6db596e0d..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/secureboot_base_func.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _SECURE_BOOT_BASE_FUNC_H -#define _SECURE_BOOT_BASE_FUNC_H - - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "cc_pal_types.h" -#include "secureboot_gen_defs.h" - - -/*---------------------------- - PUBLIC FUNCTIONS ------------------------------------*/ - -/** - * @brief This function calculates the HASH over the given data and than verify - * RSA signature on that hashed data - * - * @param[in] hwBaseAddr - CryptoCell base address - * @param[in] pData - pointer to the data to be verified - * @param[in] pNParams - a pointer to the public key parameters - * @param[in] pSignature - a pointer to the signature structure - * @param[in] sizeOfData - size of the data to calculate the HASH on (in bytes) - * @param[in] RSAAlg - RSA algorithm to use - * - * @return CCError_t - On success the value CC_OK is returned, - * on failure - a value from BootImagesVerifier_error.h - */ -CCError_t CCSbVerifySignature(unsigned long hwBaseAddress, - uint32_t *pData, - CCSbNParams_t *pNParams, - CCSbSignature_t *pSignature, - uint32_t sizeOfData, - CCSbRsaAlg_t RSAAlg); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/secureboot_gen_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/secureboot_gen_defs.h deleted file mode 100644 index ed1f2835c..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/secureboot_gen_defs.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _SECURE_BOOT_GEN_DEFS_H -#define _SECURE_BOOT_GEN_DEFS_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! @file -@brief This file contains all of the definitions and structures that are used for the secure boot. -*/ - -#include "cc_pal_sb_plat.h" -#include "cc_sec_defs.h" - - -/* General definitions */ -/***********************/ - -/*RSA definitions*/ -#if (KEY_SIZE == 2048) -#define SB_RSA_MOD_SIZE_IN_WORDS 64 -#elif (KEY_SIZE == 3072) -#define SB_RSA_MOD_SIZE_IN_WORDS 96 -#else -#error Unsupported CryptoCell key size requested -#endif - -#define SB_RSA_HW_PKI_PKA_BARRETT_MOD_TAG_SIZE_IN_WORDS 5 - - -/*! Public key data structure. */ -typedef struct { - uint32_t N[SB_RSA_MOD_SIZE_IN_WORDS]; /*!< N public key, big endian representation. */ - uint32_t Np[SB_RSA_HW_PKI_PKA_BARRETT_MOD_TAG_SIZE_IN_WORDS]; /*!< Np (Barrett n' value). */ -} CCSbNParams_t; - -/*! Signature structure. */ -typedef struct { - uint32_t sig[SB_RSA_MOD_SIZE_IN_WORDS]; /*!< RSA PSS signature. */ -} CCSbSignature_t; - - -/********* Supported algorithms definitions ***********/ - -/*! RSA supported algorithms */ -/* Note: this applies to either 2k or 3k based on CryptoCell SBROM library - * version - it means 2k in version 1 and 3k in version 2 (yes, really). - */ -typedef enum { - RSA_PSS = 0x01, /*!< RSA PSS after hash SHA 256 */ - RSA_PKCS15 = 0x02, /*!< RSA PKX15 */ - RSA_Last = 0x7FFFFFFF -} CCSbRsaAlg_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/util.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/util.h deleted file mode 100644 index 18fb5999d..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/712/util.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef UTIL_H -#define UTIL_H - -/* - * All the includes that are needed for code using this module to - * compile correctly should be #included here. - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/************************ Defines ******************************/ - -/* invers the bytes on a word- used for output from HASH */ -#ifdef BIG__ENDIAN -#define UTIL_INVERSE_UINT32_BYTES(val) (val) -#else -#define UTIL_INVERSE_UINT32_BYTES(val) \ - (((val) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24)) -#endif - -/* invers the bytes on a word - used for input data for HASH */ -#ifdef BIG__ENDIAN -#define UTIL_REVERT_UINT32_BYTES(val) \ - (((val) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24)) -#else -#define UTIL_REVERT_UINT32_BYTES(val) (val) -#endif - - /* ------------------------------------------------------------ - ** - * @brief This function executes a reverse bytes copying from one buffer to another buffer. - * - * @param[in] dst_ptr - The pointer to destination buffer. - * @param[in] src_ptr - The pointer to source buffer. - * @param[in] size - The size in bytes. - * - */ - -void UTIL_ReverseMemCopy(uint8_t *dst_ptr, uint8_t *src_ptr, uint32_t size); - - - /* ------------------------------------------------------------ - ** - * @brief This function executes a reversed byte copy on a specified buffer. - * - * on a 6 byte byffer: - * - * buff[5] <---> buff[0] - * buff[4] <---> buff[1] - * buff[3] <---> buff[2] - * - * @param[in] dst_ptr - The counter buffer. - * @param[in] src_ptr - The counter size in bytes. - * - */ -void UTIL_ReverseBuff(uint8_t *buff_ptr, uint32_t size); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_api.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_api.h deleted file mode 100644 index dc494735c..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_api.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _BSV_API_H -#define _BSV_API_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! -@file -@brief This file contains the Boot Services APIs and definitions. - -@defgroup cc_bsv_api CryptoCell Boot Services APIs and definitions -@{ -@ingroup cc_bsv -*/ - -#include "cc_pal_types.h" -#include "cc_sec_defs.h" -#include "cc_boot_defs.h" - -/* Life cycle state definitions. */ -#define CC_BSV_CHIP_MANUFACTURE_LCS 0x0 /*!< The CM life-cycle state (LCS) value. */ -#define CC_BSV_DEVICE_MANUFACTURE_LCS 0x1 /*!< The DM life-cycle state (LCS) value. */ -#define CC_BSV_SECURE_LCS 0x5 /*!< The Secure life-cycle state (LCS) value. */ -#define CC_BSV_RMA_LCS 0x7 /*!< The RMA life-cycle state (LCS) value. */ -#define CC_BSV_INVALID_LCS 0xff /*!< The invalid life-cycle state (LCS) value. */ - -/*---------------------------- - TYPES ------------------------------------*/ - -/*---------------------------- - PUBLIC FUNCTIONS ------------------------------------*/ - - -/*! -@brief This function verifies the product and version numbers of the HW, and initializes it. - -\warning This function must be the first CryptoCell-7xx SBROM library API called. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvInit( - unsigned long hwBaseAddress /*!< [in] The base address of the CryptoCell HW registers. */ - ); - -/*! -@brief This function retrieves the HW LCS and performs validity checks. - -If the LCS is RMA, it also sets the OTP secret keys to a fixed value. - -@note An error is returned if there is an invalid LCS. If this happens, your code must -completely disable the device. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvGetAndInitLcs( - unsigned long hwBaseAddress, /*!< [in] The base address of the CryptoCell HW registers. */ - uint32_t *pLcs /*!< [out] The value of the current LCS. */ - ); - -/*! -@brief This function retrieves the LCS from the NVM manager. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvLcsGet( - unsigned long hwBaseAddress, /*!< [in] The base address of the CryptoCell HW registers. */ - uint32_t *pLcs /*!< [out] The value of the current LCS. */ - ); - -/*! -@brief This function reads software revocation counter from OTP memory, according to the provided sw version index. -SW version is stored in NVM counter and represented by ones. Meaning seVersion=5 would be stored as binary 0b11111; -hence: - the maximal of trusted is 32 - the maximal of non-trusted is 224 - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvSwVersionGet( - unsigned long hwBaseAddress, /*!< [in] HW registers base address. */ - CCSbSwVersionId_t id, /*!< [in] Enumeration defining the trusted/non-trusted counter to read. */ - uint32_t *swVersion /*!< [out] The value of the requested counter as read from OTP memory. */ - ); - -/*! -@brief This function sets the NVM counter according to swVersionID (trusted/non-trusted). - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvSwVersionSet( - unsigned long hwBaseAddress, /*!< [in] HW registers base address. */ - CCSbSwVersionId_t id, /*!< [in] Enumeration defining the trusted/non-trusted counter to read. */ - uint32_t swVersion /*!< [in] New value of the counter to be programmed in OTP memory. */ - ); - -/*! -@brief This function sets the "fatal error" flag in the NVM manager, to disable the use of -any HW keys or security services. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvFatalErrorSet( - unsigned long hwBaseAddress /*!< [in] The base address of the CryptoCell HW registers. */ - ); - -/*! -@brief This function retrieves the public key hash from OTP memory, according to the provided index. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvPubKeyHashGet( - unsigned long hwBaseAddress, /*!< [in] HW registers base address. */ - CCSbPubKeyIndexType_t keyIndex, /*!< [in] Enumeration defining the key hash to retrieve: 128-bit HBK0, 128-bit HBK1, or 256-bit HBK. */ - uint32_t *hashedPubKey, /*!< [out] A buffer to contain the public key HASH. */ - uint32_t hashResultSizeWords /*!< [in] The size of the hash in 32-bit words: - - Must be 4 for 128-bit hash. - - Must be 8 for 256bit hash. */ - ); - -/*! -@brief This function permanently sets the RMA LCS for the ICV and the OEM. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvRMAModeEnable( - unsigned long hwBaseAddress /*!< [in] The base address of the CryptoCell HW registers. */ - ); - -/*! -@brief This function is called by the ICV code, to disable the OEM code from changing the ICV RMA bit flag. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvICVRMAFlagBitLock( - unsigned long hwBaseAddress /*!< [in] The base address of the CryptoCell HW registers. */ - ); - -/*! -@brief This function locks the defined ICV class keys from further usage. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvICVKeyLock( - unsigned long hwBaseAddress, /*!< [in] HW registers base address. */ - CCBool_t isICVProvisioningKeyLock, /*!< [in] Should the provisioning key be locked. */ - CCBool_t isICVCodeEncKeyLock /*!< [in] Should the encryption key be locked. */ - ); - - -/*! -@brief This function retrieves the value of "secure disable" bit. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvSecureDisableGet( - unsigned long hwBaseAddress, /*!< [in] HW registers base address. */ - CCBool_t *isSDEnabled /*!< [out] The value of the SD Enable bit. */ - ); - - -/*! -@brief This function derives the platform key (Kplt) from the Kpicv, and then decrypts the customer key (Kcst) -from the EKcst (burned in the OTP). The decryption is done only in Secure and RMA LCS mode using AES-ECB. -The customer ROM should invoke this function during early boot, prior to running any non-ROM code, only if Kcst exists. -The resulting Kcst is saved in a HW register. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvCustomerKeyDecrypt( - unsigned long hwBaseAddress /*!< [in] The base address of the CryptoCell HW registers. */ - ); -#ifdef __cplusplus -} -#endif - -/*! -@brief This function derives the unique SoC_ID for the device, as hashed (Hbk || AES_CMAC (HUK)). - -@note SoC_ID is required to create debug certificates. - -The OEM or ICV must provide a method for a developer to discover the SoC_ID of a target -device without having to first enable debugging. -One suggested implementation is to have the device ROM code compute the SoC_ID and place -it in a specific location in the flash memory, from where it can be accessed by the developer. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvSocIDCompute( - unsigned long hwBaseAddress, /*!< [in] The base address of the CryptoCell HW registers. */ - CCHashResult_t hashResult /*!< [out] The derived SoC_ID. */ - ); - -#endif /* _BSV_API_H */ - -/** -@} - */ - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_api.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_api.h deleted file mode 100644 index 1e6057931..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_api.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _BSV_CRYPTO_API_H -#define _BSV_CRYPTO_API_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! -@file -@brief This file contains the cryptographic ROM APIs of the Boot Services. - -@defgroup cc_bsv_crypto_api CryptoCell Boot Services cryptographic ROM APIs -@{ -@ingroup cc_bsv -*/ - -#include "cc_pal_types.h" -#include "cc_sec_defs.h" -#include "cc_address_defs.h" -#include "bsv_crypto_defs.h" - -/*---------------------------- - PUBLIC FUNCTIONS ------------------------------------*/ - -/*! -@brief This function calculates the SHA-256 digest over contiguous memory -in an integrated operation. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvSha256( - unsigned long hwBaseAddress, /*!< [in] The base address of the CryptoCell HW registers. */ - uint8_t *pDataIn, /*!< [in] A pointer to the input buffer to be hashed. The buffer must be contiguous. */ - size_t dataSize, /*!< [in] The size of the data to be hashed, in bytes. */ - CCHashResult_t hashBuff /*!< [out] A pointer to a word-aligned 32-byte buffer. */ - ); - - -/*! -@brief This function allows you to calculate SHA256 digest of an image with decryption base on AES-CTR, -with HW or user key. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. (in this case, hashBuff will be returned clean, while the output data should be cleaned by the user). -*/ -CCError_t CC_BsvCryptoImageDecrypt( unsigned long hwBaseAddress, /*!< [in] The base address of the CryptoCell HW registers. */ - CCBsvflowMode_t flow, /*!< [in] The supported operations are: HASH, AES to HASH, AES and HASH. */ - CCBsvKeyType_t keyType, /*!< [in] The key type to use: Kce, Kceicv, or user key. */ - uint8_t *pUserKey, /*!< [in] A pointer to the user key buffer in case keyType is CC_BSV_USER_KEY. */ - size_t userKeySize, /*!< [in] The user key size in bytes (128bits) in case keyType is CC_BSV_USER_KEY. */ - uint8_t *pIvBuf, /*!< [in] A pointer to the IV / counter buffer. */ - uint8_t *pInputData, /*!< [in] A pointer to the input data. */ - uint8_t *pOutputData, /*!< [out] A pointer to the output buffer. (optional – should be null in case of hash only). */ - size_t dataSize, /*!< [in] The size of the input data in bytes. MUST be multiple of AES block size. */ - CCHashResult_t hashBuff /*!< [out] A pointer to a word-aligned 32-byte digest output buffer. */ - ); - -#ifdef __cplusplus -} -#endif - -#endif - -/** -@} - */ - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_asym_api.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_asym_api.h deleted file mode 100644 index 406e1effb..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_asym_api.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _BSV_CRYPTO_ASYM_API_H -#define _BSV_CRYPTO_ASYM_API_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! -@file -@brief This file contains the cryptographic Asymmetric ROM APIs of the Boot Services. - -@defgroup cc_bsv_crypto_asym_api CryptoCell Boot Services cryptographic Asymmetric ROM APIs -@{ -@ingroup cc_bsv -*/ - -#include "cc_pal_types.h" -#include "cc_pka_hw_plat_defs.h" -#include "cc_sec_defs.h" -#include "bsv_crypto_api.h" - -/*! Defines the workspace size in bytes needed for internal Asymmetric operations. */ -#define BSV_RSA_WORKSPACE_MIN_SIZE (4*BSV_CERT_RSA_KEY_SIZE_IN_BYTES +\ - 2*RSA_PKA_BARRETT_MOD_TAG_BUFF_SIZE_IN_BYTES) - -/*! Definition for the RSA public modulus array. */ -typedef uint32_t CCBsvNBuff_t[BSV_CERT_RSA_KEY_SIZE_IN_WORDS]; - -/*! Definition for the RSA Barrett mod tag array. */ -typedef uint32_t CCBsvNpBuff_t[RSA_PKA_BARRETT_MOD_TAG_BUFF_SIZE_IN_BYTES]; - -/*! Definition for the RSA signature array. */ -typedef uint32_t CCBsvSignature_t[BSV_CERT_RSA_KEY_SIZE_IN_WORDS]; - - -/*---------------------------- - PUBLIC FUNCTIONS ------------------------------------*/ - -/*! -@brief This function performs the primitive operation of RSA, meaning exponent and modulus. - outBuff = (pInBuff ^ Exp) mod NBuff. ( Exp = 0x10001 ) - - The function supports 2k and 3K bit size of modulus, based on compile time define. - There are no restriction on pInBuff location, however its size must be equal to BSV_RSA_KEY_SIZE_IN_BYTES and its - value must be smaller than the modulus. - - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvRsaPrimVerify (unsigned long hwBaseAddress, /*!< [in] The base address of the CryptoCell HW registers. */ - CCBsvNBuff_t NBuff, /*!< [in] The modulus buffer big endian format. */ - CCBsvNpBuff_t NpBuff, /*!< [in] The barret tag buffer big endian format - optional. */ - uint32_t *pInBuff, /*!< [in] The DataIn buffer to be encrypted. */ - size_t inBuffSize, /*!< [in] The DataIn buffer size in bytes, must be BSV_RSA_KEY_SIZE_IN_BYTES. */ - CCBsvSignature_t pOutBuff, /*!< [out] The encrypted buffer in big endian format. */ - uint32_t *pWorkSpace, /*!< [in] The pointer to user allocated buffer for internal use. */ - size_t workBufferSize /*!< [in] The size in bytes of pWorkSpace, must be at-least BSV_RSA_WORKSPACE_MIN_SIZE. */ -); - - -/*! -@brief This function performs RSA PSS verify. - - The function should support 2k and 3K bit size of modulus, based on compile time define. - -@return \c CC_OK on success. -@return A non-zero value from bsv_error.h on failure. -*/ -CCError_t CC_BsvRsaPssVerify (unsigned long hwBaseAddress, /*!< [in] The base address of the CryptoCell HW registers. */ - CCBsvNBuff_t NBuff, /*!< [in] The modulus buffer big endian format. */ - CCBsvNpBuff_t NpBuff, /*!< [in] The barret tag buffer big endian format - optional. */ - CCBsvSignature_t signature, /*!< [in] The signature buffer to verify - big endian format. */ - CCHashResult_t hashedData, /*!< [in] The data-in buffer to be verified as sha256 digest. */ - uint32_t *pWorkSpace, /*!< [in] The pointer to user allocated buffer for internal use. */ - size_t workBufferSize, /*!< [in] The size in bytes of pWorkSpace, must be at-least BSV_RSA_WORKSPACE_MIN_SIZE. */ - CCBool_t *pIsVerified /*!< [out] The flag indicates whether the signature is verified or not. - If verified value will be CC_TRUE, otherwise CC_FALSE */ -); - - - -#ifdef __cplusplus -} -#endif - -#endif - -/** -@} - */ - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_defs.h deleted file mode 100644 index 9ea354deb..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_crypto_defs.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _BSV_CRYPTO_DEFS_H -#define _BSV_CRYPTO_DEFS_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! -@file -@brief This file contains the definitions of the cryptographic ROM APIs. - -@defgroup cc_bsv_crypto_defs CryptoCell Boot Services cryptographic ROM API definitions -@{ -@ingroup cc_bsv -*/ - -/*! AES supported HW key code table. */ -typedef enum { - - CC_BSV_USER_KEY = 0, /*!< Definition for a user key. */ - CC_BSV_HUK_KEY = 1, /*!< Definition for the HW unique key. */ - CC_BSV_RTL_KEY = 2, /*!< Definition for the RTL key. */ - CC_BSV_SESSION_KEY = 3, /*!< Definition for the Session key. */ - CC_BSV_CE_KEY = 4, /*!< Definition for the Kce. */ - CC_BSV_PLT_KEY = 5, /*!< Definition for the Platform key. */ - CC_BSV_KCST_KEY = 6, /*!< Definition for Kcst. */ - CC_BSV_ICV_PROV_KEY = 0xd, /*!< Definition for the Kpicv. */ - CC_BSV_ICV_CE_KEY = 0xe, /*!< Definition for the Kceicv. */ - CC_BSV_PROV_KEY = 0xf, /*!< Definition for the Kcp. */ - CC_BSV_END_OF_KEY_TYPE = INT32_MAX, /*!< Reserved. */ -}CCBsvKeyType_t; - -/*! AES directions. */ -typedef enum bsvAesDirection { - BSV_AES_DIRECTION_ENCRYPT = 0, /*!< Encrypt.*/ - BSV_AES_DIRECTION_DECRYPT = 1, /*!< Decrypt.*/ - BSV_AES_NUM_OF_ENCRYPT_MODES, /*!< The maximal number of operations. */ - BSV_AES_DIRECTION_RESERVE32B = INT32_MAX /*!< Reserved.*/ -}bsvAesDirection_t; - -/*! Definitions of the cryptographic flow supported as part of the Secure Boot. */ -typedef enum { - CC_BSV_CRYPTO_HASH_MODE = 0, /*!< Hash mode only. */ - CC_BSV_CRYPTO_AES_CTR_AND_HASH_MODE = 1, /*!< Data goes into the AES and Hash engines. */ - CC_BSV_CRYPTO_AES_CTR_TO_HASH_MODE = 2 /*!< Data goes into the AES and from the AES to the Hash engine. */ -}CCBsvflowMode_t; - -/*! CryptoImage HW completion sequence mode */ -typedef enum -{ - BSV_CRYPTO_COMPLETION_NO_WAIT = 0, /*!< The driver waits only before reading the output. */ - BSV_CRYPTO_COMPLETION_WAIT_UPON_END = 1 /*!< The driver waits after each chunk of data. */ -}bsvCryptoCompletionMode_t; - - -/*! AES-CMAC result size, in words. */ -#define CC_BSV_CMAC_RESULT_SIZE_IN_WORDS 4 /* 128b */ -/*! AES-CMAC result size, in bytes. */ -#define CC_BSV_CMAC_RESULT_SIZE_IN_BYTES 16 /* 128b */ -/*! AES-CCM 128bit key size, in bytes. */ -#define CC_BSV_CCM_KEY_SIZE_BYTES 16 -/*! AES-CCM 128bit key size, in words. */ -#define CC_BSV_CCM_KEY_SIZE_WORDS 4 -/*! AES-CCM NONCE size, in bytes. */ -#define CC_BSV_CCM_NONCE_SIZE_BYTES 12 - - -/*! AES-CMAC result buffer. */ -typedef uint32_t CCBsvCmacResult_t[CC_BSV_CMAC_RESULT_SIZE_IN_WORDS]; -/*! AES-CCM key buffer.*/ -typedef uint32_t CCBsvCcmKey_t[CC_BSV_CCM_KEY_SIZE_WORDS]; -/*! AES-CCM nonce buffer.*/ -typedef uint8_t CCBsvCcmNonce_t[CC_BSV_CCM_NONCE_SIZE_BYTES]; -/*! AES-CCM MAC buffer.*/ -typedef uint8_t CCBsvCcmMacRes_t[CC_BSV_CMAC_RESULT_SIZE_IN_BYTES]; - - -#ifdef __cplusplus -} -#endif - -#endif - -/** -@} - */ - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_error.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_error.h deleted file mode 100644 index 4d72e60aa..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/bsv_error.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _BSV_ERROR_H -#define _BSV_ERROR_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! -@file -@brief This file defines the error code types that are returned from the Boot Services APIs. - -@defgroup cc_bsv_error CryptoCell Boot Services error codes -@{ -@ingroup cc_bsv -*/ - -/*! Defines the base address for Boot Services errors. */ -#define CC_BSV_BASE_ERROR 0x0B000000 -/*! Defines the base address for Boot Services cryptographic errors. */ -#define CC_BSV_CRYPTO_ERROR 0x0C000000 - -/*! Illegal input parameter. */ -#define CC_BSV_ILLEGAL_INPUT_PARAM_ERR (CC_BSV_BASE_ERROR + 0x00000001) -/*! Illegal HUK value. */ -#define CC_BSV_ILLEGAL_HUK_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000002) -/*! Illegal Kcp value. */ -#define CC_BSV_ILLEGAL_KCP_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000003) -/*! Illegal Kce value. */ -#define CC_BSV_ILLEGAL_KCE_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000004) -/*! Illegal Kpicv value. */ -#define CC_BSV_ILLEGAL_KPICV_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000005) -/*! Illegal Kceicv value. */ -#define CC_BSV_ILLEGAL_KCEICV_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000006) -/*! Illegal EKcst value. */ -#define CC_BSV_ILLEGAL_EKCST_VALUE_ERR (CC_BSV_BASE_ERROR + 0x00000007) -/*! Hash boot key not programmed in the OTP. */ -#define CC_BSV_HASH_NOT_PROGRAMMED_ERR (CC_BSV_BASE_ERROR + 0x00000008) -/*! Illegal Hash boot key zero count in the OTP. */ -#define CC_BSV_HBK_ZERO_COUNT_ERR (CC_BSV_BASE_ERROR + 0x00000009) -/*! Illegal LCS. */ -#define CC_BSV_ILLEGAL_LCS_ERR (CC_BSV_BASE_ERROR + 0x0000000A) -/*! OTP write compare failure. */ -#define CC_BSV_OTP_WRITE_CMP_FAIL_ERR (CC_BSV_BASE_ERROR + 0x0000000B) -/*! OTP access error */ -#define CC_BSV_OTP_ACCESS_ERR (CC_BSV_BASE_ERROR + 0x0000000C) -/*! Erase key in OTP failed. */ -#define CC_BSV_ERASE_KEY_FAILED_ERR (CC_BSV_BASE_ERROR + 0x0000000D) -/*! Illegal PIDR. */ -#define CC_BSV_ILLEGAL_PIDR_ERR (CC_BSV_BASE_ERROR + 0x0000000E) -/*! Illegal CIDR. */ -#define CC_BSV_ILLEGAL_CIDR_ERR (CC_BSV_BASE_ERROR + 0x0000000F) -/*! Device failed to move to fatal error state. */ -#define CC_BSV_FAILED_TO_SET_FATAL_ERR (CC_BSV_BASE_ERROR + 0x00000010) -/*! Failed to set RMA LCS. */ -#define CC_BSV_FAILED_TO_SET_RMA_ERR (CC_BSV_BASE_ERROR + 0x00000011) -/*! Illegal RMA indication. */ -#define CC_BSV_ILLEGAL_RMA_INDICATION_ERR (CC_BSV_BASE_ERROR + 0x00000012) -/*! Boot Services version is not initialized. */ -#define CC_BSV_VER_IS_NOT_INITIALIZED_ERR (CC_BSV_BASE_ERROR + 0x00000013) -/*! APB secure mode is locked. */ -#define CC_BSV_APB_SECURE_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000014) -/*! APB privilege mode is locked. */ -#define CC_BSV_APB_PRIVILEG_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000015) -/*! Illegal operation. */ -#define CC_BSV_ILLEGAL_OPERATION_ERR (CC_BSV_BASE_ERROR + 0x00000016) -/*! Illegal asset size. */ -#define CC_BSV_ILLEGAL_ASSET_SIZE_ERR (CC_BSV_BASE_ERROR + 0x00000017) -/*! Illegal asset value. */ -#define CC_BSV_ILLEGAL_ASSET_VAL_ERR (CC_BSV_BASE_ERROR + 0x00000018) -/*! Kpicv is locked. */ -#define CC_BSV_KPICV_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000019) -/*! Illegal SW version. */ -#define CC_BSV_ILLEGAL_SW_VERSION_ERR (CC_BSV_BASE_ERROR + 0x0000001A) -/*! AO write operation. */ -#define CC_BSV_AO_WRITE_FAILED_ERR (CC_BSV_BASE_ERROR + 0x0000001B) -/*! Chip state is already initialized. */ -#define CC_BSV_CHIP_INITIALIZED_ERR (CC_BSV_BASE_ERROR + 0x0000001C) -/*! SP is not enabled. */ -#define CC_BSV_SP_NOT_ENABLED_ERR (CC_BSV_BASE_ERROR + 0x0000001D) -/*! Production secure provisioning - header fields. */ -#define CC_BSV_PROD_PKG_HEADER_ERR (CC_BSV_BASE_ERROR + 0x0000001E) -/*! Production secure provisioning - header MAC. */ -#define CC_BSV_PROD_PKG_HEADER_MAC_ERR (CC_BSV_BASE_ERROR + 0x0000001F) -/*! Overrun buffer or size. */ -#define CC_BSV_OVERRUN_ERR (CC_BSV_BASE_ERROR + 0x00000020) -/*! Kceicv is locked. */ -#define CC_BSV_KCEICV_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000021) -/*! Chip indication is CHIP_STATE_ERROR. */ -#define CC_BSV_CHIP_INDICATION_ERR (CC_BSV_BASE_ERROR + 0x00000022) -/*! Device is locked in fatal error state. */ -#define CC_BSV_FATAL_ERR_IS_LOCKED_ERR (CC_BSV_BASE_ERROR + 0x00000023) -/*! Device has security disable feature enabled. */ -#define CC_BSV_SECURE_DISABLE_ERROR (CC_BSV_BASE_ERROR + 0x00000024) -/*! Device has Kcst in disabled state */ -#define CC_BSV_KCST_DISABLE_ERROR (CC_BSV_BASE_ERROR + 0x00000025) - - -/*! Illegal data-in pointer. */ -#define CC_BSV_CRYPTO_INVALID_DATA_IN_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000001) -/*! Illegal data-out pointer. */ -#define CC_BSV_CRYPTO_INVALID_DATA_OUT_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000002) -/*! Illegal data size. */ -#define CC_BSV_CRYPTO_INVALID_DATA_SIZE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000003) -/*! Illegal key type. */ -#define CC_BSV_CRYPTO_INVALID_KEY_TYPE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000004) -/*! Illegal key size. */ -#define CC_BSV_CRYPTO_INVALID_KEY_SIZE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000005) -/*! Invalid key pointer. */ -#define CC_BSV_CRYPTO_INVALID_KEY_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000006) -/*! Illegal key DMA type. */ -#define CC_BSV_CRYPTO_INVALID_KEY_DMA_TYPE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000007) -/*! Illegal IV pointer. */ -#define CC_BSV_CRYPTO_INVALID_IV_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000008) -/*! Illegal cipher mode. */ -#define CC_BSV_CRYPTO_INVALID_CIPHER_MODE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000009) -/*! Illegal result buffer pointer. */ -#define CC_BSV_CRYPTO_INVALID_RESULT_BUFFER_POINTER_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000A) -/*! Invalid DMA type. */ -#define CC_BSV_CRYPTO_INVALID_DMA_TYPE_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000B) -/*! Invalid in/out buffers overlapping. */ -#define CC_BSV_CRYPTO_DATA_OUT_DATA_IN_OVERLAP_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000C) -/*! Invalid KDF label size. */ -#define CC_BSV_CRYPTO_ILLEGAL_KDF_LABEL_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000D) -/*! Invalid KDF Context size. */ -#define CC_BSV_CRYPTO_ILLEGAL_KDF_CONTEXT_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000E) -/*! Invalid CCM key. */ -#define CC_BSV_CCM_INVALID_KEY_ERROR (CC_BSV_CRYPTO_ERROR + 0x0000000f) -/*! Invalid CCM Nonce. */ -#define CC_BSV_CCM_INVALID_NONCE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000010) -/*! Invalid CCM associated data. */ -#define CC_BSV_CCM_INVALID_ASSOC_DATA_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000011) -/*! Invalid CCM text data. */ -#define CC_BSV_CCM_INVALID_TEXT_DATA_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000012) -/*! Invalid CCM-MAC buffer. */ -#define CC_BSV_CCM_INVALID_MAC_BUF_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000013) -/*! CCM-MAC comparison failed. */ -#define CC_BSV_CCM_TAG_LENGTH_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000014) -/*! CCM-MAC comparison failed. */ -#define CC_BSV_CCM_MAC_INVALID_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000015) -/*! Illegal flow mode. */ -#define CC_BSV_CRYPTO_INVALID_FLOW_MODE_ERROR (CC_BSV_CRYPTO_ERROR + 0x00000016) - -#ifdef __cplusplus -} -#endif - -#endif - -/** -@} - */ - - - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_address_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_address_defs.h deleted file mode 100644 index 0abc15c70..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_address_defs.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CC_ADDRESS_DEFS_H -#define _CC_ADDRESS_DEFS_H - -/*! -@file -@brief This file contains general definitions. -*/ - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "cc_pal_types.h" - -/************************ Defines ******************************/ - -/** - * Address types within CC - */ -/*! Definition of DMA address type, can be 32 bits or 64 bits according to CryptoCell's HW. */ -typedef uint64_t CCDmaAddr_t; -/*! Definition of CryptoCell address type, can be 32 bits or 64 bits according to platform. */ -typedef uint64_t CCAddr_t; -/*! Definition of CC SRAM address type, can be 32 bits according to CryptoCell's HW. */ -typedef uint32_t CCSramAddr_t; - -/* - * CCSramAddr_t is being cast into pointer type which can be 64 bit. - */ -/*! Definition of MACRO that casts SRAM addresses to pointer types. */ -#define CCSramAddr2Ptr(sramAddr) ((uintptr_t)sramAddr) - -#ifdef __cplusplus -} -#endif - -#endif - -/** - @} - */ - - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_boot_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_boot_defs.h deleted file mode 100644 index 4d29a6d00..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_boot_defs.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CC_BOOT_DEFS_H -#define _CC_BOOT_DEFS_H - -/*! - @file - @brief This file contains general definitions of types and enums of Boot APIs. - */ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/*! Version counters value. */ -typedef enum { - - CC_SW_VERSION_TRUSTED = 0, /*!< Trusted counter. */ - CC_SW_VERSION_NON_TRUSTED, /*!< Non trusted counter. */ - CC_SW_VERSION_MAX = 0x7FFFFFFF /*!< Reserved */ -} CCSbSwVersionId_t; - -/*! The hash boot key definition. */ -typedef enum { - CC_SB_HASH_BOOT_KEY_0_128B = 0, /*!< Hbk0: 128-bit truncated SHA-256 digest of PubKB0. Used by ICV */ - CC_SB_HASH_BOOT_KEY_1_128B = 1, /*!< Hbk1: 128-bit truncated SHA-256 digest of PubKB1. Used by OEM */ - CC_SB_HASH_BOOT_KEY_256B = 2, /*!< Hbk: 256-bit SHA-256 digest of public key. */ - CC_SB_HASH_BOOT_NOT_USED = 0xF, /*!< Hbk is not used. */ - CC_SB_HASH_MAX_NUM = 0x7FFFFFFF, /*!< Reserved. */ -} CCSbPubKeyIndexType_t; - -/*! Chip state. */ -typedef enum { - CHIP_STATE_NOT_INITIALIZED = 0, /*! Chip is not initialized. */ - CHIP_STATE_TEST = 1, /*! Chip is in Production state. */ - CHIP_STATE_PRODUCTION = 2, /*! Chip is in Production state. */ - CHIP_STATE_ERROR = 3, /*! Chip is in Error state. */ -} CCBsvChipState_t; -#ifdef __cplusplus -} -#endif - -#endif /*_CC_BOOT_DEFS_H */ - -/** -@} - */ diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pal_types.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pal_types.h deleted file mode 100644 index 4ab3960d3..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pal_types.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef CC_PAL_TYPES_H -#define CC_PAL_TYPES_H - -/*! -@file -@brief This file contains platform-dependent definitions and types of the PAL layer. - -@defgroup cc_pal_types CryptoCell platform-dependent PAL layer definitions and types -@{ -@ingroup cc_pal - - @{ - @ingroup cc_pal - @} -*/ - -#include "cc_pal_types_plat.h" - -/*! Definition of Boolean type.*/ -typedef enum { - /*! Boolean false.*/ - CC_FALSE = 0, - /*! Boolean true.*/ - CC_TRUE = 1 -} CCBool_t; - -/*! Success. */ -#define CC_SUCCESS 0UL -/*! Failure. */ -#define CC_FAIL 1UL - -/*! Success (OK). */ -#define CC_OK 0 - -/*! This macro handles unused parameters in the code, to avoid compilation warnings. */ -#define CC_UNUSED_PARAM(prm) ((void)prm) - -/*! The maximal uint32 value.*/ -#define CC_MAX_UINT32_VAL (0xFFFFFFFF) - - -/* Minimal and Maximal macros */ -#ifdef min -/*! Definition for minimal calculation. */ -#define CC_MIN(a,b) min( a , b ) -#else -/*! Definition for minimal calculation. */ -#define CC_MIN( a , b ) ( ( (a) < (b) ) ? (a) : (b) ) -#endif - -#ifdef max -/*! Definition for maximal calculation. */ -#define CC_MAX(a,b) max( a , b ) -#else -/*! Definition for maximal calculation.. */ -#define CC_MAX( a , b ) ( ( (a) > (b) ) ? (a) : (b) ) -#endif - -/*! This macro calculates the number of full Bytes from bits, where seven bits are one Byte. */ -#define CALC_FULL_BYTES(numBits) ((numBits)/CC_BITS_IN_BYTE + (((numBits) & (CC_BITS_IN_BYTE-1)) > 0)) -/*! This macro calculates the number of full 32-bit words from bits where 31 bits are one word. */ -#define CALC_FULL_32BIT_WORDS(numBits) ((numBits)/CC_BITS_IN_32BIT_WORD + (((numBits) & (CC_BITS_IN_32BIT_WORD-1)) > 0)) -/*! This macro calculates the number of full 32-bit words from Bytes where three Bytes are one word. */ -#define CALC_32BIT_WORDS_FROM_BYTES(sizeBytes) ((sizeBytes)/CC_32BIT_WORD_SIZE + (((sizeBytes) & (CC_32BIT_WORD_SIZE-1)) > 0)) -/*! This macro calculates the number of full 32-bit words from 64-bits dwords. */ -#define CALC_32BIT_WORDS_FROM_64BIT_DWORD(sizeWords) (sizeWords * CC_32BIT_WORD_IN_64BIT_DWORD) -/*! This macro rounds up bits to 32-bit words. */ -#define ROUNDUP_BITS_TO_32BIT_WORD(numBits) (CALC_FULL_32BIT_WORDS(numBits) * CC_BITS_IN_32BIT_WORD) -/*! This macro rounds up bits to Bytes. */ -#define ROUNDUP_BITS_TO_BYTES(numBits) (CALC_FULL_BYTES(numBits) * CC_BITS_IN_BYTE) -/*! This macro rounds up bytes to 32-bit words. */ -#define ROUNDUP_BYTES_TO_32BIT_WORD(sizeBytes) (CALC_32BIT_WORDS_FROM_BYTES(sizeBytes) * CC_32BIT_WORD_SIZE) -/*! This macro calculates the number Bytes from words. */ -#define CALC_WORDS_TO_BYTES(numwords) ((numwords)*CC_32BIT_WORD_SIZE) -/*! Definition of 1 KB in Bytes. */ -#define CC_1K_SIZE_IN_BYTES 1024 -/*! Definition of number of bits in a Byte. */ -#define CC_BITS_IN_BYTE 8 -/*! Definition of number of bits in a 32-bits word. */ -#define CC_BITS_IN_32BIT_WORD 32 -/*! Definition of number of Bytes in a 32-bits word. */ -#define CC_32BIT_WORD_SIZE 4 -/*! Definition of number of 32-bits words in a 64-bits dword. */ -#define CC_32BIT_WORD_IN_64BIT_DWORD 2 - - -#endif - -/** -@} - */ - - - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pal_types_plat.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pal_types_plat.h deleted file mode 100644 index 0c102a092..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pal_types_plat.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/*! @file -@brief This file contains basic type definitions that are platform-dependent. -*/ -#ifndef _CC_PAL_TYPES_PLAT_H -#define _CC_PAL_TYPES_PLAT_H -/* Host specific types for standard (ISO-C99) compliant platforms */ - -#include -#include - -typedef uint32_t CCStatus; - -#define CCError_t CCStatus -#define CC_INFINITE 0xFFFFFFFF - -#define CEXPORT_C -#define CIMPORT_C - -#endif /*_CC_PAL_TYPES_PLAT_H*/ diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pka_hw_plat_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pka_hw_plat_defs.h deleted file mode 100644 index 1a1bce0ab..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_pka_hw_plat_defs.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CC_PKA_HW_PLAT_DEFS_H -#define _CC_PKA_HW_PLAT_DEFS_H - -#ifdef __cplusplus -extern "C" -{ -#endif - - -#include "cc_pal_types.h" -/*! -@file -@brief Contains the enums and definitions that are used in the PKA code (definitions that are platform dependent). -*/ - -/*! The size of the PKA engine word. */ -#define CC_PKA_WORD_SIZE_IN_BITS 128 - -/*! The maximal supported size of modulus in RSA in bits. */ -#define CC_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BITS 4096 -/*! The maximal supported size of key-generation in RSA in bits. */ -#define CC_RSA_MAX_KEY_GENERATION_HW_SIZE_BITS 4096 - -/*! Secure boot/debug certificate RSA public modulus key size in bits. */ -#if (KEY_SIZE == 3072) - #define BSV_CERT_RSA_KEY_SIZE_IN_BITS 3072 -#else - #define BSV_CERT_RSA_KEY_SIZE_IN_BITS 2048 -#endif -/*! Secure boot/debug certificate RSA public modulus key size in bytes. */ -#define BSV_CERT_RSA_KEY_SIZE_IN_BYTES (BSV_CERT_RSA_KEY_SIZE_IN_BITS/CC_BITS_IN_BYTE) -/*! Secure boot/debug certificate RSA public modulus key size in words. */ -#define BSV_CERT_RSA_KEY_SIZE_IN_WORDS (BSV_CERT_RSA_KEY_SIZE_IN_BITS/CC_BITS_IN_32BIT_WORD) - -/*! The maximal count of extra bits in PKA operations. */ -#define PKA_EXTRA_BITS 8 -/*! The number of memory registers in PKA operations. */ -#define PKA_MAX_COUNT_OF_PHYS_MEM_REGS 32 - -/*! Size of buffer for Barrett modulus tag in words. */ -#define RSA_PKA_BARRETT_MOD_TAG_BUFF_SIZE_IN_WORDS 5 -/*! Size of buffer for Barrett modulus tag in bytes. */ -#define RSA_PKA_BARRETT_MOD_TAG_BUFF_SIZE_IN_BYTES (RSA_PKA_BARRETT_MOD_TAG_BUFF_SIZE_IN_WORDS*CC_32BIT_WORD_SIZE) - - - -#ifdef __cplusplus -} -#endif - -#endif //_CC_PKA_HW_PLAT_DEFS_H - -/** - @} - */ - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_sec_defs.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_sec_defs.h deleted file mode 100644 index 8fb698ff5..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/713/cc_sec_defs.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2017-2020 ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CC_SEC_DEFS_H -#define _CC_SEC_DEFS_H - -/*! -@file -@brief This file contains general definitions and types. -*/ - - -#ifdef __cplusplus -extern "C" -{ -#endif - -#include "cc_pal_types.h" - -/*! Hashblock size in words. */ -#define HASH_BLOCK_SIZE_IN_WORDS 16 -/*! Hash - SHA2 results in words. */ -#define HASH_RESULT_SIZE_IN_WORDS 8 -/*! Hash - SHA2 results in bytes. */ -#define HASH_RESULT_SIZE_IN_BYTES 32 - -/*! Definition for hash result array. */ -typedef uint32_t CCHashResult_t[HASH_RESULT_SIZE_IN_WORDS]; - -/*! Definition for converting pointer to Host address. */ -#define CONVERT_TO_ADDR(ptr) (unsigned long)ptr - -/*! Definition for converting pointer to SRAM address. */ -#define CONVERT_TO_SRAM_ADDR(ptr) (0xFFFFFFFF & ptr) - -/*! The data size of the signed SW image, in bytes. */ -/*!\internal ContentCertImageRecord_t includes: HS(8W) + 64-b dstAddr(2W) + imgSize(1W) + isCodeEncUsed(1W) */ -#define SW_REC_SIGNED_DATA_SIZE_IN_BYTES 48 - -/*! The data size of the unsigned SW image, in bytes. */ -/*!\internal CCSbSwImgAddData_t includes: 64-b srcAddr(2W)*/ -#define SW_REC_NONE_SIGNED_DATA_SIZE_IN_BYTES 8 - -/*! The additional data size - storage address and length of the unsigned SW image, in words. */ -#define SW_REC_NONE_SIGNED_DATA_SIZE_IN_WORDS SW_REC_NONE_SIGNED_DATA_SIZE_IN_BYTES/CC_32BIT_WORD_SIZE - -/*! The additional data section size, in bytes. */ -#define CC_SB_MAX_SIZE_ADDITIONAL_DATA_BYTES 128 - -/*! Indication of whether or not to load the SW image to memory. */ -#define CC_SW_COMP_NO_MEM_LOAD_INDICATION 0xFFFFFFFFFFFFFFFFUL - -/*! Indication of product version, stored in certificate version field. */ -#define CC_SB_CERT_VERSION_PROJ_PRD 0x713 - -#ifdef __cplusplus -} -#endif - -#endif - -/** -@} - */ - - - diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/cc_rotpk.h b/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/cc_rotpk.h deleted file mode 100644 index 93984960e..000000000 --- a/atf-20231013-0ea67d76a/include/drivers/arm/cryptocell/cc_rotpk.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef _CC_ROTPK_H -#define _CC_ROTPK_H - -int cc_get_rotpk_hash(unsigned char *dst, unsigned int len, - unsigned int *flags); - -#endif diff --git a/atf-20231013-0ea67d76a/makefile b/atf-20231013-0ea67d76a/makefile deleted file mode 100644 index 126a40523..000000000 --- a/atf-20231013-0ea67d76a/makefile +++ /dev/null @@ -1,167 +0,0 @@ -TOPDIR := $(CURDIR) -KCONFIG := $(TOPDIR)/config.in -MENUCONFIG := $(TOPDIR)/Kconfiglib/menuconfig.py -SAVEDEFCONFIG := $(TOPDIR)/Kconfiglib/savedefconfig.py -OLDCONFIG := $(TOPDIR)/Kconfiglib/oldconfig.py -DEFCONFIG := $(TOPDIR)/Kconfiglib/defconfig.py - -ifneq ("$(wildcard $(TOPDIR)/.config)", "") -include $(TOPDIR)/.config -MTK_CONFIG_EXIST := y -MAKE_ARGS := PLAT=$(CONFIG_PLAT) -TARGET_ARGS := -MAKE_ARGS += CROSS_COMPILE=$(CONFIG_CROSS_COMPILER) -ifeq (${CONFIG_FPGA},y) -FPGA = 1 -MAKE_ARGS += FPGA=$(FPGA) -endif -ifeq (${CONFIG_NEED_SBC},y) -MAKE_ARGS += TRUSTED_BOARD_BOOT=1 -MAKE_ARGS += GENERATE_COT=1 -MAKE_ARGS += ROT_KEY=$(CONFIG_ROT_KEY) -MAKE_ARGS += BROM_SIGN_KEY=$(CONFIG_BROM_SIGN_KEY) -endif -ifeq (${CONFIG_NEED_MBEDTLS},y) -MAKE_ARGS += MBEDTLS_DIR=$(CONFIG_MBEDTLS_DIR) -endif -MAKE_ARGS += BOOT_DEVICE=$(CONFIG_BOOT_DEVICE) -ifeq (${CONFIG_FLASH_DEVICE_SNFI_SNAND},y) -MAKE_ARGS += NAND_TYPE=$(CONFIG_SNFI_SNAND_TYPE) -endif -ifeq (${CONFIG_NMBM},y) -NMBM := 1 -MAKE_ARGS += NMBM=$(NMBM) -endif -ifeq (${CONFIG_FLASH_DEVICE_SPIM_NAND},y) -MAKE_ARGS += NAND_TYPE=$(CONFIG_SPIM_NAND_TYPE) -endif -ifeq (${CONFIG_DRAM_DDR3},y) -MAKE_ARGS += DRAM_USE_DDR4=0 -endif -ifeq (${CONFIG_DRAM_DDR3_FLYBY},y) -MAKE_ARGS += DRAM_USE_DDR4=0 -MAKE_ARGS += DDR3_FLYBY=1 -endif -ifeq (${CONFIG_DRAM_DDR4},y) -MAKE_ARGS += DRAM_USE_DDR4=1 -endif -ifeq (${CONFIG_DDR3_FREQ_2133},y) -MAKE_ARGS += DDR3_FREQ_2133=1 -endif -ifeq (${CONFIG_DDR3_FREQ_1866},y) -MAKE_ARGS += DDR3_FREQ_1866=1 -endif -ifeq (${CONFIG_DDR4_FREQ_2666},y) -MAKE_ARGS += DDR4_FREQ_2666=1 -endif -ifeq (${CONFIG_DDR4_FREQ_3200},y) -MAKE_ARGS += DDR4_FREQ_3200=1 -endif -ifeq (${CONFIG_QFN},y) -MAKE_ARGS += BOARD_QFN=1 -endif -ifeq (${CONFIG_BGA},y) -MAKE_ARGS += BOARD_BGA=1 -endif -ifeq (${CONFIG_DRAM_SIZE_AUTO},y) -endif -ifeq (${CONFIG_DRAM_SIZE_256},y) -MAKE_ARGS += DRAM_SIZE_LIMIT=256 -endif -ifeq (${CONFIG_DRAM_SIZE_512},y) -MAKE_ARGS += DRAM_SIZE_LIMIT=512 -endif -ifeq (${CONFIG_DRAM_SIZE_1024},y) -MAKE_ARGS += DRAM_SIZE_LIMIT=1024 -endif -ifeq (${CONFIG_DRAM_SIZE_2048},y) -MAKE_ARGS += DRAM_SIZE_LIMIT=2048 -endif -ifeq (${CONFIG_LOG_LEVEL_NONE},y) -MAKE_ARGS += LOG_LEVEL=0 -endif -ifeq (${CONFIG_LOG_LEVEL_ERROR},y) -MAKE_ARGS += LOG_LEVEL=10 -endif -ifeq (${CONFIG_LOG_LEVEL_NOTICE},y) -MAKE_ARGS += LOG_LEVEL=20 -endif -ifeq (${CONFIG_LOG_LEVEL_WARNING},y) -MAKE_ARGS += LOG_LEVEL=30 -endif -ifeq (${CONFIG_LOG_LEVEL_INFO},y) -MAKE_ARGS += LOG_LEVEL=40 -endif -ifeq (${CONFIG_LOG_LEVEL_VERBOSE},y) -MAKE_ARGS += LOG_LEVEL=50 -endif -ifeq (${CONFIG_DRAM_DEBUG_LOG},y) -MAKE_ARGS += DRAM_DEBUG_LOG=1 -endif - -ifeq ($(CONFIG_NEED_BL33),y) -MAKE_ARGS += BL33=$(CONFIG_BL33) -endif - -ifeq ($(CONFIG_AARCH32),y) -MAKE_ARGS += ARCH=aarch32 -endif - -ifeq ($(CONFIG_NEED_BL2),y) -TARGET_ARGS += bl2 -endif - -ifeq ($(CONFIG_NEED_FIP),y) -TARGET_ARGS += bl31 fip -else -ifeq ($(CONFIG_NEED_BL31),y) -TARGET_ARGS += bl31 -endif -endif - -endif - -PYTHON := $(shell which python3) - -ifeq (${MTK_CONFIG_EXIST},y) - -all: atf - -atf: clean - make -f $(TOPDIR)/Makefile $(MAKE_ARGS) $(TARGET_ARGS) - -clean: - make -f $(TOPDIR)/Makefile $(MAKE_ARGS) clean - -else - -# ignore %_defconfig, defconfig and menuconfig to prevent re-define / overwrite -$(filter-out %config, $(MAKECMDGOALS)): - make -f $(TOPDIR)/Makefile ${MAKEOVERRIDES} $(MAKECMDGOALS) - -endif - -check_python: -ifeq ($(PYTHON),) - @echo ">> Unable to find python" - @echo ">> You must have python installed in order" - @echo ">> to use 'make menuconfig'" - @exit 1; -endif - -%_defconfig: check_python - $(PYTHON) $(DEFCONFIG) $(TOPDIR)/configs/$@ --kconfig $(KCONFIG) - $(PYTHON) $(OLDCONFIG) $(KCONFIG) - -defconfig: - $(PYTHON) $(DEFCONFIG) --kconfig $(KCONFIG) - -menuconfig: check_python - $(PYTHON) $(MENUCONFIG) $(KCONFIG) - -savedefconfig: check_python - $(PYTHON) $(SAVEDEFCONFIG) --kconfig $(KCONFIG) \ - --out $(TOPDIR)/defconfig - -%_defconfig_update: check_python savedefconfig - cp $(TOPDIR)/defconfig $(TOPDIR)/configs/$(subst _update,,$@) diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_full_dev_rsa_rotpk.S b/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_full_dev_rsa_rotpk.S deleted file mode 100644 index 4bb04dc56..000000000 --- a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_full_dev_rsa_rotpk.S +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2022, Arm Limited. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -/* corstone1000 platform provides custom values for the macros defined in - * arm_def.h , so only platform_def.h needs to be included - */ -#if !defined(TARGET_PLATFORM_FVP) && !defined(TARGET_PLATFORM_FPGA) -#include "plat/arm/common/arm_def.h" -#else -#include -#endif - - .global arm_rotpk_key - .global arm_rotpk_key_end - - .section .rodata.arm_rotpk_key, "a" - -arm_rotpk_key: - .byte 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01 - .byte 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01 - .byte 0x00, 0xCB, 0x2C, 0x60, 0xD5, 0x8D, 0x63, 0xD4, 0x07, 0x79, 0x7E, 0xC7, 0x16, 0x96, 0xBD, 0x4D, 0x24, 0x4E, 0xAC, 0x86, 0xE6, 0xB7, 0x71, 0xE3, 0xC5, 0x54, 0x0B, 0xE7, 0x14, 0x1C, 0xBD, 0x29, 0x1A, 0xC1, 0x3F, 0x7A, 0xB6, 0x02, 0xAA, 0xAB, 0x36, 0xC4, 0xD9, 0x36, 0x69, 0x6C, 0xE2, 0x65, 0xC3, 0x9B, 0xB1, 0xBF, 0x3D, 0xA8, 0x56, 0x26, 0xCB, 0xFD, 0x04, 0x01, 0xBA, 0xAC, 0x3E, 0x54, 0x32, 0xCA, 0x79, 0x5E, 0xBB, 0xB2, 0x05, 0xEA, 0x06, 0x58, 0xF2, 0x74, 0xBA, 0xE1, 0xF4, 0x87, 0xC0, 0x19, 0x0A, 0x1F, 0x66, 0x07, 0x77, 0x84, 0x83, 0xA1, 0x1C, 0xEF, 0xFF, 0x28, 0x59, 0xE7, 0xC3, 0x68, 0x7D, 0x26, 0x20, 0x43, 0xEB, 0x56, 0x63, 0xF3, 0x39, 0x31, 0xD8, 0x2B, 0x51, 0xA9, 0xBC, 0x4F, 0xD0, 0xF6, 0xDE, 0x95, 0xDC, 0x5F, 0x5B, 0xC1, 0xED, 0x90, 0x6F, 0xEC, 0x28, 0x91, 0x7E, 0x17, 0xED, 0x78, 0x90, 0xF4, 0x60, 0xA7, 0xC4, 0xC7, 0x4F, 0x50, 0xED, 0x5D, 0x13, 0x3A, 0x21, 0x2B, 0x70, 0xC5, 0x61, 0x7B, 0x08, 0x21, 0x65, 0x3A, 0xCD, 0x82, 0x56, 0x8C, 0x7A, 0x47, 0xAC, 0x89, 0xE8, 0xA5, 0x48, 0x48 - .byte 0x31, 0xD9, 0x1D, 0x46, 0xE5, 0x85, 0x86, 0x98, 0xA0, 0xE5, 0xC0, 0xA6, 0x6A, 0xBD, 0x07, 0xE4, 0x92, 0x57, 0x61, 0x07, 0x8F, 0x7D, 0x5A, 0x4D, 0xCA, 0xAE, 0x36, 0xB9, 0x56, 0x04, 0x10, 0xF2, 0x6C, 0xBE, 0xF6, 0x3B, 0x6C, 0x80, 0x3E, 0xBE , 0x0E, 0xA3, 0x4D , 0xC7 , 0xD4, 0x7E , 0xA7 , 0x49, 0xD4, 0xF2, 0xD2, 0xBC, 0xCF, 0x30, 0xA8, 0xE7, 0x74, 0x8F, 0x64, 0xDF, 0xBC, 0x5C, 0x47, 0x68, 0xCC, 0x40, 0x4C, 0xF8, 0x83, 0xCC, 0xCB, 0x40, 0x35, 0x04, 0x60, 0xCA, 0xB3, 0xA4, 0x17, 0x9F, 0x03, 0xCA, 0x1D, 0x5A, 0xFA, 0xD1, 0xAF, 0x21, 0x57, 0x10, 0xD3, 0x02, 0x03, 0x01, 0x00, 0x01 - -arm_rotpk_key_end: - -.if ARM_ROTPK_KEY_LEN != arm_rotpk_key_end - arm_rotpk_key -.error "Invalid ROTPK length." -.endif - diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_plat_attest_token.c b/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_plat_attest_token.c deleted file mode 100644 index 5af240542..000000000 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_plat_attest_token.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include - -/* - * Get the platform attestation token through the PSA delegated attestation - * layer. - * - * FVP cannot support RSS hardware at the moment, but it can still mock the - * RSS implementation of the PSA interface (see PLAT_RSS_NOT_SUPPORTED). - */ -int plat_rmmd_get_cca_attest_token(uintptr_t buf, size_t *len, - uintptr_t hash, size_t hash_size) -{ - psa_status_t ret; - - ret = rss_delegated_attest_get_token((const uint8_t *)hash, hash_size, - (uint8_t *)buf, *len, len); - - return ret; -} diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_realm_attest_key.c b/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_realm_attest_key.c deleted file mode 100644 index 26354f42a..000000000 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_realm_attest_key.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include -#include -#include - -/* - * Get the delegated realm attestation key through the PSA delegated - * attestation layer. - * - * FVP cannot support RSS hardware at the moment, but it can still mock - * the RSS implementation of the PSA interface (see PLAT_RSS_NOT_SUPPORTED). - */ -int plat_rmmd_get_cca_realm_attest_key(uintptr_t buf, size_t *len, - unsigned int type) -{ - psa_status_t ret; - - assert(type == ATTEST_KEY_CURVE_ECC_SECP384R1); - - ret = rss_delegated_attest_get_delegated_key(0U, 0U, (uint8_t *)buf, - *len, len, 0U); - - return ret; -} diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.h b/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.h deleted file mode 100644 index a59e0c78f..000000000 --- a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2022, MediaTek Inc. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef IOMMU_PLAT_H -#define IOMMU_PLAT_H - -#include - -/* mm iommu */ -#define SMI_LARB_NUM (26) -extern struct mtk_smi_larb_config *g_larb_cfg; - -/* infra iommu */ -#define MMU_DEV_NUM (1) -extern struct mtk_ifr_mst_config *g_ifr_mst_cfg; -extern uint32_t *g_ifr_mst_cfg_base; -extern uint32_t *g_ifr_mst_cfg_offs; - -extern void mtk_infra_iommu_enable_protect(void); - -#endif /* IOMMU_PLAT_H */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mt7986_mmu.h b/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mt7986_mmu.h deleted file mode 100644 index 96612175d..000000000 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mt7986_mmu.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef MT7986_MMU_H -#define MT7986_MMU_H - -#include - -#define MTK_MAP_DEVICE(_name, _base, _size) \ - MAP_REGION_FLAT(_base, \ - _size, \ - MT_DEVICE | MT_RW | MT_SECURE) - -#define MAP_SEC_SYSRAM MAP_REGION_FLAT(TZRAM_BASE, \ - TZRAM_SIZE, \ - MT_MEMORY | MT_RW | MT_SECURE) - -#define MAP_GIC \ - MTK_MAP_DEVICE(GIC_V3, GIC_BASE, 0x1000000) - -#define MAP_DEVICE0 \ - MTK_MAP_DEVICE(BASIC, 0x10000000, 0x20000), \ - MTK_MAP_DEVICE(INFRACFG, 0x10209000, 0x2000), \ - MTK_MAP_DEVICE(PERICFG, 0x1020B000, 0x2000), \ - MTK_MAP_DEVICE(TRNG, 0x1020F000, 0x1000), \ - MTK_MAP_DEVICE(MCUSYS, 0x10400000, 0x2000), \ - MTK_MAP_DEVICE(UART, 0x11002000, 0x3000), \ - MTK_MAP_DEVICE(EFUSE, 0x11D00000, 0x10000), \ - MTK_MAP_DEVICE(TOP_MISC, 0x11D10000, 0x1000) - -#define MAP_DEVICE1 \ - MTK_MAP_DEVICE(MPU, 0x10226000, 0x1000), \ - MTK_MAP_DEVICE(DEVICE_APC, 0x1A0F0000, 0x30000) - -#define MAP_DEVICE_EXTENTION \ - MTK_MAP_DEVICE(PWM, 0x10048000, 0x1000), \ - MTK_MAP_DEVICE(DMA, 0x10212000, 0x6000), \ - MTK_MAP_DEVICE(EIP97, 0x10320000, 0x40000), \ - MTK_MAP_DEVICE(NFI, 0x11005000, 0x2000), \ - MTK_MAP_DEVICE(I2C, 0x11008000, 0x1000), \ - MTK_MAP_DEVICE(SPI, 0x1100A000, 0x2000), \ - MTK_MAP_DEVICE(AUXADC, 0x1100D000, 0x1000), \ - MTK_MAP_DEVICE(IOCFG_0, 0x11C30000, 0x2000), \ - MTK_MAP_DEVICE(IOCFG_1, 0x11E20000, 0x4000) - -#endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/release/efuse_cmd.o b/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/release/efuse_cmd.o deleted file mode 100644 index c5721e267..000000000 Binary files a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/release/efuse_cmd.o and /dev/null differ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/reg_base.h b/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/reg_base.h deleted file mode 100644 index 4fa0a0445..000000000 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/reg_base.h +++ /dev/null @@ -1,155 +0,0 @@ - - -/* - * Not inside DE memory map - */ -#define GIC_BASE 0x0C000000 -#define INTER_SRAM 0x00100000 - -/* - * Base on memory_map_to_reg_base_H.py - */ - -/* SRAMROM */ -#define ROM_BASE 0x00000000 -/* SRAMROM */ -#define RAM_BASE 0x00100000 -/* L2C */ -#define L2C_BASE 0x00200000 -/* HW_VER CID */ -#define HW_VER_CID_BASE 0x08000000 -/* DEVAPC TOPS_PERI_BUS_AO_PDN_PDN */ -#define DEVAPC_TOPS_PERI_BUS_AO_PDN_PDN_BASE 0x09129000 -/* DEVAPC TOPS_PERI_BUS_AO_PDN */ -#define DEVAPC_TOPS_PERI_BUS_AO_PDN_BASE 0x0912C000 -/* DEVAPC TOPS_BUS_AO_PDN_PDN */ -#define DEVAPC_TOPS_BUS_AO_PDN_PDN_BASE 0x09139000 -/* DEVAPC TOPS_BUS_AO_PDN */ -#define DEVAPC_TOPS_BUS_AO_PDN_BASE 0x0913C000 -/* DEVAPC CLUST_PERI_BUS_AO_PDN_PDN */ -#define DEVAPC_CLUST_PERI_BUS_AO_PDN_PDN_BASE 0x09629000 -/* DEVAPC CLUST_PERI_BUS_AO_PDN */ -#define DEVAPC_CLUST_PERI_BUS_AO_PDN_BASE 0x0962C000 -/* DEVAPC CLUST_BUS_AO_PDN_PDN */ -#define DEVAPC_CLUST_BUS_AO_PDN_PDN_BASE 0x09639000 -/* DEVAPC CLUST_BUS_AO_PDN */ -#define DEVAPC_CLUST_BUS_AO_PDN_BASE 0x0963C000 -/* DEBUGSYS */ -#define DEBUGSYS_BASE 0x0D000000 -/* INFRA_CFG_AO */ -#define INFRACFG_AO_BASE 0x10001000 -/* INFRA_CFG_AO_MEM */ -#define INFRACFG_AO_MEM_BASE 0x10002000 -/* PERICFG_AO */ -#define PERICFG_AO_BASE 0x10003000 -/* APXGPT */ -#define APXGPT_BASE 0x10008000 -/* Reserved */ -#define RESERVED_BASE 0x10009000 -/* AP_CIRQ_ENIT_APB */ -#define AP_CIRQ_ENIT_APB_BASE 0x1000B000 -/* SYS_TIMER */ -#define SYS_TIMER_BASE 0x10017000 -#define TOPCKGEN_BASE 0x1001B000 -#define TOPRGU_BASE 0x1001C000 -#define DRM_BASE 0x1001D000 -#define APMIXEDSYS_BASE 0x1001E000 -/* Pinmux0 */ -#define PINMUX0_BASE 0x10021000 -/* Pinmux1 */ -#define PINMUX1_BASE 0x10022000 -/* PWM */ -#define PWM_BASE 0x10048000 -/* SGMII_SBUS0 */ -#define SGMII_SBUS0_BASE 0x10060000 -/* SGMII_SBUS1 */ -#define SGMII_SBUS1_BASE 0x10070000 -/* SYS_CIRQ */ -#define SYS_CIRQ_BASE 0x10204000 -/* INFRACFG_PDN */ -#define INFRACFG_PDN_BASE 0x1020E000 -/* TRNG */ -#define TRNG_BASE 0x1020f000 -/* CQ_DMA */ -#define CQ_DMA_BASE 0x10212000 -/* SRAMROM_APB */ -#define SRAMROM_APB_BASE 0x10214000 -/* AP_DMA */ -#define AP_DMA_BASE 0x10217000 -/* EMI_APB */ -#define EMI_APB_BASE 0x10219000 -/* INFRACFG_MEM_APB */ -#define INFRACFG_MEM_APB_BASE 0x1021C000 -/* EMI_FAKE_ENGINE0 */ -#define EMI_FAKE_ENGINE0_BASE 0x10225000 -/* EMI_MPU_APB */ -#define EMI_MPU_APB_BASE 0x10226000 -/* EMI_FAKE_ENGINE1 */ -#define EMI_FAKE_ENGINE1_BASE 0x10227000 -/* DRAMC_CH0 */ -#define DRAMC_CH0_BASE 0x10230000 -/* DRAMC_CH1 */ -#define DRAMC_CH1_BASE 0x10240000 -/* EIP97 */ -#define EIP97_BASE 0x10320000 -/* MCUSYS_CFGREG_APB */ -#define MCUSYS_CFGREG_APB_BASE 0x10390000 -/* MCUSYS_CFGREG_APB-1 */ -#define MCUSYS_CFGREG_APB_1_BASE 0x100E0000 -#define MCUCFG_BASE MCUSYS_CFGREG_APB_1_BASE -#define MCUCFG_CA73 0x100E2000 - -/* UART0 */ -#define UART0_BASE 0x11000000 -/* UART1 */ -#define UART1_BASE 0x11000100 -/* UART2 */ -#define UART2_BASE 0x11000200 -/* NFI */ -#define NFI_BASE 0x11001000 -/* NFI_ECC */ -#define NFI_ECC_BASE 0x11002000 -/* I2C */ -#define I2C_BASE 0x11008000 -/* SPI0 */ -#define SPI0_BASE 0x11007000 -/* SPI1 */ -#define SPI1_BASE 0x11008000 -/* PTP_THERM_CTRL */ -#define PTP_THERM_CTRL_BASE 0x1100C000 -/* AUXADC */ -#define AUXADC_BASE 0x1100D000 -/* AUDIO_S */ -#define AUDIO_S_BASE 0x11210000 -/* AUDIO_S-1 */ -#define AUDIO_S_1_BASE 0x11219000 -/* MDSC0 */ -#define MSDC0_BASE 0x11230000 -/* EAST0 */ -#define PCIE_PHYD_L0_BASE 0x11C00000 -/* EAST1 */ -#define PCIE_PHYD_L1_BASE 0x11C10000 -/* MDSC0 TOP */ -#define MSDC0_TOP_BASE 0x11C20000 -/* WEST0 */ -#define EFUSE_CONTROLLER_BASE 0x11E00000 -/* WEST1 */ -#define USB_PHYD_BASE 0x11E10000 -/* TOP Misc */ -#define TOP_MISC_BASE 0x11D10000 -/* NETSYS1 */ -#define NETSYS1_BASE 0x15000000 -/* NETSYS2 */ -#define NETSYS2_BASE 0x15180000 -/* NETSYS3 */ -#define NETSYS3_BASE 0x1518C000 -/* NETSYS4 */ -#define NETSYS4_BASE 0x151C0000 -/* CONNSYS */ -#define CONNSYS_BASE 0x18000000 -/* DEVAPC_FMEM_AO */ -#define DEVAPC_FMEM_AO_BASE 0x1A0F0000 -/* DEVAPC_INFRA_AO */ -#define DEVAPC_INFRA_AO_BASE 0x1A100000 -/* DEVAPC_INFRA_PDN */ -#define DEVAPC_INFRA_PDN_BASE 0x1A110000 diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/plat_fdt.c b/atf-20231013-0ea67d76a/plat/xilinx/common/plat_fdt.c deleted file mode 100644 index de5d1a1f4..000000000 --- a/atf-20231013-0ea67d76a/plat/xilinx/common/plat_fdt.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - * - */ -#include -#include -#include -#include -#include - -#include -#include - -void prepare_dtb(void) -{ -#if defined(XILINX_OF_BOARD_DTB_ADDR) - void *dtb; - int map_ret = 0; - int ret = 0; - - dtb = (void *)XILINX_OF_BOARD_DTB_ADDR; - - if (!IS_TFA_IN_OCM(BL31_BASE)) { - -#if defined(PLAT_XLAT_TABLES_DYNAMIC) - map_ret = mmap_add_dynamic_region((unsigned long long)dtb, - (uintptr_t)dtb, - XILINX_OF_BOARD_DTB_MAX_SIZE, - MT_MEMORY | MT_RW | MT_NS); - if (map_ret != 0) { - WARN("Failed to add dynamic region for dtb: error %d\n", - map_ret); - } -#endif - - if (!map_ret) { - /* Return if no device tree is detected */ - if (fdt_check_header(dtb) != 0) { - NOTICE("Can't read DT at %p\n", dtb); - } else { - ret = fdt_open_into(dtb, dtb, XILINX_OF_BOARD_DTB_MAX_SIZE); - - if (ret < 0) { - ERROR("Invalid Device Tree at %p: error %d\n", - dtb, ret); - } else { - - if (dt_add_psci_node(dtb)) { - WARN("Failed to add PSCI Device Tree node\n"); - } - - if (dt_add_psci_cpu_enable_methods(dtb)) { - WARN("Failed to add PSCI cpu enable methods in DT\n"); - } - - /* Reserve memory used by Trusted Firmware. */ - ret = fdt_add_reserved_memory(dtb, - "tf-a", - BL31_BASE, - BL31_LIMIT - - - BL31_BASE); - if (ret < 0) { - WARN("Failed to add reserved memory nodes for BL31 to DT.\n"); - } - - ret = fdt_pack(dtb); - if (ret < 0) { - WARN("Failed to pack dtb at %p: error %d\n", - dtb, ret); - } - flush_dcache_range((uintptr_t)dtb, - fdt_blob_size(dtb)); - - INFO("Changed device tree to advertise PSCI and reserved memories.\n"); - - } - } - - } - - -#if defined(PLAT_XLAT_TABLES_DYNAMIC) - if (!map_ret) { - ret = mmap_remove_dynamic_region((uintptr_t)dtb, - XILINX_OF_BOARD_DTB_MAX_SIZE); - if (ret != 0) { - WARN("Failed to remove dynamic region for dtb:error %d\n", - ret); - } - } -#endif - } - -#endif -} diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/common/spm.mk b/atf-20231013-0ea67d76a/services/std_svc/spm/common/spm.mk deleted file mode 100644 index 9aa96be3f..000000000 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/common/spm.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause -# - -ifneq (${ARCH},aarch64) - $(error "Error: SPM is only supported on aarch64.") -endif - -INCLUDES += -Iservices/std_svc/spm/common/include - -SPM_SOURCES := $(addprefix services/std_svc/spm/common/,\ - ${ARCH}/spm_helpers.S) - -# Let the top-level Makefile know that we intend to include a BL32 image -NEED_BL32 := yes diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_setup.c b/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_setup.c deleted file mode 100644 index 6de25f64b..000000000 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_setup.c +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "spm_common.h" -#include "spmc.h" -#include - -#include - -/* - * Statically allocate a page of memory for passing boot information to an SP. - */ -static uint8_t ffa_boot_info_mem[PAGE_SIZE] __aligned(PAGE_SIZE); - -/* - * This function creates a initialization descriptor in the memory reserved - * for passing boot information to an SP. It then copies the partition manifest - * into this region and ensures that its reference in the initialization - * descriptor is updated. - */ -static void spmc_create_boot_info(entry_point_info_t *ep_info, - struct secure_partition_desc *sp) -{ - struct ffa_boot_info_header *boot_header; - struct ffa_boot_info_desc *boot_descriptor; - uintptr_t manifest_addr; - - /* - * Calculate the maximum size of the manifest that can be accommodated - * in the boot information memory region. - */ - const unsigned int - max_manifest_sz = sizeof(ffa_boot_info_mem) - - (sizeof(struct ffa_boot_info_header) + - sizeof(struct ffa_boot_info_desc)); - - /* - * The current implementation only supports the FF-A v1.1 - * implementation of the boot protocol, therefore check - * that a v1.0 SP has not requested use of the protocol. - */ - if (sp->ffa_version == MAKE_FFA_VERSION(1, 0)) { - ERROR("FF-A boot protocol not supported for v1.0 clients\n"); - return; - } - - /* - * Check if the manifest will fit into the boot info memory region else - * bail. - */ - if (ep_info->args.arg1 > max_manifest_sz) { - WARN("Unable to copy manifest into boot information. "); - WARN("Max sz = %u bytes. Manifest sz = %lu bytes\n", - max_manifest_sz, ep_info->args.arg1); - return; - } - - /* Zero the memory region before populating. */ - memset(ffa_boot_info_mem, 0, PAGE_SIZE); - - /* - * Populate the ffa_boot_info_header at the start of the boot info - * region. - */ - boot_header = (struct ffa_boot_info_header *) ffa_boot_info_mem; - - /* Position the ffa_boot_info_desc after the ffa_boot_info_header. */ - boot_header->offset_boot_info_desc = - sizeof(struct ffa_boot_info_header); - boot_descriptor = (struct ffa_boot_info_desc *) - (ffa_boot_info_mem + - boot_header->offset_boot_info_desc); - - /* - * We must use the FF-A version corresponding to the version implemented - * by the SP. Currently this can only be v1.1. - */ - boot_header->version = sp->ffa_version; - - /* Populate the boot information header. */ - boot_header->size_boot_info_desc = sizeof(struct ffa_boot_info_desc); - - /* Set the signature "0xFFA". */ - boot_header->signature = FFA_INIT_DESC_SIGNATURE; - - /* Set the count. Currently 1 since only the manifest is specified. */ - boot_header->count_boot_info_desc = 1; - - /* Populate the boot information descriptor for the manifest. */ - boot_descriptor->type = - FFA_BOOT_INFO_TYPE(FFA_BOOT_INFO_TYPE_STD) | - FFA_BOOT_INFO_TYPE_ID(FFA_BOOT_INFO_TYPE_ID_FDT); - - boot_descriptor->flags = - FFA_BOOT_INFO_FLAG_NAME(FFA_BOOT_INFO_FLAG_NAME_UUID) | - FFA_BOOT_INFO_FLAG_CONTENT(FFA_BOOT_INFO_FLAG_CONTENT_ADR); - - /* - * Copy the manifest into boot info region after the boot information - * descriptor. - */ - boot_descriptor->size_boot_info = (uint32_t) ep_info->args.arg1; - - manifest_addr = (uintptr_t) (ffa_boot_info_mem + - boot_header->offset_boot_info_desc + - boot_header->size_boot_info_desc); - - memcpy((void *) manifest_addr, (void *) ep_info->args.arg0, - boot_descriptor->size_boot_info); - - boot_descriptor->content = manifest_addr; - - /* Calculate the size of the total boot info blob. */ - boot_header->size_boot_info_blob = boot_header->offset_boot_info_desc + - boot_descriptor->size_boot_info + - (boot_header->count_boot_info_desc * - boot_header->size_boot_info_desc); - - INFO("SP boot info @ 0x%lx, size: %u bytes.\n", - (uintptr_t) ffa_boot_info_mem, - boot_header->size_boot_info_blob); - INFO("SP manifest @ 0x%lx, size: %u bytes.\n", - boot_descriptor->content, - boot_descriptor->size_boot_info); -} - -/* - * We are assuming that the index of the execution - * context used is the linear index of the current physical cpu. - */ -unsigned int get_ec_index(struct secure_partition_desc *sp) -{ - return plat_my_core_pos(); -} - -/* S-EL1 partition specific initialisation. */ -void spmc_el1_sp_setup(struct secure_partition_desc *sp, - entry_point_info_t *ep_info) -{ - /* Sanity check input arguments. */ - assert(sp != NULL); - assert(ep_info != NULL); - - /* Initialise the SPSR for S-EL1 SPs. */ - ep_info->spsr = SPSR_64(MODE_EL1, MODE_SP_ELX, - DISABLE_ALL_EXCEPTIONS); - - /* - * TF-A Implementation defined behaviour to provide the linear - * core ID in the x4 register. - */ - ep_info->args.arg4 = (uintptr_t) plat_my_core_pos(); - - /* - * Check whether setup is being performed for the primary or a secondary - * execution context. In the latter case, indicate to the SP that this - * is a warm boot. - * TODO: This check would need to be reworked if the same entry point is - * used for both primary and secondary initialisation. - */ - if (sp->secondary_ep != 0U) { - /* - * Sanity check that the secondary entry point is still what was - * originally set. - */ - assert(sp->secondary_ep == ep_info->pc); - ep_info->args.arg0 = FFA_WB_TYPE_S2RAM; - } -} - -/* Common initialisation for all SPs. */ -void spmc_sp_common_setup(struct secure_partition_desc *sp, - entry_point_info_t *ep_info, - int32_t boot_info_reg) -{ - uint16_t sp_id; - - /* Assign FF-A Partition ID if not already assigned. */ - if (sp->sp_id == INV_SP_ID) { - sp_id = FFA_SP_ID_BASE + ACTIVE_SP_DESC_INDEX; - /* - * Ensure we don't clash with previously assigned partition - * IDs. - */ - while (!is_ffa_secure_id_valid(sp_id)) { - sp_id++; - - if (sp_id == FFA_SWD_ID_LIMIT) { - ERROR("Unable to determine valid SP ID.\n"); - panic(); - } - } - sp->sp_id = sp_id; - } - - /* - * We currently only support S-EL1 partitions so ensure this is the - * case. - */ - assert(sp->runtime_el == S_EL1); - - /* Check if the SP wants to use the FF-A boot protocol. */ - if (boot_info_reg >= 0) { - /* - * Create a boot information descriptor and copy the partition - * manifest into the reserved memory region for consumption by - * the SP. - */ - spmc_create_boot_info(ep_info, sp); - - /* - * We have consumed what we need from ep args so we can now - * zero them before we start populating with new information - * specifically for the SP. - */ - zeromem(&ep_info->args, sizeof(ep_info->args)); - - /* - * Pass the address of the boot information in the - * boot_info_reg. - */ - switch (boot_info_reg) { - case 0: - ep_info->args.arg0 = (uintptr_t) ffa_boot_info_mem; - break; - case 1: - ep_info->args.arg1 = (uintptr_t) ffa_boot_info_mem; - break; - case 2: - ep_info->args.arg2 = (uintptr_t) ffa_boot_info_mem; - break; - case 3: - ep_info->args.arg3 = (uintptr_t) ffa_boot_info_mem; - break; - default: - ERROR("Invalid value for \"gp-register-num\" %d.\n", - boot_info_reg); - } - } else { - /* - * We don't need any of the information that was populated - * in ep_args so we can clear them. - */ - zeromem(&ep_info->args, sizeof(ep_info->args)); - } -} - -/* - * Initialise the SP context now we have populated the common and EL specific - * entrypoint information. - */ -void spmc_sp_common_ep_commit(struct secure_partition_desc *sp, - entry_point_info_t *ep_info) -{ - cpu_context_t *cpu_ctx; - - cpu_ctx = &(spmc_get_sp_ec(sp)->cpu_ctx); - print_entry_point_info(ep_info); - cm_setup_context(cpu_ctx, ep_info); -} diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/mk_image.sh b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/mk_image.sh deleted file mode 100755 index 4ed0b34ba..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/mk_image.sh +++ /dev/null @@ -1,365 +0,0 @@ -#!/bin/bash -#global variables: -gpt_start_dec=0 -gpt_start_hex=0 -bl2_start_dec=0 -bl2_start_hex=0x0 -rf_start_dec=0 -rf_start_hex=0x0 -fip_start_dec=0 -fip_start_hex=0x0 -kernel_start_dec=0 -kernel_start_hex=0x0 -rootfs_start_dec=0 -rootfs_start_hex=0x0 -rootfs_image="" -sdmmc_extracted_folder="" - -# Regular Colors -RED='\033[0;31m' -NC='\033[0m' - -usage() { - printf 'Usage:\n'\ -' ./mk_image -p \n'\ -' -d \n'\ -' -c \n'\ -' -b , default=bl2.img\n'\ -' -r \n'\ -' -f , default=fip.bin\n'\ -' -k \n'\ -' -g \n'\ -' -h \n'\ -' -o \n'\ -' example:\n'\ -' ./mk_image.sh -p mt7986a -d emmc \\\n'\ -' -g GPT_EMMC-iap-20220125 \\\n'\ -' -f fip-iap-emmc-20220125.bin \\\n'\ -' -k OF_openwrt-mediatek-mt7986-mt7986a-ax6000-emmc-rfb-squashfs-sysupgrade.bin\n'\ -' ./mk_image.sh -p mt7986a -d spim-nand \\\n'\ -' -b bl2-iap-snand-20220114.img \\\n'\ -' -f fip-snand-20220114.bin \\\n'\ -' -k OF_openwrt-mediatek-mt7986-mt7986a-ax6000-spim-nand-rfb-squashfs-factory.bin \\\n' - exit 0 -} - -parse_yaml() { - local prefix=$2 - local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') - sed -ne "s|^\($s\):|\1|" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | - awk -F$fs '{ - indent = length($1)/2; - vname[indent] = $2; - for (i in vname) {if (i > indent) {delete vname[i]}} - if (length($3) > 0) { - vn=""; for (i=0; i $single_image - else - dd if=/dev/zero ibs=$fip_start_dec count=1 \ - | tr "\000" "\377" > $single_image - fi - else - if [[ $flash_type == "emmc" ]] || [[ $flash_type == "sd" ]] - then - dd if=/dev/zero ibs=$kernel_start_dec count=1 \ - > $single_image 2>&1 - else - dd if=/dev/zero ibs=$kernel_start_dec count=1 \ - | tr "\000" "\377" > $single_image 2>&1 - fi - fi -} - -extract_sdmmc_kernel() { - output=`tar -xvf $kernel_image | awk {'print $1'}` - IFS=$'\n' read -d "\034" -r -a output_arr <<< "$output" - - #For debugging - #echo "There are ${#output_arr[*]}" next lines in the output. - - sdmmc_extracted_folder=${output_arr[0]} - - for filename in "${output_arr[@]}"; - do - if [[ "$filename" == *"kernel" ]] - then - kernel_image=$filename - elif [[ "$filename" == *"root" ]] - then - rootfs_image=$filename - fi - done -} - -start_wrapping() { - printf "[Start wrapping %s single image......]\n" $flash_type - - if [[ $flash_type == "emmc" ]] || [[ $flash_type == "sd" ]] - then - printf "[wrapping GPT......]\n" - dd if=$gpt of=$single_image bs=512 seek=0 conv=notrunc - fi - - if [[ $flash_type != "emmc" ]] - then - printf "[wrapping BL2 image......]\n" - dd if=$bl2_image of=$single_image bs=512 \ - seek=$(( ($bl2_start_dec/512) )) conv=notrunc - fi - - if [[ -n $rf_image ]] - then - printf "[wrapping RF image......]\n" - dd if=$rf_image of=$single_image bs=512 \ - seek=$(( ($rf_start_dec/512) )) conv=notrunc - fi - - printf "[wrapping FIP image......]\n" - dd if=$fip_image of=$single_image bs=512 \ - seek=$(( ($fip_start_dec/512) )) conv=notrunc - - if [[ -n $kernel_image ]] - then - printf "[wrapping kernel image......]\n" - if [[ $flash_type == "emmc" ]] || [[ $flash_type == "sd" ]] - then - extract_sdmmc_kernel - dd if=$kernel_image of=$single_image bs=512 \ - seek=$(( ($kernel_start_dec/512) )) conv=notrunc - printf "[wrapping rootfs image......]\n" - dd if=$rootfs_image of=$single_image bs=512 \ - seek=$(( ($rootfs_start_dec/512) )) conv=notrunc - rm -r $sdmmc_extracted_folder - else - dd if=$kernel_image of=$single_image bs=512 \ - seek=$(( ($kernel_start_dec/512) )) conv=notrunc - fi - fi -} - -## Enter current folder -DIR="$(cd "$(dirname "$0")" && pwd)" -cd ${DIR} - -if [ $# -lt 1 ] -then - usage - exit 0 -fi - -## We set default values for some arguments -bl2_image="bl2.img" -bl2_default=1 -fip_image="fip.bin" -fip_default=1 -partition_config="" -partition_config_default=1 - -while [ "$1" != "" ]; do - case $1 in - -h ) - usage - ;; - -p ) - shift - platform=$1 - ;; - -d ) - shift - flash_type=$1 - ;; - -c ) - shift - partition_config=$1 - partition_config_default=0 - ;; - -b ) - shift - bl2_image=$1 - bl2_default=0 - ;; - -f ) - shift - fip_image=$1 - fip_default=0 - ;; - -k ) - shift - kernel_image=$1 - ;; - -g ) - shift - gpt=$1 - ;; - -o ) - shift - single_image=$1 - ;; - -r ) - shift - rf_image=$1 - ;; - esac - shift -done - - -######## Check if variables are valid ######## -check_ok=1 -if ! [[ $platform =~ ^(mt7981abd|mt7981c|mt7986a|mt7986b|mt7988)$ ]]; then - printf "${RED}Platform must be in mt7981abd|mt7981c|mt7986a|mt7986b|mt7988\n${NC}" - usage - exit 1 -fi -if ! [[ $flash_type =~ ^(snfi-nand|spim-nand|spim-nor|emmc|sd)$ ]]; then - printf "${RED}Flash type must be in snfi-nand|spim-nand|spim-nor|emmc|sd\n${NC}" - usage - exit 1 -fi - -if [[ $partition_config_default -eq 1 ]]; then - declare -A part_by_platform - declare -A default_part - declare -A mt7988_part - ## | snfi-nand | spim-nand | spim-nor | emmc | sd - ## mt7981 | default | default | default | default | default - ## mt7986 | default | default | default | default | default - ## mt7988 | custom | custom | custom | custom | custom - default_part=( ['snfi-nand']="-default" - ['spim-nand']="-default" - ['spim-nor']="-default" - ['emmc']="-default" - ['sd']="-default" ) - mt7988_part=( ['snfi-nand']="-mt7988" - ['spim-nand']="-mt7988" - ['spim-nor']="-mt7988" - ['emmc']="-mt7988" - ['sd']="-mt7988" ) - part_by_platform=( ['mt7981abd']="default_part" - ['mt7981c']="default_part" - ['mt7986a']="default_part" - ['mt7986b']="default_part" - ['mt7988']="mt7988_part") - #For debugging - #eval hey=\${${part_by_platform['mt7988']}['snfi-nand']} - eval suffix=\${${part_by_platform[${platform}]}[${flash_type}]} - partition_config="./partitions/${flash_type}${suffix}.yml" -fi - -if [[ $flash_type =~ ^(emmc|sd)$ ]] && [[ -z $gpt ]]; then - printf "${RED}GPT table must be provided if flash type is emmc or sd\n${NC}" - usage - exit 1 -fi - -if [[ -n $gpt ]] && ! [[ -f $gpt ]]; then - printf "${RED}GPT table provided doesn't exist.\n${NC}" - exit 1 -fi -if [[ -n $rf_image ]] && ! [[ -f $rf_image ]]; then - printf "${RED}RF image provided doesn't exist.\n${NC}" - exit 1 -fi -if [[ -n $kernel_image ]] && ! [[ -f $kernel_image ]]; then - printf "${RED}Kernel image provided doesn't exist.\n${NC}" - exit 1 -fi - -############################################## -if ! [[ -f $partition_config ]] -then - if [[ $partition_config_default -eq 1 ]] - then - printf "${RED}Default partition config${NC}" - else - printf "${RED}Partition config provided${NC}" - fi - printf "${RED} doesn't exist: %s\n${NC}" $partition_config - exit 1 -fi -printf "* Partition config: %s\n" $partition_config - -if ! [[ -f $bl2_image ]] && [[ $flash_type != "emmc" ]] -then - if [[ $bl2_default -eq 1 ]] - then - printf "${RED}Default BL2 image${NC}" - else - printf "${RED}BL2 image provided${NC}" - fi - printf "${RED} doesn't exist: %s\n${NC}" $bl2_image - exit 1 -fi -printf "* BL2 image name: %s\n" $bl2_image - -if ! [[ -f $fip_image ]] -then - if [[ $fip_default -eq 1 ]] - then - printf "${RED}Default FIP image" - else - printf "${RED}FIP image provided" - fi - printf "${RED} doesn't exist: %s\n${NC}" $fip_image - exit 1 -fi -printf "* FIP image name: %s\n" $fip_image - -if [[ -z $single_image ]] -then - single_image="$platform-$flash_type-$(date +%Y%m%d)-single-image.bin" - printf "* Single image name: %s\n" $single_image -fi - -if [[ $check_ok == 1 ]]; then - #printf "./mk_image -p %s -d %s\n" $platform $flash_type - load_partition - prepare_image - start_wrapping -fi diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/emmc-default.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/emmc-default.yml deleted file mode 100644 index 31c517464..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/emmc-default.yml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2021-2022 SkyLake Huang -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# eMMC layout: -# 0x0~0x4400 : GPT -# 0x400000~0x480000 : u-boot-env -# 0x480000~0x680000 : rf -# 0x680000~0x880000 : fip -# 0x880000~0x2880000 : kernel -# 0x2880000~0x12880000: rootfs - -emmc: - rf_start: 0x480000 - fip_start: 0x680000 - kernel_start: 0x880000 - rootfs_start: 0x2880000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/emmc-mt7988.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/emmc-mt7988.yml deleted file mode 100644 index 70f129f74..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/emmc-mt7988.yml +++ /dev/null @@ -1,21 +0,0 @@ -# eMMC layout(Panther/Cheetah): -# 0x0~0x4400 : GPT -# 0x400000~0x480000 : u-boot-env -# 0x480000~0x680000 : rf -# 0x680000~0x880000 : fip -# 0x880000~0x2880000 : kernel -# 0x2880000~0x12880000: rootfs - -# eMMC layout(Jaguar): -# 0x0~0x4400 : GPT -# 0x400000~0x480000 : u-boot-env -# 0x480000~0x880000 : rf -# 0x880000~0xa80000 : fip -# 0xa80000~0x2a80000 : kernel -# 0x2a80000~0x12a80000: rootfs - -emmc: - rf_start: 0x480000 - fip_start: 0x880000 - kernel_start: 0xa80000 - rootfs_start: 0x2a80000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/sd-default.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/sd-default.yml deleted file mode 100644 index 9bbe1c665..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/sd-default.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2021-2022 SkyLake Huang -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# SD-card layout: -# 0x0~0x4400 : GPT -# 0x4400~0x400000 : bl2 -# 0x400000~0x480000 : u-boot-env -# 0x480000~0x680000 : rf -# 0x680000~0x880000 : fip -# 0x880000~0x2880000 : kernel -# 0x2880000~0x12880000: rootfs - -sd: - bl2_start: 0x4400 - rf_start: 0x480000 - fip_start: 0x680000 - kernel_start: 0x880000 - rootfs_start: 0x2880000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/sd-mt7988.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/sd-mt7988.yml deleted file mode 100644 index 37bafa6e8..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/sd-mt7988.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SD-card layout: -# 0x0~0x4400 : GPT -# 0x4400~0x400000 : bl2 -# 0x400000~0x480000 : u-boot-env -# 0x480000~0x680000 : rf -# 0x680000~0x880000 : fip -# 0x880000~0x2880000 : kernel -# 0x2880000~0x12880000: rootfs - -# SD-card layout(Jaguar): -# 0x0~0x4400 : GPT -# 0x80000~0x400000 : bl2 -# 0x400000~0x480000 : u-boot-env -# 0x480000~0x880000 : rf -# 0x880000~0xa80000 : fip -# 0xa80000~0x2a80000 : kernel -# 0x2a80000~0x12a80000: rootfs - -sd: - gpt_start: 0x0 - bl2_start: 0x80000 - rf_start: 0x480000 - fip_start: 0x880000 - kernel_start: 0xa80000 - rootfs_start: 0x2a80000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/snfi-nand-default.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/snfi-nand-default.yml deleted file mode 100644 index b58b658ff..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/snfi-nand-default.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2021-2022 SkyLake Huang -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# NAND flash layout: -# 0x0~0x100000: BL2, 1024K -# 0x100000~0x180000: Uboot env, 512K -# 0x180000~0x380000: RF, 2048K -# 0x380000~0x580000: FIP, 2048K -# 0x580000~ : firmware - -snfi-nand: - bl2_start: 0x0 - rf_start: 0x180000 - fip_start: 0x380000 - kernel_start: 0x580000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/snfi-nand-mt7988.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/snfi-nand-mt7988.yml deleted file mode 100644 index c0ebe62fe..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/snfi-nand-mt7988.yml +++ /dev/null @@ -1,19 +0,0 @@ -# NAND flash layout(Panther/Cheetah): -# 0x0~0x100000: BL2, 1024K -# 0x100000~0x180000: Uboot env, 512K -# 0x180000~0x380000: RF, 2048K -# 0x380000~0x580000: FIP, 2048K -# 0x580000~ : firmware - -# NAND flash layout(Jaguar): -# 0x0~0x100000: BL2, 1024K -# 0x100000~0x180000: Uboot env, 512K -# 0x180000~0x580000: RF, 4096K -# 0x580000~0x780000: FIP, 2048K -# 0x780000~ : firmware - -snfi-nand: - bl2_start: 0x0 - rf_start: 0x180000 - fip_start: 0x580000 - kernel_start: 0x780000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-default.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-default.yml deleted file mode 100644 index 23e508282..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-default.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2021-2022 SkyLake Huang -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# NAND flash layout: -# 0x0~0x100000: BL2, 1024K -# 0x100000~0x180000: Uboot env, 512K -# 0x180000~0x380000: RF, 2048K -# 0x380000~0x580000: FIP, 2048K -# 0x580000~ : firmware - -spim-nand: - bl2_start: 0x0 - rf_start: 0x180000 - fip_start: 0x380000 - kernel_start: 0x580000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-mt7988.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-mt7988.yml deleted file mode 100644 index 747b0bdd1..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-mt7988.yml +++ /dev/null @@ -1,19 +0,0 @@ -# NAND flash layout(Panther/Cheetah): -# 0x0~0x100000: BL2, 1024K -# 0x100000~0x180000: Uboot env, 512K -# 0x180000~0x380000: RF, 2048K -# 0x380000~0x580000: FIP, 2048K -# 0x580000~ : firmware - -# NAND flash layout(Jaguar): -# 0x0~0x100000: BL2, 1024K -# 0x100000~0x180000: Uboot env, 512K -# 0x180000~0x580000: RF, 4096K -# 0x580000~0x780000: FIP, 2048K -# 0x780000~ : firmware - -spim-nand: - bl2_start: 0x0 - rf_start: 0x180000 - fip_start: 0x580000 - kernel_start: 0x780000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-slt.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-slt.yml deleted file mode 100644 index bc4de908b..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nand-slt.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2021-2022 SkyLake Huang -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# NAND flash layout: -# 0x0~0x100000 : BL2, 1024K -# 0x100000~0x180000 : Uboot env, 512K -# 0x180000~0x380000 : RF, 2048K -# 0x380000~0x1080000: FIP, 13M -# 0x1080000~ : firmware - -spim-nand: - bl2_start: 0x0 - rf_start: 0x180000 - fip_start: 0x380000 - kernel_start: 0x1080000 diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nor-mt7988.yml b/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nor-mt7988.yml deleted file mode 100644 index 566f6d390..000000000 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nor-mt7988.yml +++ /dev/null @@ -1,19 +0,0 @@ -# NOR flash layout(Panther/Cheetah): -# 0x0~0x40000 : BL2, 256K -# 0x40000~0x50000 : Uboot env, 64K -# 0x50000~0x100000: RF, 704K -# 0x100000~0x180000: FIP, 512K -# 0x180000~ : firmware - -# NOR flash layout(Jaguar): -# 0x0~0x40000 : BL2, 256K -# 0x40000~0x50000 : Uboot env, 64K -# 0x50000~0x250000: RF, 2048K -# 0x250000~0x2d0000: FIP, 512K -# 0x2d0000~ : firmware - -spim-nor: - bl2_start: 0x0 - rf_start: 0x50000 - fip_start: 0x250000 - kernel_start: 0x2d0000 diff --git a/atf-20231013-0ea67d76a/.checkpatch.conf b/atf-20240117-bacca82a8/.checkpatch.conf similarity index 100% rename from atf-20231013-0ea67d76a/.checkpatch.conf rename to atf-20240117-bacca82a8/.checkpatch.conf diff --git a/atf-20231013-0ea67d76a/.commitlintrc.js b/atf-20240117-bacca82a8/.commitlintrc.js similarity index 100% rename from atf-20231013-0ea67d76a/.commitlintrc.js rename to atf-20240117-bacca82a8/.commitlintrc.js diff --git a/atf-20231013-0ea67d76a/.cz.json b/atf-20240117-bacca82a8/.cz.json similarity index 100% rename from atf-20231013-0ea67d76a/.cz.json rename to atf-20240117-bacca82a8/.cz.json diff --git a/atf-20231013-0ea67d76a/.editorconfig b/atf-20240117-bacca82a8/.editorconfig similarity index 100% rename from atf-20231013-0ea67d76a/.editorconfig rename to atf-20240117-bacca82a8/.editorconfig diff --git a/atf-20231013-0ea67d76a/.gitignore b/atf-20240117-bacca82a8/.gitignore similarity index 95% rename from atf-20231013-0ea67d76a/.gitignore rename to atf-20240117-bacca82a8/.gitignore index e07d997cc..e94257a9a 100644 --- a/atf-20231013-0ea67d76a/.gitignore +++ b/atf-20240117-bacca82a8/.gitignore @@ -53,3 +53,7 @@ node_modules/ env/ .venv/ venv/ + +# MediaTek related +.vscode/ +Kconfiglib/__pycache__/ diff --git a/atf-20231013-0ea67d76a/.gitreview b/atf-20240117-bacca82a8/.gitreview similarity index 100% rename from atf-20231013-0ea67d76a/.gitreview rename to atf-20240117-bacca82a8/.gitreview diff --git a/atf-20231013-0ea67d76a/.husky/.gitignore b/atf-20240117-bacca82a8/.husky/.gitignore similarity index 100% rename from atf-20231013-0ea67d76a/.husky/.gitignore rename to atf-20240117-bacca82a8/.husky/.gitignore diff --git a/atf-20231013-0ea67d76a/.husky/commit-msg b/atf-20240117-bacca82a8/.husky/commit-msg similarity index 100% rename from atf-20231013-0ea67d76a/.husky/commit-msg rename to atf-20240117-bacca82a8/.husky/commit-msg diff --git a/atf-20231013-0ea67d76a/.husky/commit-msg.commitlint b/atf-20240117-bacca82a8/.husky/commit-msg.commitlint similarity index 100% rename from atf-20231013-0ea67d76a/.husky/commit-msg.commitlint rename to atf-20240117-bacca82a8/.husky/commit-msg.commitlint diff --git a/atf-20231013-0ea67d76a/.husky/commit-msg.gerrit b/atf-20240117-bacca82a8/.husky/commit-msg.gerrit similarity index 100% rename from atf-20231013-0ea67d76a/.husky/commit-msg.gerrit rename to atf-20240117-bacca82a8/.husky/commit-msg.gerrit diff --git a/atf-20231013-0ea67d76a/.husky/pre-commit b/atf-20240117-bacca82a8/.husky/pre-commit similarity index 100% rename from atf-20231013-0ea67d76a/.husky/pre-commit rename to atf-20240117-bacca82a8/.husky/pre-commit diff --git a/atf-20231013-0ea67d76a/.husky/pre-commit.copyright b/atf-20240117-bacca82a8/.husky/pre-commit.copyright similarity index 100% rename from atf-20231013-0ea67d76a/.husky/pre-commit.copyright rename to atf-20240117-bacca82a8/.husky/pre-commit.copyright diff --git a/atf-20231013-0ea67d76a/.husky/prepare-commit-msg b/atf-20240117-bacca82a8/.husky/prepare-commit-msg similarity index 100% rename from atf-20231013-0ea67d76a/.husky/prepare-commit-msg rename to atf-20240117-bacca82a8/.husky/prepare-commit-msg diff --git a/atf-20231013-0ea67d76a/.husky/prepare-commit-msg.cz b/atf-20240117-bacca82a8/.husky/prepare-commit-msg.cz similarity index 100% rename from atf-20231013-0ea67d76a/.husky/prepare-commit-msg.cz rename to atf-20240117-bacca82a8/.husky/prepare-commit-msg.cz diff --git a/atf-20231013-0ea67d76a/.nvmrc b/atf-20240117-bacca82a8/.nvmrc similarity index 100% rename from atf-20231013-0ea67d76a/.nvmrc rename to atf-20240117-bacca82a8/.nvmrc diff --git a/atf-20231013-0ea67d76a/.readthedocs.yaml b/atf-20240117-bacca82a8/.readthedocs.yaml similarity index 100% rename from atf-20231013-0ea67d76a/.readthedocs.yaml rename to atf-20240117-bacca82a8/.readthedocs.yaml diff --git a/atf-20231013-0ea67d76a/.versionrc.js b/atf-20240117-bacca82a8/.versionrc.js similarity index 100% rename from atf-20231013-0ea67d76a/.versionrc.js rename to atf-20240117-bacca82a8/.versionrc.js diff --git a/atf-20240117-bacca82a8/Config.in b/atf-20240117-bacca82a8/Config.in new file mode 100644 index 000000000..591ffac87 --- /dev/null +++ b/atf-20240117-bacca82a8/Config.in @@ -0,0 +1,7 @@ +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +source "plat/mediatek/apsoc_common/Config.in" diff --git a/atf-20231013-0ea67d76a/Kconfiglib/LICENSE.txt b/atf-20240117-bacca82a8/Kconfiglib/LICENSE.txt similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/LICENSE.txt rename to atf-20240117-bacca82a8/Kconfiglib/LICENSE.txt diff --git a/atf-20231013-0ea67d76a/Kconfiglib/MANIFEST.in b/atf-20240117-bacca82a8/Kconfiglib/MANIFEST.in similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/MANIFEST.in rename to atf-20240117-bacca82a8/Kconfiglib/MANIFEST.in diff --git a/atf-20231013-0ea67d76a/Kconfiglib/README.rst b/atf-20240117-bacca82a8/Kconfiglib/README.rst similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/README.rst rename to atf-20240117-bacca82a8/Kconfiglib/README.rst diff --git a/atf-20231013-0ea67d76a/Kconfiglib/alldefconfig.py b/atf-20240117-bacca82a8/Kconfiglib/alldefconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/alldefconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/alldefconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/allmodconfig.py b/atf-20240117-bacca82a8/Kconfiglib/allmodconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/allmodconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/allmodconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/allnoconfig.py b/atf-20240117-bacca82a8/Kconfiglib/allnoconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/allnoconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/allnoconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/allyesconfig.py b/atf-20240117-bacca82a8/Kconfiglib/allyesconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/allyesconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/allyesconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/defconfig.py b/atf-20240117-bacca82a8/Kconfiglib/defconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/defconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/defconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/genconfig.py b/atf-20240117-bacca82a8/Kconfiglib/genconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/genconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/genconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/guiconfig.py b/atf-20240117-bacca82a8/Kconfiglib/guiconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/guiconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/guiconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/kconfiglib.py b/atf-20240117-bacca82a8/Kconfiglib/kconfiglib.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/kconfiglib.py rename to atf-20240117-bacca82a8/Kconfiglib/kconfiglib.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/listnewconfig.py b/atf-20240117-bacca82a8/Kconfiglib/listnewconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/listnewconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/listnewconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/menuconfig.py b/atf-20240117-bacca82a8/Kconfiglib/menuconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/menuconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/menuconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/oldconfig.py b/atf-20240117-bacca82a8/Kconfiglib/oldconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/oldconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/oldconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/olddefconfig.py b/atf-20240117-bacca82a8/Kconfiglib/olddefconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/olddefconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/olddefconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/savedefconfig.py b/atf-20240117-bacca82a8/Kconfiglib/savedefconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/savedefconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/savedefconfig.py diff --git a/atf-20231013-0ea67d76a/Kconfiglib/setconfig.py b/atf-20240117-bacca82a8/Kconfiglib/setconfig.py similarity index 100% rename from atf-20231013-0ea67d76a/Kconfiglib/setconfig.py rename to atf-20240117-bacca82a8/Kconfiglib/setconfig.py diff --git a/atf-20231013-0ea67d76a/Makefile b/atf-20240117-bacca82a8/Makefile similarity index 96% rename from atf-20231013-0ea67d76a/Makefile rename to atf-20240117-bacca82a8/Makefile index 9a5624a62..c8cbfcd24 100644 --- a/atf-20231013-0ea67d76a/Makefile +++ b/atf-20240117-bacca82a8/Makefile @@ -8,8 +8,8 @@ # Trusted Firmware Version # VERSION_MAJOR := 2 -VERSION_MINOR := 9 -VERSION_PATCH := 0 +VERSION_MINOR := 10 +VERSION_PATCH := 0 # Only used for LTS releases VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} # Default goal is build all images @@ -35,16 +35,15 @@ ENABLE_ASSERTIONS := ${DEBUG} ENABLE_PMF := ${ENABLE_RUNTIME_INSTRUMENTATION} PLAT := ${DEFAULT_PLAT} +# Include Kconfig script +include makeconfig_pre.mk + ################################################################################ # Checkpatch script options ################################################################################ CHECKCODE_ARGS := --no-patch # Do not check the coding style on imported library files or documentation files -INC_ARM_DIRS_TO_CHECK := $(sort $(filter-out \ - include/drivers/arm/cryptocell, \ - $(wildcard include/drivers/arm/*))) -INC_ARM_DIRS_TO_CHECK += include/drivers/arm/cryptocell/*.h INC_DRV_DIRS_TO_CHECK := $(sort $(filter-out \ include/drivers/arm, \ $(wildcard include/drivers/*))) @@ -215,14 +214,14 @@ ifneq (${DEBUG}, 0) ASFLAGS += -g -Wa,-gdwarf-4 # Use LOG_LEVEL_INFO by default for debug builds - LOG_LEVEL := 40 + LOG_LEVEL ?= 40 else BUILD_TYPE := release TF_CFLAGS += -g -gdwarf-4 ASFLAGS += -g -Wa,-gdwarf-4 # Use LOG_LEVEL_NOTICE by default for release builds - LOG_LEVEL := 20 + LOG_LEVEL ?= 20 endif #(Debug) # Default build string (git branch and commit) @@ -315,6 +314,10 @@ WARNINGS += -Wunused-but-set-variable -Wmaybe-uninitialized \ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 TF_CFLAGS += $(call cc_option, --param=min-pagesize=0) +ifeq ($(HARDEN_SLS), 1) + TF_CFLAGS_aarch64 += $(call cc_option, -mharden-sls=all) +endif + else # using clang WARNINGS += -Wshift-overflow -Wshift-sign-overflow \ @@ -364,6 +367,7 @@ else ifneq ($(findstring gcc,$(notdir $(LD))),) TF_LDFLAGS += -Wl,-z,common-page-size=4096 #Configure page size constants TF_LDFLAGS += -Wl,-z,max-page-size=4096 + TF_LDFLAGS += -Wl,--build-id=none ifeq ($(ENABLE_LTO),1) ifeq (${ARCH},aarch64) @@ -373,8 +377,10 @@ else ifneq ($(findstring gcc,$(notdir $(LD))),) # GCC automatically adds fix-cortex-a53-843419 flag when used to link # which breaks some builds, so disable if errata fix is not explicitly enabled - ifneq (${ERRATA_A53_843419},1) - TF_LDFLAGS += -mno-fix-cortex-a53-843419 + ifeq (${ARCH},aarch64) + ifneq (${ERRATA_A53_843419},1) + TF_LDFLAGS += -mno-fix-cortex-a53-843419 + endif endif TF_LDFLAGS += -nostdlib TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH))) @@ -389,6 +395,7 @@ else TF_LDFLAGS += -z common-page-size=4096 # Configure page size constants TF_LDFLAGS += -z max-page-size=4096 + TF_LDFLAGS += --build-id=none # ld.lld doesn't recognize the errata flags, # therefore don't add those in that case. @@ -400,10 +407,6 @@ else endif #(LD = armlink) -DTC_FLAGS += -I dts -O dtb -DTC_CPPFLAGS += -P -nostdinc -Iinclude -Ifdts -undef \ - -x assembler-with-cpp $(DEFINES) - ################################################################################ # Setup ARCH_MAJOR/MINOR before parsing arch_features. ################################################################################ @@ -415,7 +418,6 @@ endif ################################################################################ # Common sources and include directories ################################################################################ -include ${MAKE_HELPERS_DIRECTORY}arch_features.mk include lib/compiler-rt/compiler-rt.mk BL_COMMON_SOURCES += common/bl_common.c \ @@ -446,106 +448,12 @@ INCLUDES += -Iinclude \ ${PLAT_INCLUDES} \ ${SPD_INCLUDES} +DTC_FLAGS += -I dts -O dtb +DTC_CPPFLAGS += -P -nostdinc $(INCLUDES) -Ifdts -undef \ + -x assembler-with-cpp $(DEFINES) + include common/backtrace/backtrace.mk -################################################################################ -# Process BRANCH_PROTECTION value and set -# Pointer Authentication and Branch Target Identification flags -################################################################################ -ifeq (${BRANCH_PROTECTION},0) - # Default value turns off all types of branch protection - BP_OPTION := none -else ifneq (${ARCH},aarch64) - $(error BRANCH_PROTECTION requires AArch64) -else ifeq (${BRANCH_PROTECTION},1) - # Enables all types of branch protection features - BP_OPTION := standard - ENABLE_BTI := 1 - ENABLE_PAUTH := 1 -else ifeq (${BRANCH_PROTECTION},2) - # Return address signing to its standard level - BP_OPTION := pac-ret - ENABLE_PAUTH := 1 -else ifeq (${BRANCH_PROTECTION},3) - # Extend the signing to include leaf functions - BP_OPTION := pac-ret+leaf - ENABLE_PAUTH := 1 -else ifeq (${BRANCH_PROTECTION},4) - # Turn on branch target identification mechanism - BP_OPTION := bti - ENABLE_BTI := 1 -else - $(error Unknown BRANCH_PROTECTION value ${BRANCH_PROTECTION}) -endif #(BRANCH_PROTECTION) - -ifeq ($(ENABLE_PAUTH),1) - CTX_INCLUDE_PAUTH_REGS := 1 -endif -ifneq (${BP_OPTION},none) - TF_CFLAGS_aarch64 += -mbranch-protection=${BP_OPTION} -endif #(BP_OPTION) - -# Pointer Authentication sources -ifeq (${ENABLE_PAUTH}, 1) -# arm/common/aarch64/arm_pauth.c contains a sample platform hook to complete the -# Pauth support. As it's not secure, it must be reimplemented for real platforms - BL_COMMON_SOURCES += lib/extensions/pauth/pauth_helpers.S -endif - -#################################################### -# Enable required options for Memory Stack Tagging. -#################################################### - -# Currently, these options are enabled only for clang and armclang compiler. -ifeq (${SUPPORT_STACK_MEMTAG},yes) - ifdef mem_tag_arch_support - # Check for armclang and clang compilers - ifneq ( ,$(filter $(notdir $(CC)),armclang clang)) - # Add "memtag" architecture feature modifier if not specified - ifeq ( ,$(findstring memtag,$(arch-features))) - arch-features := $(arch-features)+memtag - endif # memtag - ifeq ($(notdir $(CC)),armclang) - TF_CFLAGS += -mmemtag-stack - else ifeq ($(notdir $(CC)),clang) - TF_CFLAGS += -fsanitize=memtag - endif # armclang - endif - else - $(error "Error: stack memory tagging is not supported for \ - architecture ${ARCH},armv${ARM_ARCH_MAJOR}.${ARM_ARCH_MINOR}-a") - endif #(mem_tag_arch_support) -endif #(SUPPORT_STACK_MEMTAG) - -################################################################################ -# RME dependent flags configuration, Enable optional features for RME. -################################################################################ -# FEAT_RME -ifeq (${ENABLE_RME},1) - # RME doesn't support PIE - ifneq (${ENABLE_PIE},0) - $(error ENABLE_RME does not support PIE) - endif - - # RME doesn't support BRBE - ifneq (${ENABLE_BRBE_FOR_NS},0) - $(error ENABLE_RME does not support BRBE.) - endif - - # RME requires AARCH64 - ifneq (${ARCH},aarch64) - $(error ENABLE_RME requires AArch64) - endif - - # RME requires el2 context to be saved for now. - CTX_INCLUDE_EL2_REGS := 1 - CTX_INCLUDE_AARCH32_REGS := 0 - CTX_INCLUDE_PAUTH_REGS := 1 - - # RME enables CSV2_2 extension by default. - ENABLE_FEAT_CSV2_2 = 1 -endif #(FEAT_RME) - ################################################################################ # Generic definitions ################################################################################ @@ -602,6 +510,12 @@ ifneq (${SPD},none) ifneq ($(SP_LAYOUT_FILE),) BL2_ENABLE_SP_LOAD := 1 endif + + ifeq ($(SPMC_AT_EL3_SEL0_SP),1) + ifneq ($(SPMC_AT_EL3),1) + $(error SEL0 SP cannot be enabled without SPMC at EL3) + endif + endif else # All other SPDs in spd directory SPD_DIR := spd @@ -636,14 +550,118 @@ ifeq ($(SPMC_AT_EL3),1) endif endif -ifeq (${CTX_INCLUDE_EL2_REGS}, 1) - ifeq (${SPD},none) - ifeq (${ENABLE_RME},0) - $(error CTX_INCLUDE_EL2_REGS is available only when SPD \ - or RME is enabled) - endif - endif +################################################################################ +# Process BRANCH_PROTECTION value and set +# Pointer Authentication and Branch Target Identification flags +################################################################################ +ifeq (${BRANCH_PROTECTION},0) + # Default value turns off all types of branch protection + BP_OPTION := none +else ifneq (${ARCH},aarch64) + $(error BRANCH_PROTECTION requires AArch64) +else ifeq (${BRANCH_PROTECTION},1) + # Enables all types of branch protection features + BP_OPTION := standard + ENABLE_BTI := 1 + ENABLE_PAUTH := 1 +else ifeq (${BRANCH_PROTECTION},2) + # Return address signing to its standard level + BP_OPTION := pac-ret + ENABLE_PAUTH := 1 +else ifeq (${BRANCH_PROTECTION},3) + # Extend the signing to include leaf functions + BP_OPTION := pac-ret+leaf + ENABLE_PAUTH := 1 +else ifeq (${BRANCH_PROTECTION},4) + # Turn on branch target identification mechanism + BP_OPTION := bti + ENABLE_BTI := 1 +else + $(error Unknown BRANCH_PROTECTION value ${BRANCH_PROTECTION}) +endif #(BRANCH_PROTECTION) + +ifeq ($(ENABLE_PAUTH),1) + CTX_INCLUDE_PAUTH_REGS := 1 endif +ifneq (${BP_OPTION},none) + TF_CFLAGS_aarch64 += -mbranch-protection=${BP_OPTION} +endif #(BP_OPTION) + +# Pointer Authentication sources +ifeq (${ENABLE_PAUTH}, 1) +# arm/common/aarch64/arm_pauth.c contains a sample platform hook to complete the +# Pauth support. As it's not secure, it must be reimplemented for real platforms + BL_COMMON_SOURCES += lib/extensions/pauth/pauth_helpers.S +endif + +################################################################################ +# Include the platform specific Makefile after the SPD Makefile (the platform +# makefile may use all previous definitions in this file) +################################################################################ +include ${PLAT_MAKEFILE_FULL} + +################################################################################ +# Setup arch_features based on ARM_ARCH_MAJOR, ARM_ARCH_MINOR provided from +# platform. +################################################################################ +include ${MAKE_HELPERS_DIRECTORY}arch_features.mk + +#################################################### +# Enable required options for Memory Stack Tagging. +#################################################### + +# Currently, these options are enabled only for clang and armclang compiler. +ifeq (${SUPPORT_STACK_MEMTAG},yes) + ifdef mem_tag_arch_support + # Check for armclang and clang compilers + ifneq ( ,$(filter $(notdir $(CC)),armclang clang)) + # Add "memtag" architecture feature modifier if not specified + ifeq ( ,$(findstring memtag,$(arch-features))) + arch-features := $(arch-features)+memtag + endif # memtag + ifeq ($(notdir $(CC)),armclang) + TF_CFLAGS += -mmemtag-stack + else ifeq ($(notdir $(CC)),clang) + TF_CFLAGS += -fsanitize=memtag + endif # armclang + endif + else + $(error "Error: stack memory tagging is not supported for \ + architecture ${ARCH},armv${ARM_ARCH_MAJOR}.${ARM_ARCH_MINOR}-a") + endif #(mem_tag_arch_support) +endif #(SUPPORT_STACK_MEMTAG) + +################################################################################ +# RME dependent flags configuration, Enable optional features for RME. +################################################################################ +# FEAT_RME +ifeq (${ENABLE_RME},1) + # RME doesn't support BRBE + ENABLE_BRBE_FOR_NS := 0 + + # RME doesn't support PIE + ifneq (${ENABLE_PIE},0) + $(error ENABLE_RME does not support PIE) + endif + + # RME doesn't support BRBE + ifneq (${ENABLE_BRBE_FOR_NS},0) + $(error ENABLE_RME does not support BRBE.) + endif + + # RME requires AARCH64 + ifneq (${ARCH},aarch64) + $(error ENABLE_RME requires AArch64) + endif + + # RME requires el2 context to be saved for now. + CTX_INCLUDE_EL2_REGS := 1 + CTX_INCLUDE_AARCH32_REGS := 0 + CTX_INCLUDE_PAUTH_REGS := 1 + + # RME enables CSV2_2 extension by default. + ENABLE_FEAT_CSV2_2 = 1 +endif #(FEAT_RME) ################################################################################ # Include rmmd Makefile if RME is enabled @@ -665,12 +683,14 @@ include services/std_svc/rmmd/rmmd.mk $(warning "RME is an experimental feature") endif -################################################################################ -# Include the platform specific Makefile after the SPD Makefile (the platform -# makefile may use all previous definitions in this file) -################################################################################ - -include ${PLAT_MAKEFILE_FULL} +ifeq (${CTX_INCLUDE_EL2_REGS}, 1) + ifeq (${SPD},none) + ifeq (${ENABLE_RME},0) + $(error CTX_INCLUDE_EL2_REGS is available only when SPD \ + or RME is enabled) + endif + endif +endif ################################################################################ # Platform specific Makefile might provide us ARCH_MAJOR/MINOR use that to come @@ -697,6 +717,14 @@ else BL2_RUNS_AT_EL3 := 0 endif +# This internal flag is set to 1 when Firmware First handling of External aborts +# is required by lowe ELs. Currently only NS requires this support. +ifeq ($(HANDLE_EA_EL3_FIRST_NS),1) + FFH_SUPPORT := 1 +else + FFH_SUPPORT := 0 +endif + $(eval $(call MAKE_PREREQ_DIR,${BUILD_PLAT})) ifeq (${ARM_ARCH_MAJOR},7) @@ -858,18 +886,9 @@ endif # RAS_EXTENSION is deprecated, provide alternate build options ifeq ($(RAS_EXTENSION),1) $(error "RAS_EXTENSION is now deprecated, please use ENABLE_FEAT_RAS \ - and RAS_FFH_SUPPORT instead") + and HANDLE_EA_EL3_FIRST_NS instead") endif -# RAS firmware first handling requires that EAs are handled in EL3 first -ifeq ($(RAS_FFH_SUPPORT),1) - ifneq ($(ENABLE_FEAT_RAS),1) - $(error For RAS_FFH_SUPPORT, ENABLE_FEAT_RAS must also be 1) - endif - ifneq ($(HANDLE_EA_EL3_FIRST_NS),1) - $(error For RAS_FFH_SUPPORT, HANDLE_EA_EL3_FIRST_NS must also be 1) - endif -endif #(RAS_FFH_SUPPORT) # When FAULT_INJECTION_SUPPORT is used, require that FEAT_RAS is enabled ifeq ($(FAULT_INJECTION_SUPPORT),1) @@ -1162,6 +1181,7 @@ $(eval $(call assert_booleans,\ CTX_INCLUDE_AARCH32_REGS \ CTX_INCLUDE_FPREGS \ CTX_INCLUDE_EL2_REGS \ + CTX_INCLUDE_MPAM_REGS \ DEBUG \ DYN_DISABLE_AUTH \ EL3_EXCEPTION_HANDLING \ @@ -1176,18 +1196,20 @@ $(eval $(call assert_booleans,\ ENABLE_RUNTIME_INSTRUMENTATION \ ENABLE_SME_FOR_SWD \ ENABLE_SVE_FOR_SWD \ + ENABLE_FEAT_RAS \ + FFH_SUPPORT \ ERROR_DEPRECATED \ FAULT_INJECTION_SUPPORT \ GENERATE_COT \ GICV2_G0_FOR_EL3 \ HANDLE_EA_EL3_FIRST_NS \ + HARDEN_SLS \ HW_ASSISTED_COHERENCY \ MEASURED_BOOT \ DRTM_SUPPORT \ NS_TIMER_SWITCH \ OVERRIDE_LIBC \ PL011_GENERIC_UART \ - PLAT_RSS_NOT_SUPPORTED \ PROGRAMMABLE_RESET_ADDRESS \ PSCI_EXTENDED_STATE_ID \ PSCI_OS_INIT_MODE \ @@ -1199,6 +1221,7 @@ $(eval $(call assert_booleans,\ SPIN_ON_BL1_EXIT \ SPM_MM \ SPMC_AT_EL3 \ + SPMC_AT_EL3_SEL0_SP \ SPMD_SPM_AT_SEL2 \ ENABLE_SPMD_LP \ TRANSFER_LIST \ @@ -1229,9 +1252,10 @@ $(eval $(call assert_booleans,\ ERRATA_ABI_SUPPORT \ ERRATA_NON_ARM_INTERCONNECT \ CONDITIONAL_CMO \ - RAS_FFH_SUPPORT \ PSA_CRYPTO \ ENABLE_CONSOLE_GETC \ + INIT_UNUSED_NS_EL2 \ + PLATFORM_REPORT_CTX_MEM_USE \ ))) # Numeric_Flags @@ -1252,7 +1276,6 @@ $(eval $(call assert_numerics,\ ENABLE_FEAT_AMU \ ENABLE_FEAT_AMUv1p1 \ ENABLE_FEAT_CSV2_2 \ - ENABLE_FEAT_RAS \ ENABLE_FEAT_DIT \ ENABLE_FEAT_ECV \ ENABLE_FEAT_FGT \ @@ -1269,7 +1292,7 @@ $(eval $(call assert_numerics,\ ENABLE_FEAT_GCS \ ENABLE_FEAT_VHE \ ENABLE_FEAT_MTE_PERM \ - ENABLE_MPAM_FOR_LOWER_ELS \ + ENABLE_FEAT_MPAM \ ENABLE_RME \ ENABLE_SPE_FOR_NS \ ENABLE_SYS_REG_TRACE_FOR_NS \ @@ -1310,6 +1333,7 @@ $(eval $(call add_defines,\ CTX_INCLUDE_AARCH32_REGS \ CTX_INCLUDE_FPREGS \ CTX_INCLUDE_PAUTH_REGS \ + CTX_INCLUDE_MPAM_REGS \ EL3_EXCEPTION_HANDLING \ CTX_INCLUDE_MTE_REGS \ CTX_INCLUDE_EL2_REGS \ @@ -1322,7 +1346,7 @@ $(eval $(call add_defines,\ AMU_RESTRICT_COUNTERS \ ENABLE_ASSERTIONS \ ENABLE_BTI \ - ENABLE_MPAM_FOR_LOWER_ELS \ + ENABLE_FEAT_MPAM \ ENABLE_PAUTH \ ENABLE_PIE \ ENABLE_PMF \ @@ -1335,6 +1359,8 @@ $(eval $(call add_defines,\ ENABLE_SPE_FOR_NS \ ENABLE_SVE_FOR_NS \ ENABLE_SVE_FOR_SWD \ + ENABLE_FEAT_RAS \ + FFH_SUPPORT \ ENCRYPT_BL31 \ ENCRYPT_BL32 \ ERROR_DEPRECATED \ @@ -1348,12 +1374,9 @@ $(eval $(call add_defines,\ NS_TIMER_SWITCH \ PL011_GENERIC_UART \ PLAT_${PLAT} \ - PLAT_RSS_NOT_SUPPORTED \ PROGRAMMABLE_RESET_ADDRESS \ PSCI_EXTENDED_STATE_ID \ PSCI_OS_INIT_MODE \ - ENABLE_FEAT_RAS \ - RAS_FFH_SUPPORT \ RESET_TO_BL31 \ SEPARATE_CODE_AND_RODATA \ SEPARATE_BL2_NOLOAD_REGION \ @@ -1363,6 +1386,7 @@ $(eval $(call add_defines,\ SPIN_ON_BL1_EXIT \ SPM_MM \ SPMC_AT_EL3 \ + SPMC_AT_EL3_SEL0_SP \ SPMD_SPM_AT_SEL2 \ TRANSFER_LIST \ TRUSTED_BOARD_BOOT \ @@ -1424,8 +1448,17 @@ $(eval $(call add_defines,\ ENABLE_SPMD_LP \ PSA_CRYPTO \ ENABLE_CONSOLE_GETC \ + INIT_UNUSED_NS_EL2 \ + PLATFORM_REPORT_CTX_MEM_USE \ ))) +ifeq (${PLATFORM_REPORT_CTX_MEM_USE}, 1) +ifeq (${DEBUG}, 0) + $(warning "PLATFORM_REPORT_CTX_MEM_USE can be applied when DEBUG=1 only") + override PLATFORM_REPORT_CTX_MEM_USE := 0 +endif +endif + ifeq (${SANITIZE_UB},trap) $(eval $(call add_define,MONITOR_TRAPS)) endif #(SANITIZE_UB) @@ -1781,5 +1814,8 @@ help: @echo "example: build all targets for the FVP platform:" @echo " CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all" +# Include Kconfig script +include makeconfig_post.mk + .PHONY: FORCE FORCE:; diff --git a/atf-20231013-0ea67d76a/bl1/aarch32/bl1_arch_setup.c b/atf-20240117-bacca82a8/bl1/aarch32/bl1_arch_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch32/bl1_arch_setup.c rename to atf-20240117-bacca82a8/bl1/aarch32/bl1_arch_setup.c diff --git a/atf-20231013-0ea67d76a/bl1/aarch32/bl1_context_mgmt.c b/atf-20240117-bacca82a8/bl1/aarch32/bl1_context_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch32/bl1_context_mgmt.c rename to atf-20240117-bacca82a8/bl1/aarch32/bl1_context_mgmt.c diff --git a/atf-20231013-0ea67d76a/bl1/aarch32/bl1_entrypoint.S b/atf-20240117-bacca82a8/bl1/aarch32/bl1_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch32/bl1_entrypoint.S rename to atf-20240117-bacca82a8/bl1/aarch32/bl1_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl1/aarch32/bl1_exceptions.S b/atf-20240117-bacca82a8/bl1/aarch32/bl1_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch32/bl1_exceptions.S rename to atf-20240117-bacca82a8/bl1/aarch32/bl1_exceptions.S diff --git a/atf-20231013-0ea67d76a/bl1/aarch64/bl1_arch_setup.c b/atf-20240117-bacca82a8/bl1/aarch64/bl1_arch_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch64/bl1_arch_setup.c rename to atf-20240117-bacca82a8/bl1/aarch64/bl1_arch_setup.c diff --git a/atf-20231013-0ea67d76a/bl1/aarch64/bl1_context_mgmt.c b/atf-20240117-bacca82a8/bl1/aarch64/bl1_context_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch64/bl1_context_mgmt.c rename to atf-20240117-bacca82a8/bl1/aarch64/bl1_context_mgmt.c diff --git a/atf-20231013-0ea67d76a/bl1/aarch64/bl1_entrypoint.S b/atf-20240117-bacca82a8/bl1/aarch64/bl1_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch64/bl1_entrypoint.S rename to atf-20240117-bacca82a8/bl1/aarch64/bl1_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl1/aarch64/bl1_exceptions.S b/atf-20240117-bacca82a8/bl1/aarch64/bl1_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/bl1/aarch64/bl1_exceptions.S rename to atf-20240117-bacca82a8/bl1/aarch64/bl1_exceptions.S diff --git a/atf-20231013-0ea67d76a/bl1/bl1.ld.S b/atf-20240117-bacca82a8/bl1/bl1.ld.S similarity index 95% rename from atf-20231013-0ea67d76a/bl1/bl1.ld.S rename to atf-20240117-bacca82a8/bl1/bl1.ld.S index 49dda855e..d25ec63fb 100644 --- a/atf-20231013-0ea67d76a/bl1/bl1.ld.S +++ b/atf-20240117-bacca82a8/bl1/bl1.ld.S @@ -36,6 +36,9 @@ SECTIONS { #if SEPARATE_CODE_AND_RODATA .text . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".text address is not aligned on a page boundary."); + __TEXT_START__ = .; *bl1_entrypoint.o(.text*) @@ -80,6 +83,9 @@ SECTIONS { } >ROM #else /* SEPARATE_CODE_AND_RODATA */ .ro . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".ro address is not aligned on a page boundary."); + __RO_START__ = .; *bl1_entrypoint.o(.text*) diff --git a/atf-20231013-0ea67d76a/bl1/bl1.mk b/atf-20240117-bacca82a8/bl1/bl1.mk similarity index 100% rename from atf-20231013-0ea67d76a/bl1/bl1.mk rename to atf-20240117-bacca82a8/bl1/bl1.mk diff --git a/atf-20231013-0ea67d76a/bl1/bl1_fwu.c b/atf-20240117-bacca82a8/bl1/bl1_fwu.c similarity index 100% rename from atf-20231013-0ea67d76a/bl1/bl1_fwu.c rename to atf-20240117-bacca82a8/bl1/bl1_fwu.c diff --git a/atf-20231013-0ea67d76a/bl1/bl1_main.c b/atf-20240117-bacca82a8/bl1/bl1_main.c similarity index 100% rename from atf-20231013-0ea67d76a/bl1/bl1_main.c rename to atf-20240117-bacca82a8/bl1/bl1_main.c diff --git a/atf-20231013-0ea67d76a/bl1/bl1_private.h b/atf-20240117-bacca82a8/bl1/bl1_private.h similarity index 100% rename from atf-20231013-0ea67d76a/bl1/bl1_private.h rename to atf-20240117-bacca82a8/bl1/bl1_private.h diff --git a/atf-20231013-0ea67d76a/bl1/tbbr/tbbr_img_desc.c b/atf-20240117-bacca82a8/bl1/tbbr/tbbr_img_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/bl1/tbbr/tbbr_img_desc.c rename to atf-20240117-bacca82a8/bl1/tbbr/tbbr_img_desc.c diff --git a/atf-20231013-0ea67d76a/bl2/aarch32/bl2_arch_setup.c b/atf-20240117-bacca82a8/bl2/aarch32/bl2_arch_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch32/bl2_arch_setup.c rename to atf-20240117-bacca82a8/bl2/aarch32/bl2_arch_setup.c diff --git a/atf-20231013-0ea67d76a/bl2/aarch32/bl2_el3_entrypoint.S b/atf-20240117-bacca82a8/bl2/aarch32/bl2_el3_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch32/bl2_el3_entrypoint.S rename to atf-20240117-bacca82a8/bl2/aarch32/bl2_el3_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch32/bl2_el3_exceptions.S b/atf-20240117-bacca82a8/bl2/aarch32/bl2_el3_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch32/bl2_el3_exceptions.S rename to atf-20240117-bacca82a8/bl2/aarch32/bl2_el3_exceptions.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch32/bl2_entrypoint.S b/atf-20240117-bacca82a8/bl2/aarch32/bl2_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch32/bl2_entrypoint.S rename to atf-20240117-bacca82a8/bl2/aarch32/bl2_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch32/bl2_run_next_image.S b/atf-20240117-bacca82a8/bl2/aarch32/bl2_run_next_image.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch32/bl2_run_next_image.S rename to atf-20240117-bacca82a8/bl2/aarch32/bl2_run_next_image.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch64/bl2_arch_setup.c b/atf-20240117-bacca82a8/bl2/aarch64/bl2_arch_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch64/bl2_arch_setup.c rename to atf-20240117-bacca82a8/bl2/aarch64/bl2_arch_setup.c diff --git a/atf-20231013-0ea67d76a/bl2/aarch64/bl2_el3_entrypoint.S b/atf-20240117-bacca82a8/bl2/aarch64/bl2_el3_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch64/bl2_el3_entrypoint.S rename to atf-20240117-bacca82a8/bl2/aarch64/bl2_el3_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch64/bl2_el3_exceptions.S b/atf-20240117-bacca82a8/bl2/aarch64/bl2_el3_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch64/bl2_el3_exceptions.S rename to atf-20240117-bacca82a8/bl2/aarch64/bl2_el3_exceptions.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch64/bl2_entrypoint.S b/atf-20240117-bacca82a8/bl2/aarch64/bl2_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch64/bl2_entrypoint.S rename to atf-20240117-bacca82a8/bl2/aarch64/bl2_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch64/bl2_rme_entrypoint.S b/atf-20240117-bacca82a8/bl2/aarch64/bl2_rme_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch64/bl2_rme_entrypoint.S rename to atf-20240117-bacca82a8/bl2/aarch64/bl2_rme_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2/aarch64/bl2_run_next_image.S b/atf-20240117-bacca82a8/bl2/aarch64/bl2_run_next_image.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2/aarch64/bl2_run_next_image.S rename to atf-20240117-bacca82a8/bl2/aarch64/bl2_run_next_image.S diff --git a/atf-20231013-0ea67d76a/bl2/bl2.ld.S b/atf-20240117-bacca82a8/bl2/bl2.ld.S similarity index 94% rename from atf-20231013-0ea67d76a/bl2/bl2.ld.S rename to atf-20240117-bacca82a8/bl2/bl2.ld.S index db83a0c50..310e6fe78 100644 --- a/atf-20231013-0ea67d76a/bl2/bl2.ld.S +++ b/atf-20240117-bacca82a8/bl2/bl2.ld.S @@ -25,6 +25,9 @@ SECTIONS { #if SEPARATE_CODE_AND_RODATA .text . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".text address is not aligned on a page boundary."); + __TEXT_START__ = .; #if ENABLE_RME @@ -65,6 +68,9 @@ SECTIONS { } >RAM #else /* SEPARATE_CODE_AND_RODATA */ .ro . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".ro address is not aligned on a page boundary."); + __RO_START__ = .; *bl2_entrypoint.o(.text*) diff --git a/atf-20231013-0ea67d76a/bl2/bl2.mk b/atf-20240117-bacca82a8/bl2/bl2.mk similarity index 100% rename from atf-20231013-0ea67d76a/bl2/bl2.mk rename to atf-20240117-bacca82a8/bl2/bl2.mk diff --git a/atf-20231013-0ea67d76a/bl2/bl2_el3.ld.S b/atf-20240117-bacca82a8/bl2/bl2_el3.ld.S similarity index 96% rename from atf-20231013-0ea67d76a/bl2/bl2_el3.ld.S rename to atf-20240117-bacca82a8/bl2/bl2_el3.ld.S index 4aa5cb045..811f41e14 100644 --- a/atf-20231013-0ea67d76a/bl2/bl2_el3.ld.S +++ b/atf-20240117-bacca82a8/bl2/bl2_el3.ld.S @@ -55,6 +55,9 @@ SECTIONS { #if SEPARATE_CODE_AND_RODATA .text . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".text address is not aligned on a page boundary."); + __TEXT_START__ = .; __TEXT_RESIDENT_START__ = .; @@ -89,6 +92,9 @@ SECTIONS { "Resident part of BL2 has exceeded its limit.") #else /* SEPARATE_CODE_AND_RODATA */ .ro . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".ro address is not aligned on a page boundary."); + __RO_START__ = .; __TEXT_RESIDENT_START__ = .; diff --git a/atf-20231013-0ea67d76a/bl2/bl2_image_load_v2.c b/atf-20240117-bacca82a8/bl2/bl2_image_load_v2.c similarity index 100% rename from atf-20231013-0ea67d76a/bl2/bl2_image_load_v2.c rename to atf-20240117-bacca82a8/bl2/bl2_image_load_v2.c diff --git a/atf-20231013-0ea67d76a/bl2/bl2_main.c b/atf-20240117-bacca82a8/bl2/bl2_main.c similarity index 100% rename from atf-20231013-0ea67d76a/bl2/bl2_main.c rename to atf-20240117-bacca82a8/bl2/bl2_main.c diff --git a/atf-20231013-0ea67d76a/bl2/bl2_private.h b/atf-20240117-bacca82a8/bl2/bl2_private.h similarity index 100% rename from atf-20231013-0ea67d76a/bl2/bl2_private.h rename to atf-20240117-bacca82a8/bl2/bl2_private.h diff --git a/atf-20231013-0ea67d76a/bl2pl/aarch32/bl2pl_entrypoint.S b/atf-20240117-bacca82a8/bl2pl/aarch32/bl2pl_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2pl/aarch32/bl2pl_entrypoint.S rename to atf-20240117-bacca82a8/bl2pl/aarch32/bl2pl_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2pl/aarch64/bl2pl_entrypoint.S b/atf-20240117-bacca82a8/bl2pl/aarch64/bl2pl_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2pl/aarch64/bl2pl_entrypoint.S rename to atf-20240117-bacca82a8/bl2pl/aarch64/bl2pl_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2pl/bl2pl.ld.S b/atf-20240117-bacca82a8/bl2pl/bl2pl.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2pl/bl2pl.ld.S rename to atf-20240117-bacca82a8/bl2pl/bl2pl.ld.S diff --git a/atf-20231013-0ea67d76a/bl2pl/bl2pl.mk b/atf-20240117-bacca82a8/bl2pl/bl2pl.mk similarity index 100% rename from atf-20231013-0ea67d76a/bl2pl/bl2pl.mk rename to atf-20240117-bacca82a8/bl2pl/bl2pl.mk diff --git a/atf-20231013-0ea67d76a/bl2pl/bl2pl_main.c b/atf-20240117-bacca82a8/bl2pl/bl2pl_main.c similarity index 100% rename from atf-20231013-0ea67d76a/bl2pl/bl2pl_main.c rename to atf-20240117-bacca82a8/bl2pl/bl2pl_main.c diff --git a/atf-20231013-0ea67d76a/bl2u/aarch32/bl2u_entrypoint.S b/atf-20240117-bacca82a8/bl2u/aarch32/bl2u_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2u/aarch32/bl2u_entrypoint.S rename to atf-20240117-bacca82a8/bl2u/aarch32/bl2u_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2u/aarch64/bl2u_entrypoint.S b/atf-20240117-bacca82a8/bl2u/aarch64/bl2u_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl2u/aarch64/bl2u_entrypoint.S rename to atf-20240117-bacca82a8/bl2u/aarch64/bl2u_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl2u/bl2u.ld.S b/atf-20240117-bacca82a8/bl2u/bl2u.ld.S similarity index 93% rename from atf-20231013-0ea67d76a/bl2u/bl2u.ld.S rename to atf-20240117-bacca82a8/bl2u/bl2u.ld.S index 7b1a10103..ee6a02065 100644 --- a/atf-20231013-0ea67d76a/bl2u/bl2u.ld.S +++ b/atf-20240117-bacca82a8/bl2u/bl2u.ld.S @@ -27,6 +27,9 @@ SECTIONS { #if SEPARATE_CODE_AND_RODATA .text . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".text address is not aligned on a page boundary."); + __TEXT_START__ = .; *bl2u_entrypoint.o(.text*) @@ -60,6 +63,9 @@ SECTIONS { } >RAM #else /* SEPARATE_CODE_AND_RODATA */ .ro . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".ro address is not aligned on a page boundary."); + __RO_START__ = .; *bl2u_entrypoint.o(.text*) diff --git a/atf-20231013-0ea67d76a/bl2u/bl2u.mk b/atf-20240117-bacca82a8/bl2u/bl2u.mk similarity index 100% rename from atf-20231013-0ea67d76a/bl2u/bl2u.mk rename to atf-20240117-bacca82a8/bl2u/bl2u.mk diff --git a/atf-20231013-0ea67d76a/bl2u/bl2u_main.c b/atf-20240117-bacca82a8/bl2u/bl2u_main.c similarity index 100% rename from atf-20231013-0ea67d76a/bl2u/bl2u_main.c rename to atf-20240117-bacca82a8/bl2u/bl2u_main.c diff --git a/atf-20231013-0ea67d76a/bl31/aarch64/bl31_entrypoint.S b/atf-20240117-bacca82a8/bl31/aarch64/bl31_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl31/aarch64/bl31_entrypoint.S rename to atf-20240117-bacca82a8/bl31/aarch64/bl31_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl31/aarch64/crash_reporting.S b/atf-20240117-bacca82a8/bl31/aarch64/crash_reporting.S similarity index 100% rename from atf-20231013-0ea67d76a/bl31/aarch64/crash_reporting.S rename to atf-20240117-bacca82a8/bl31/aarch64/crash_reporting.S diff --git a/atf-20231013-0ea67d76a/bl31/aarch64/ea_delegate.S b/atf-20240117-bacca82a8/bl31/aarch64/ea_delegate.S similarity index 69% rename from atf-20231013-0ea67d76a/bl31/aarch64/ea_delegate.S rename to atf-20240117-bacca82a8/bl31/aarch64/ea_delegate.S index dd6b4dc9c..28d218737 100644 --- a/atf-20231013-0ea67d76a/bl31/aarch64/ea_delegate.S +++ b/atf-20240117-bacca82a8/bl31/aarch64/ea_delegate.S @@ -15,31 +15,11 @@ #include #include - .globl handle_lower_el_ea_esb .globl handle_lower_el_sync_ea .globl handle_lower_el_async_ea - - + .globl handle_pending_async_ea /* - * Function to delegate External Aborts synchronized by ESB instruction at EL3 - * vector entry. This function assumes GP registers x0-x29 have been saved, and - * are available for use. It delegates the handling of the EA to platform - * handler, and returns only upon successfully handling the EA; otherwise - * panics. On return from this function, the original exception handler is - * expected to resume. - */ -func handle_lower_el_ea_esb - mov x0, #ERROR_EA_ESB - mrs x1, DISR_EL1 - b ea_proceed -endfunc handle_lower_el_ea_esb - - -/* - * This function forms the tail end of Synchronous Exception entry from lower - * EL, and expects to handle Synchronous External Aborts from lower EL and CPU - * Implementation Defined Exceptions. If any other kind of exception is detected, - * then this function reports unhandled exception. + * This function handles Synchronous External Aborts from lower EL. * * It delegates the handling of the EA to platform handler, and upon successfully * handling the EA, exits EL3; otherwise panics. @@ -57,27 +37,8 @@ func handle_lower_el_sync_ea cmp x30, #EC_DABORT_LOWER_EL b.eq 1f - /* Save GP registers */ - stp x0, x1, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X0] - stp x2, x3, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X2] - stp x4, x5, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X4] - - /* Get the cpu_ops pointer */ - bl get_cpu_ops_ptr - - /* Get the cpu_ops exception handler */ - ldr x0, [x0, #CPU_E_HANDLER_FUNC] - - /* - * If the reserved function pointer is NULL, this CPU does not have an - * implementation defined exception handler function - */ - cbz x0, 2f - mrs x1, esr_el3 - ubfx x1, x1, #ESR_EC_SHIFT, #ESR_EC_LENGTH - blr x0 - b 2f - + /* EA other than above are unhandled exceptions */ + no_ret report_unhandled_exception 1: /* * Save general purpose and ARMv8.3-PAuth registers (if enabled). @@ -98,14 +59,6 @@ func handle_lower_el_sync_ea /* el3_exit assumes SP_EL0 on entry */ msr spsel, #MODE_SP_EL0 b el3_exit -2: - ldp x0, x1, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X0] - ldp x2, x3, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X2] - ldp x4, x5, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X4] - - /* Synchronous exceptions other than the above are assumed to be EA */ - ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] - no_ret report_unhandled_exception endfunc handle_lower_el_sync_ea @@ -140,6 +93,73 @@ func handle_lower_el_async_ea b el3_exit endfunc handle_lower_el_async_ea +/* + * Handler for async EA from lower EL synchronized at EL3 entry in FFH mode. + * + * This scenario may arise when there is an error (EA) in the system which is not + * yet signaled to PE while executing in lower EL. During entry into EL3, the errors + * are synchronized either implicitly or explicitly causing async EA to pend at EL3. + * + * On detecting the pending EA (via ISR_EL1.A), if the EA routing model is Firmware + * First handling (FFH, SCR_EL3.EA = 1) this handler first handles the pending EA + * and then handles the original exception. + * + * This function assumes x30 has been saved. + */ +func handle_pending_async_ea + /* + * Prepare for nested handling of EA. Stash sysregs clobbered by nested + * exception and handler + */ + str x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_GPREG_LR] + mrs x30, esr_el3 + str x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ESR_EL3] + mrs x30, spsr_el3 + str x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_SPSR_EL3] + mrs x30, elr_el3 + str x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ELR_EL3] + + mov x30, #1 + str x30, [sp, #CTX_EL3STATE_OFFSET + CTX_NESTED_EA_FLAG] + /* + * Restore the original x30 saved as part of entering EL3. This is not + * required for the current function but for EL3 SError vector entry + * once PSTATE.A bit is unmasked. We restore x30 and then the same + * value is stored in EL3 SError vector entry. + */ + ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] + + /* + * After clearing PSTATE.A bit pending SError will trigger at current EL. + * Put explicit synchronization event to ensure newly unmasked interrupt + * is taken immediately. + */ + unmask_async_ea + + /* Restore the original exception information along with zeroing the storage */ + ldr x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ELR_EL3] + msr elr_el3, x30 + str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ELR_EL3] + ldr x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_SPSR_EL3] + msr spsr_el3, x30 + str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_SPSR_EL3] + ldr x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ESR_EL3] + msr esr_el3, x30 + str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ESR_EL3] + + /* + * If the original exception corresponds to SError from lower El, eret back + * to lower EL, otherwise return to vector table for original exception handling. + */ + ubfx x30, x30, #ESR_EC_SHIFT, #ESR_EC_LENGTH + cmp x30, #EC_SERROR + ldr x30, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_GPREG_LR] + str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_GPREG_LR] + b.eq 1f + ret +1: + exception_return +endfunc handle_pending_async_ea /* * Prelude for Synchronous External Abort handling. This function assumes that @@ -149,7 +169,7 @@ endfunc handle_lower_el_async_ea * x1: EA syndrome */ func delegate_sync_ea -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS /* * Check for Uncontainable error type. If so, route to the platform * fatal error handler rather than the generic EA one. @@ -179,7 +199,7 @@ endfunc delegate_sync_ea * x1: EA syndrome */ func delegate_async_ea -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS /* Check Exception Class to ensure SError, as this function should * only be invoked for SError. If that is not the case, which implies * either an HW error or programming error, panic. diff --git a/atf-20231013-0ea67d76a/bl31/aarch64/runtime_exceptions.S b/atf-20240117-bacca82a8/bl31/aarch64/runtime_exceptions.S similarity index 69% rename from atf-20231013-0ea67d76a/bl31/aarch64/runtime_exceptions.S rename to atf-20240117-bacca82a8/bl31/aarch64/runtime_exceptions.S index 7336b91e5..ed483111c 100644 --- a/atf-20231013-0ea67d76a/bl31/aarch64/runtime_exceptions.S +++ b/atf-20240117-bacca82a8/bl31/aarch64/runtime_exceptions.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2023, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -47,72 +48,30 @@ str x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] .endm - /* - * Macro that prepares entry to EL3 upon taking an exception. - * - * With RAS_FFH_SUPPORT, this macro synchronizes pending errors with an - * ESB instruction. When an error is thus synchronized, the handling is - * delegated to platform EA handler. - * - * Without RAS_FFH_SUPPORT, this macro synchronizes pending errors using - * a DSB, unmasks Asynchronous External Aborts and saves X30 before - * setting the flag CTX_IS_IN_EL3. - */ - .macro check_and_unmask_ea -#if RAS_FFH_SUPPORT - /* Synchronize pending External Aborts */ - esb - - /* Unmask the SError interrupt */ - msr daifclr, #DAIF_ABT_BIT - - /* Check for SErrors synchronized by the ESB instruction */ - mrs x30, DISR_EL1 - tbz x30, #DISR_A_BIT, 1f + .macro restore_x30 + ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] + .endm /* - * Save general purpose and ARMv8.3-PAuth registers (if enabled). - * Also save PMCR_EL0 and set the PSTATE to a known state. + * Macro that synchronizes errors (EA) and checks for pending SError. + * On detecting a pending SError it either reflects it back to lower + * EL (KFH) or handles it in EL3 (FFH) based on EA routing model. */ - bl prepare_el3_entry - - bl handle_lower_el_ea_esb - - /* Restore general purpose, PMCR_EL0 and ARMv8.3-PAuth registers */ - bl restore_gp_pmcr_pauth_regs -1: -#else - /* - * Note 1: The explicit DSB at the entry of various exception vectors - * for handling exceptions from lower ELs can inadvertently trigger an - * SError exception in EL3 due to pending asynchronous aborts in lower - * ELs. This will end up being handled by serror_sp_elx which will - * ultimately panic and die. - * The way to workaround is to update a flag to indicate if the exception - * truly came from EL3. This flag is allocated in the cpu_context - * structure and located at offset "CTX_EL3STATE_OFFSET + CTX_IS_IN_EL3" - * This is not a bullet proof solution to the problem at hand because - * we assume the instructions following "isb" that help to update the - * flag execute without causing further exceptions. - */ - - /* - * For SoCs which do not implement RAS, use DSB as a barrier to - * synchronize pending external aborts. - */ - dsb sy - - /* Unmask the SError interrupt */ - msr daifclr, #DAIF_ABT_BIT - - /* Use ISB for the above unmask operation to take effect immediately */ - isb - - /* Refer Note 1. */ - mov x30, #1 - str x30, [sp, #CTX_EL3STATE_OFFSET + CTX_IS_IN_EL3] - dmb sy + .macro sync_and_handle_pending_serror + synchronize_errors + mrs x30, ISR_EL1 + tbz x30, #ISR_A_SHIFT, 2f +#if FFH_SUPPORT + mrs x30, scr_el3 + tst x30, #SCR_EA_BIT + b.eq 1f + bl handle_pending_async_ea + b 2f #endif +1: + /* This function never returns, but need LR for decision making */ + bl reflect_pending_async_ea_to_lower_el +2: .endm /* --------------------------------------------------------------------- @@ -147,9 +106,19 @@ cmp x30, #EC_AARCH64_SYS b.eq sync_handler64 - /* Synchronous exceptions other than the above are assumed to be EA */ - ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] + cmp x30, #EC_IMP_DEF_EL3 + b.eq imp_def_el3_handler + + /* If FFH Support then try to handle lower EL EA exceptions. */ +#if FFH_SUPPORT + mrs x30, scr_el3 + tst x30, #SCR_EA_BIT + b.eq 1f b handle_lower_el_sync_ea +#endif +1: + /* Synchronous exceptions other than the above are unhandled */ + b report_unhandled_exception .endm vector_base runtime_exceptions @@ -217,22 +186,33 @@ vector_entry fiq_sp_elx end_vector_entry fiq_sp_elx vector_entry serror_sp_elx -#if !RAS_FFH_SUPPORT +#if FFH_SUPPORT /* * This will trigger if the exception was taken due to SError in EL3 or * because of pending asynchronous external aborts from lower EL that got - * triggered due to explicit synchronization in EL3. Refer Note 1. + * triggered due to implicit/explicit synchronization in EL3 (SCR_EL3.EA=1) + * during EL3 entry. For the former case we continue with "plat_handle_el3_ea". + * The later case will occur when PSTATE.A bit is cleared in + * "handle_pending_async_ea". This means we are doing a nested + * exception in EL3. Call the handler for async EA which will eret back to + * original el3 handler if it is nested exception. Also, unmask EA so that we + * catch any further EA arise when handling this nested exception at EL3. */ - /* Assumes SP_EL3 on entry */ save_x30 - ldr x30, [sp, #CTX_EL3STATE_OFFSET + CTX_IS_IN_EL3] - cbnz x30, 1f - - /* Handle asynchronous external abort from lower EL */ + ldr x30, [sp, #CTX_EL3STATE_OFFSET + CTX_NESTED_EA_FLAG] + cbz x30, 1f + /* + * This is nested exception handling, clear the flag to avoid taking this + * path for further exceptions caused by EA handling + */ + str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_NESTED_EA_FLAG] + unmask_async_ea b handle_lower_el_async_ea 1: + restore_x30 #endif no_ret plat_handle_el3_ea + end_vector_entry serror_sp_elx /* --------------------------------------------------------------------- @@ -248,34 +228,41 @@ vector_entry sync_exception_aarch64 */ save_x30 apply_at_speculative_wa - check_and_unmask_ea + sync_and_handle_pending_serror + unmask_async_ea handle_sync_exception end_vector_entry sync_exception_aarch64 vector_entry irq_aarch64 save_x30 apply_at_speculative_wa - check_and_unmask_ea + sync_and_handle_pending_serror + unmask_async_ea b handle_interrupt_exception end_vector_entry irq_aarch64 vector_entry fiq_aarch64 save_x30 apply_at_speculative_wa - check_and_unmask_ea + sync_and_handle_pending_serror + unmask_async_ea b handle_interrupt_exception end_vector_entry fiq_aarch64 + /* + * Need to synchronize any outstanding SError since we can get a burst of errors. + * So reuse the sync mechanism to catch any further errors which are pending. + */ vector_entry serror_aarch64 +#if FFH_SUPPORT save_x30 apply_at_speculative_wa -#if RAS_FFH_SUPPORT - msr daifclr, #DAIF_ABT_BIT -#else - check_and_unmask_ea -#endif + sync_and_handle_pending_serror + unmask_async_ea b handle_lower_el_async_ea - +#else + b report_unhandled_exception +#endif end_vector_entry serror_aarch64 /* --------------------------------------------------------------------- @@ -291,34 +278,41 @@ vector_entry sync_exception_aarch32 */ save_x30 apply_at_speculative_wa - check_and_unmask_ea + sync_and_handle_pending_serror + unmask_async_ea handle_sync_exception end_vector_entry sync_exception_aarch32 vector_entry irq_aarch32 save_x30 apply_at_speculative_wa - check_and_unmask_ea + sync_and_handle_pending_serror + unmask_async_ea b handle_interrupt_exception end_vector_entry irq_aarch32 vector_entry fiq_aarch32 save_x30 apply_at_speculative_wa - check_and_unmask_ea + sync_and_handle_pending_serror + unmask_async_ea b handle_interrupt_exception end_vector_entry fiq_aarch32 + /* + * Need to synchronize any outstanding SError since we can get a burst of errors. + * So reuse the sync mechanism to catch any further errors which are pending. + */ vector_entry serror_aarch32 +#if FFH_SUPPORT save_x30 apply_at_speculative_wa -#if RAS_FFH_SUPPORT - msr daifclr, #DAIF_ABT_BIT -#else - check_and_unmask_ea -#endif + sync_and_handle_pending_serror + unmask_async_ea b handle_lower_el_async_ea - +#else + b report_unhandled_exception +#endif end_vector_entry serror_aarch32 #ifdef MONITOR_TRAPS @@ -401,7 +395,7 @@ sync_handler64: #if ENABLE_RME /* Copy SCR_EL3.NSE bit to the flag to indicate caller's security */ - ubfx x7, x18, #SCR_NSE_SHIFT, 1 + ubfx x7, x18, #SCR_NSE_SHIFT, #1 /* * Shift copied SCR_EL3.NSE bit by 5 to create space for @@ -608,6 +602,114 @@ interrupt_exit: b el3_exit endfunc handle_interrupt_exception +func imp_def_el3_handler + /* Save GP registers */ + stp x0, x1, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X0] + stp x2, x3, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X2] + stp x4, x5, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X4] + + /* Get the cpu_ops pointer */ + bl get_cpu_ops_ptr + + /* Get the cpu_ops exception handler */ + ldr x0, [x0, #CPU_E_HANDLER_FUNC] + + /* + * If the reserved function pointer is NULL, this CPU does not have an + * implementation defined exception handler function + */ + cbz x0, el3_handler_exit + mrs x1, esr_el3 + ubfx x1, x1, #ESR_EC_SHIFT, #ESR_EC_LENGTH + blr x0 +el3_handler_exit: + ldp x0, x1, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X0] + ldp x2, x3, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X2] + ldp x4, x5, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X4] + restore_x30 + no_ret report_unhandled_exception +endfunc imp_def_el3_handler + +/* + * Handler for async EA from lower EL synchronized at EL3 entry in KFH mode. + * + * This scenario may arise when there is an error (EA) in the system which is not + * yet signaled to PE while executing in lower EL. During entry into EL3, the errors + * are synchronized either implicitly or explicitly causing async EA to pend at EL3. + * + * On detecting the pending EA (via ISR_EL1.A) and if the EA routing model is + * KFH (SCR_EL3.EA = 1) this handler reflects ther error back to lower EL. + * + * This function assumes x30 has been saved. + */ +func reflect_pending_async_ea_to_lower_el + /* + * As the original exception was not handled we need to ensure that we return + * back to the instruction which caused the exception. To acheive that, eret + * to "elr-4" (Label "subtract_elr_el3") for SMC or simply eret otherwise + * (Label "skip_smc_check"). + * + * LIMITATION: It could be that async EA is masked at the target exception level + * or the priority of async EA wrt to the EL3/secure interrupt is lower, which + * causes back and forth between lower EL and EL3. In case of back and forth between + * lower EL and EL3, we can track the loop count in "CTX_NESTED_EA_FLAG" and leverage + * previous ELR in "CTX_SAVED_ELR_EL3" to detect this cycle and further panic + * to indicate a problem here (Label "check_loop_ctr"). If we are in this cycle, loop + * counter retains its value but if we do a normal el3_exit this flag gets cleared. + * However, setting SCR_EL3.IESB = 1, should give priority to SError handling + * as per AArch64.TakeException pseudo code in Arm ARM. + * + * TODO: In future if EL3 gets a capability to inject a virtual SError to lower + * ELs, we can remove the el3_panic and handle the original exception first and + * inject SError to lower EL before ereting back. + */ + stp x28, x29, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X28] + ldr x29, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ELR_EL3] + mrs x28, elr_el3 + cmp x29, x28 + b.eq check_loop_ctr + str x28, [sp, #CTX_EL3STATE_OFFSET + CTX_SAVED_ELR_EL3] + /* Zero the loop counter */ + str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_NESTED_EA_FLAG] + b skip_loop_ctr +check_loop_ctr: + ldr x29, [sp, #CTX_EL3STATE_OFFSET + CTX_NESTED_EA_FLAG] + add x29, x29, #1 + str x29, [sp, #CTX_EL3STATE_OFFSET + CTX_NESTED_EA_FLAG] + cmp x29, #ASYNC_EA_REPLAY_COUNTER + b.ge el3_panic +skip_loop_ctr: + /* + * Logic to distinguish if we came from SMC or any other exception. + * Use offsets in vector entry to get which exception we are handling. + * In each vector entry of size 0x200, address "0x0-0x80" is for sync + * exception and "0x80-0x200" is for async exceptions. + * Use vector base address (vbar_el3) and exception offset (LR) to + * calculate whether the address we came from is any of the following + * "0x0-0x80", "0x200-0x280", "0x400-0x480" or "0x600-0x680" + */ + mrs x29, vbar_el3 + sub x30, x30, x29 + and x30, x30, #0x1ff + cmp x30, #0x80 + b.ge skip_smc_check + /* Its a synchronous exception, Now check if it is SMC or not? */ + mrs x30, esr_el3 + ubfx x30, x30, #ESR_EC_SHIFT, #ESR_EC_LENGTH + cmp x30, #EC_AARCH32_SMC + b.eq subtract_elr_el3 + cmp x30, #EC_AARCH64_SMC + b.eq subtract_elr_el3 + b skip_smc_check +subtract_elr_el3: + sub x28, x28, #4 +skip_smc_check: + msr elr_el3, x28 + ldp x28, x29, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_X28] + ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] + exception_return +endfunc reflect_pending_async_ea_to_lower_el + /* --------------------------------------------------------------------- * The following code handles exceptions caused by BRK instructions. * Following a BRK instruction, the only real valid cause of action is diff --git a/atf-20231013-0ea67d76a/bl31/bl31.ld.S b/atf-20240117-bacca82a8/bl31/bl31.ld.S similarity index 94% rename from atf-20231013-0ea67d76a/bl31/bl31.ld.S rename to atf-20240117-bacca82a8/bl31/bl31.ld.S index 7a8c41ab2..8698dffd4 100644 --- a/atf-20231013-0ea67d76a/bl31/bl31.ld.S +++ b/atf-20240117-bacca82a8/bl31/bl31.ld.S @@ -37,6 +37,9 @@ SECTIONS { #if SEPARATE_CODE_AND_RODATA .text . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".text is not aligned on a page boundary."); + __TEXT_START__ = .; *bl31_entrypoint.o(.text*) @@ -71,6 +74,9 @@ SECTIONS { } >RAM #else /* SEPARATE_CODE_AND_RODATA */ .ro . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".ro is not aligned on a page boundary."); + __RO_START__ = .; *bl31_entrypoint.o(.text*) @@ -101,7 +107,7 @@ SECTIONS { ASSERT(__CPU_OPS_END__ > __CPU_OPS_START__, "cpu_ops not defined for this platform.") -#if SPM_MM +#if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) # ifndef SPM_SHIM_EXCEPTIONS_VMA # define SPM_SHIM_EXCEPTIONS_VMA RAM # endif /* SPM_SHIM_EXCEPTIONS_VMA */ @@ -128,7 +134,7 @@ SECTIONS { PROVIDE(__SPM_SHIM_EXCEPTIONS_LMA__ = LOADADDR(.spm_shim_exceptions)); . = LOADADDR(.spm_shim_exceptions) + SIZEOF(.spm_shim_exceptions); -#endif /* SPM_MM */ +#endif /* SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) */ __RW_START__ = .; diff --git a/atf-20231013-0ea67d76a/bl31/bl31.mk b/atf-20240117-bacca82a8/bl31/bl31.mk similarity index 95% rename from atf-20231013-0ea67d76a/bl31/bl31.mk rename to atf-20240117-bacca82a8/bl31/bl31.mk index 0c1d65753..40e3df8b2 100644 --- a/atf-20231013-0ea67d76a/bl31/bl31.mk +++ b/atf-20240117-bacca82a8/bl31/bl31.mk @@ -27,7 +27,6 @@ include lib/extensions/amu/amu.mk include lib/mpmm/mpmm.mk ifeq (${SPMC_AT_EL3},1) - $(warning "EL3 SPMC is an experimental feature") $(info Including EL3 SPMC makefile) include services/std_svc/spm/common/spm.mk include services/std_svc/spm/el3_spmc/spmc.mk @@ -39,7 +38,6 @@ BL31_SOURCES += bl31/bl31_main.c \ bl31/interrupt_mgmt.c \ bl31/aarch64/bl31_entrypoint.S \ bl31/aarch64/crash_reporting.S \ - bl31/aarch64/ea_delegate.S \ bl31/aarch64/runtime_exceptions.S \ bl31/bl31_context_mgmt.c \ bl31/bl31_traps.c \ @@ -63,10 +61,18 @@ ifeq (${USE_DEBUGFS},1) BL31_SOURCES += $(DEBUGFS_SRCS) endif +ifeq (${PLATFORM_REPORT_CTX_MEM_USE},1) +BL31_SOURCES += lib/el3_runtime/aarch64/context_debug.c +endif + ifeq (${EL3_EXCEPTION_HANDLING},1) BL31_SOURCES += bl31/ehf.c endif +ifeq (${FFH_SUPPORT},1) +BL31_SOURCES += bl31/aarch64/ea_delegate.S +endif + ifeq (${SDEI_SUPPORT},1) ifeq (${EL3_EXCEPTION_HANDLING},0) $(error EL3_EXCEPTION_HANDLING must be 1 for SDEI support) @@ -106,7 +112,7 @@ ifneq (${ENABLE_SVE_FOR_NS},0) BL31_SOURCES += lib/extensions/sve/sve.c endif -ifneq (${ENABLE_MPAM_FOR_LOWER_ELS},0) +ifneq (${ENABLE_FEAT_MPAM},0) BL31_SOURCES += lib/extensions/mpam/mpam.c endif diff --git a/atf-20231013-0ea67d76a/bl31/bl31_context_mgmt.c b/atf-20240117-bacca82a8/bl31/bl31_context_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/bl31/bl31_context_mgmt.c rename to atf-20240117-bacca82a8/bl31/bl31_context_mgmt.c diff --git a/atf-20231013-0ea67d76a/bl31/bl31_main.c b/atf-20240117-bacca82a8/bl31/bl31_main.c similarity index 97% rename from atf-20231013-0ea67d76a/bl31/bl31_main.c rename to atf-20240117-bacca82a8/bl31/bl31_main.c index cae55f314..c8cc2c719 100644 --- a/atf-20231013-0ea67d76a/bl31/bl31_main.c +++ b/atf-20240117-bacca82a8/bl31/bl31_main.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -106,6 +107,9 @@ void bl31_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, */ assert(is_armv8_3_pauth_present()); #endif /* CTX_INCLUDE_PAUTH_REGS */ + + /* Prints context_memory allocated for all the security states */ + report_ctx_memory_usage(); } /******************************************************************************* @@ -121,6 +125,9 @@ void bl31_main(void) /* Init registers that never change for the lifetime of TF-A */ cm_manage_extensions_el3(); + /* Init per-world context registers for non-secure world */ + manage_extensions_nonsecure_per_world(); + NOTICE("BL31: %s\n", version_string); NOTICE("BL31: %s\n", build_message); diff --git a/atf-20231013-0ea67d76a/bl31/bl31_traps.c b/atf-20240117-bacca82a8/bl31/bl31_traps.c similarity index 100% rename from atf-20231013-0ea67d76a/bl31/bl31_traps.c rename to atf-20240117-bacca82a8/bl31/bl31_traps.c diff --git a/atf-20231013-0ea67d76a/bl31/ehf.c b/atf-20240117-bacca82a8/bl31/ehf.c similarity index 100% rename from atf-20231013-0ea67d76a/bl31/ehf.c rename to atf-20240117-bacca82a8/bl31/ehf.c diff --git a/atf-20231013-0ea67d76a/bl31/interrupt_mgmt.c b/atf-20240117-bacca82a8/bl31/interrupt_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/bl31/interrupt_mgmt.c rename to atf-20240117-bacca82a8/bl31/interrupt_mgmt.c diff --git a/atf-20231013-0ea67d76a/bl32/optee/optee.mk b/atf-20240117-bacca82a8/bl32/optee/optee.mk similarity index 100% rename from atf-20231013-0ea67d76a/bl32/optee/optee.mk rename to atf-20240117-bacca82a8/bl32/optee/optee.mk diff --git a/atf-20231013-0ea67d76a/bl32/sp_min/aarch32/entrypoint.S b/atf-20240117-bacca82a8/bl32/sp_min/aarch32/entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl32/sp_min/aarch32/entrypoint.S rename to atf-20240117-bacca82a8/bl32/sp_min/aarch32/entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl32/sp_min/sp_min.ld.S b/atf-20240117-bacca82a8/bl32/sp_min/sp_min.ld.S similarity index 95% rename from atf-20231013-0ea67d76a/bl32/sp_min/sp_min.ld.S rename to atf-20240117-bacca82a8/bl32/sp_min/sp_min.ld.S index dd8197332..a2d9b7bf6 100644 --- a/atf-20231013-0ea67d76a/bl32/sp_min/sp_min.ld.S +++ b/atf-20240117-bacca82a8/bl32/sp_min/sp_min.ld.S @@ -29,6 +29,9 @@ SECTIONS { #if SEPARATE_CODE_AND_RODATA .text . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".text address is not aligned on a page boundary."); + __TEXT_START__ = .; *entrypoint.o(.text*) @@ -67,6 +70,9 @@ SECTIONS { } >RAM #else /* SEPARATE_CODE_AND_RODATA */ .ro . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".ro address is not aligned on a page boundary."); + __RO_START__ = .; *entrypoint.o(.text*) diff --git a/atf-20231013-0ea67d76a/bl32/sp_min/sp_min.mk b/atf-20240117-bacca82a8/bl32/sp_min/sp_min.mk similarity index 100% rename from atf-20231013-0ea67d76a/bl32/sp_min/sp_min.mk rename to atf-20240117-bacca82a8/bl32/sp_min/sp_min.mk diff --git a/atf-20231013-0ea67d76a/bl32/sp_min/sp_min_main.c b/atf-20240117-bacca82a8/bl32/sp_min/sp_min_main.c similarity index 100% rename from atf-20231013-0ea67d76a/bl32/sp_min/sp_min_main.c rename to atf-20240117-bacca82a8/bl32/sp_min/sp_min_main.c diff --git a/atf-20231013-0ea67d76a/bl32/sp_min/sp_min_private.h b/atf-20240117-bacca82a8/bl32/sp_min/sp_min_private.h similarity index 100% rename from atf-20231013-0ea67d76a/bl32/sp_min/sp_min_private.h rename to atf-20240117-bacca82a8/bl32/sp_min/sp_min_private.h diff --git a/atf-20231013-0ea67d76a/bl32/sp_min/wa_cve_2017_5715_bpiall.S b/atf-20240117-bacca82a8/bl32/sp_min/wa_cve_2017_5715_bpiall.S similarity index 100% rename from atf-20231013-0ea67d76a/bl32/sp_min/wa_cve_2017_5715_bpiall.S rename to atf-20240117-bacca82a8/bl32/sp_min/wa_cve_2017_5715_bpiall.S diff --git a/atf-20231013-0ea67d76a/bl32/sp_min/wa_cve_2017_5715_icache_inv.S b/atf-20240117-bacca82a8/bl32/sp_min/wa_cve_2017_5715_icache_inv.S similarity index 100% rename from atf-20231013-0ea67d76a/bl32/sp_min/wa_cve_2017_5715_icache_inv.S rename to atf-20240117-bacca82a8/bl32/sp_min/wa_cve_2017_5715_icache_inv.S diff --git a/atf-20231013-0ea67d76a/bl32/tsp/aarch64/tsp_entrypoint.S b/atf-20240117-bacca82a8/bl32/tsp/aarch64/tsp_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/aarch64/tsp_entrypoint.S rename to atf-20240117-bacca82a8/bl32/tsp/aarch64/tsp_entrypoint.S diff --git a/atf-20231013-0ea67d76a/bl32/tsp/aarch64/tsp_exceptions.S b/atf-20240117-bacca82a8/bl32/tsp/aarch64/tsp_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/aarch64/tsp_exceptions.S rename to atf-20240117-bacca82a8/bl32/tsp/aarch64/tsp_exceptions.S diff --git a/atf-20231013-0ea67d76a/bl32/tsp/aarch64/tsp_request.S b/atf-20240117-bacca82a8/bl32/tsp/aarch64/tsp_request.S similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/aarch64/tsp_request.S rename to atf-20240117-bacca82a8/bl32/tsp/aarch64/tsp_request.S diff --git a/atf-20231013-0ea67d76a/bl32/tsp/ffa_helpers.c b/atf-20240117-bacca82a8/bl32/tsp/ffa_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/ffa_helpers.c rename to atf-20240117-bacca82a8/bl32/tsp/ffa_helpers.c diff --git a/atf-20231013-0ea67d76a/bl32/tsp/ffa_helpers.h b/atf-20240117-bacca82a8/bl32/tsp/ffa_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/ffa_helpers.h rename to atf-20240117-bacca82a8/bl32/tsp/ffa_helpers.h diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp.ld.S b/atf-20240117-bacca82a8/bl32/tsp/tsp.ld.S similarity index 94% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp.ld.S rename to atf-20240117-bacca82a8/bl32/tsp/tsp.ld.S index 22bf11dad..5116b20ac 100644 --- a/atf-20231013-0ea67d76a/bl32/tsp/tsp.ld.S +++ b/atf-20240117-bacca82a8/bl32/tsp/tsp.ld.S @@ -25,6 +25,9 @@ SECTIONS { #if SEPARATE_CODE_AND_RODATA .text . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".text address is not aligned on a page boundary."); + __TEXT_START__ = .; *tsp_entrypoint.o(.text*) @@ -51,6 +54,9 @@ SECTIONS { } >RAM #else /* SEPARATE_CODE_AND_RODATA */ .ro . : { + ASSERT(. == ALIGN(PAGE_SIZE), + ".ro address is not aligned on a page boundary."); + __RO_START__ = .; *tsp_entrypoint.o(.text*) diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp.mk b/atf-20240117-bacca82a8/bl32/tsp/tsp.mk similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp.mk rename to atf-20240117-bacca82a8/bl32/tsp/tsp.mk diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp_common.c b/atf-20240117-bacca82a8/bl32/tsp/tsp_common.c similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp_common.c rename to atf-20240117-bacca82a8/bl32/tsp/tsp_common.c diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp_ffa_main.c b/atf-20240117-bacca82a8/bl32/tsp/tsp_ffa_main.c similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp_ffa_main.c rename to atf-20240117-bacca82a8/bl32/tsp/tsp_ffa_main.c diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp_interrupt.c b/atf-20240117-bacca82a8/bl32/tsp/tsp_interrupt.c similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp_interrupt.c rename to atf-20240117-bacca82a8/bl32/tsp/tsp_interrupt.c diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp_main.c b/atf-20240117-bacca82a8/bl32/tsp/tsp_main.c similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp_main.c rename to atf-20240117-bacca82a8/bl32/tsp/tsp_main.c diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp_private.h b/atf-20240117-bacca82a8/bl32/tsp/tsp_private.h similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp_private.h rename to atf-20240117-bacca82a8/bl32/tsp/tsp_private.h diff --git a/atf-20231013-0ea67d76a/bl32/tsp/tsp_timer.c b/atf-20240117-bacca82a8/bl32/tsp/tsp_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/bl32/tsp/tsp_timer.c rename to atf-20240117-bacca82a8/bl32/tsp/tsp_timer.c diff --git a/atf-20231013-0ea67d76a/changelog.yaml b/atf-20240117-bacca82a8/changelog.yaml similarity index 98% rename from atf-20231013-0ea67d76a/changelog.yaml rename to atf-20240117-bacca82a8/changelog.yaml index 2d6986b77..c5e157d9b 100644 --- a/atf-20231013-0ea67d76a/changelog.yaml +++ b/atf-20240117-bacca82a8/changelog.yaml @@ -150,6 +150,10 @@ subsections: scope: trf - title: Platforms + scope: platforms + + deprecated: + - plat/common subsections: - title: Allwinner @@ -180,8 +184,8 @@ subsections: deprecated: - arm_fgpa - - arm_fpga - plat/arm_fpga + - arm/fpga - title: FVP scope: fvp @@ -254,6 +258,9 @@ subsections: - title: Broadcom scope: brcm + - title: Cadence + scope: cadence + - title: HiSilicon scope: hisilicon @@ -499,6 +506,9 @@ subsections: - title: SBSA scope: qemu-sbsa + deprecated: + - qemu_sbsa + - title: QTI scope: qti @@ -559,6 +569,9 @@ subsections: - rockchip/rk3399 - rk3399/suspend + - title: RK3328 + scope: rk3328 + - title: Socionext scope: socionext @@ -609,6 +622,9 @@ subsections: - plat/xilinx subsections: + - title: DCC (Debug Communication Channel) + scope: dcc + - title: Versal scope: versal @@ -691,6 +707,9 @@ subsections: scope: spm subsections: + - title: EL3 SPM + scope: el3-spm + - title: EL3 SPMC scope: el3-spmc @@ -716,6 +735,7 @@ subsections: - errata_abi - title: Libraries + scope: lib subsections: - title: CPU Support diff --git a/atf-20231013-0ea67d76a/common/aarch32/debug.S b/atf-20240117-bacca82a8/common/aarch32/debug.S similarity index 100% rename from atf-20231013-0ea67d76a/common/aarch32/debug.S rename to atf-20240117-bacca82a8/common/aarch32/debug.S diff --git a/atf-20231013-0ea67d76a/common/aarch64/debug.S b/atf-20240117-bacca82a8/common/aarch64/debug.S similarity index 100% rename from atf-20231013-0ea67d76a/common/aarch64/debug.S rename to atf-20240117-bacca82a8/common/aarch64/debug.S diff --git a/atf-20231013-0ea67d76a/common/aarch64/early_exceptions.S b/atf-20240117-bacca82a8/common/aarch64/early_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/common/aarch64/early_exceptions.S rename to atf-20240117-bacca82a8/common/aarch64/early_exceptions.S diff --git a/atf-20231013-0ea67d76a/common/backtrace/backtrace.c b/atf-20240117-bacca82a8/common/backtrace/backtrace.c similarity index 100% rename from atf-20231013-0ea67d76a/common/backtrace/backtrace.c rename to atf-20240117-bacca82a8/common/backtrace/backtrace.c diff --git a/atf-20231013-0ea67d76a/common/backtrace/backtrace.mk b/atf-20240117-bacca82a8/common/backtrace/backtrace.mk similarity index 100% rename from atf-20231013-0ea67d76a/common/backtrace/backtrace.mk rename to atf-20240117-bacca82a8/common/backtrace/backtrace.mk diff --git a/atf-20231013-0ea67d76a/common/bl_common.c b/atf-20240117-bacca82a8/common/bl_common.c similarity index 100% rename from atf-20231013-0ea67d76a/common/bl_common.c rename to atf-20240117-bacca82a8/common/bl_common.c diff --git a/atf-20231013-0ea67d76a/common/desc_image_load.c b/atf-20240117-bacca82a8/common/desc_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/common/desc_image_load.c rename to atf-20240117-bacca82a8/common/desc_image_load.c diff --git a/atf-20231013-0ea67d76a/common/fdt_fixup.c b/atf-20240117-bacca82a8/common/fdt_fixup.c similarity index 100% rename from atf-20231013-0ea67d76a/common/fdt_fixup.c rename to atf-20240117-bacca82a8/common/fdt_fixup.c diff --git a/atf-20231013-0ea67d76a/common/fdt_wrappers.c b/atf-20240117-bacca82a8/common/fdt_wrappers.c similarity index 100% rename from atf-20231013-0ea67d76a/common/fdt_wrappers.c rename to atf-20240117-bacca82a8/common/fdt_wrappers.c diff --git a/atf-20231013-0ea67d76a/common/fdt_wrappers.mk b/atf-20240117-bacca82a8/common/fdt_wrappers.mk similarity index 100% rename from atf-20231013-0ea67d76a/common/fdt_wrappers.mk rename to atf-20240117-bacca82a8/common/fdt_wrappers.mk diff --git a/atf-20231013-0ea67d76a/common/feat_detect.c b/atf-20240117-bacca82a8/common/feat_detect.c similarity index 99% rename from atf-20231013-0ea67d76a/common/feat_detect.c rename to atf-20240117-bacca82a8/common/feat_detect.c index a1ffc39d4..be22c6ed1 100644 --- a/atf-20231013-0ea67d76a/common/feat_detect.c +++ b/atf-20240117-bacca82a8/common/feat_detect.c @@ -169,7 +169,7 @@ void detect_arch_features(void) check_feature(ENABLE_FEAT_DIT, read_feat_dit_id_field(), "DIT", 1, 1); check_feature(ENABLE_FEAT_AMU, read_feat_amu_id_field(), "AMUv1", 1, 2); - check_feature(ENABLE_MPAM_FOR_LOWER_ELS, read_feat_mpam_version(), + check_feature(ENABLE_FEAT_MPAM, read_feat_mpam_version(), "MPAM", 1, 17); check_feature(CTX_INCLUDE_NEVE_REGS, read_feat_nv_id_field(), "NV2", 2, 2); diff --git a/atf-20231013-0ea67d76a/common/image_decompress.c b/atf-20240117-bacca82a8/common/image_decompress.c similarity index 100% rename from atf-20231013-0ea67d76a/common/image_decompress.c rename to atf-20240117-bacca82a8/common/image_decompress.c diff --git a/atf-20231013-0ea67d76a/common/runtime_svc.c b/atf-20240117-bacca82a8/common/runtime_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/common/runtime_svc.c rename to atf-20240117-bacca82a8/common/runtime_svc.c diff --git a/atf-20231013-0ea67d76a/common/tf_crc32.c b/atf-20240117-bacca82a8/common/tf_crc32.c similarity index 100% rename from atf-20231013-0ea67d76a/common/tf_crc32.c rename to atf-20240117-bacca82a8/common/tf_crc32.c diff --git a/atf-20231013-0ea67d76a/common/tf_log.c b/atf-20240117-bacca82a8/common/tf_log.c similarity index 100% rename from atf-20231013-0ea67d76a/common/tf_log.c rename to atf-20240117-bacca82a8/common/tf_log.c diff --git a/atf-20231013-0ea67d76a/common/uuid.c b/atf-20240117-bacca82a8/common/uuid.c similarity index 100% rename from atf-20231013-0ea67d76a/common/uuid.c rename to atf-20240117-bacca82a8/common/uuid.c diff --git a/atf-20231013-0ea67d76a/lib/nmbm/nmbm-debug.inl b/atf-20240117-bacca82a8/configs/mt7622_rfb_snfi_nand_defconfig similarity index 100% rename from atf-20231013-0ea67d76a/lib/nmbm/nmbm-debug.inl rename to atf-20240117-bacca82a8/configs/mt7622_rfb_snfi_nand_defconfig diff --git a/atf-20240117-bacca82a8/configs/mt7629_rfb_snfi_nand_defconfig b/atf-20240117-bacca82a8/configs/mt7629_rfb_snfi_nand_defconfig new file mode 100644 index 000000000..90278aaa9 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7629_rfb_snfi_nand_defconfig @@ -0,0 +1 @@ +_PLAT_MT7629=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_360t7_defconfig b/atf-20240117-bacca82a8/configs/mt7981_360t7_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_360t7_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_abt_asr3000_defconfig b/atf-20240117-bacca82a8/configs/mt7981_abt_asr3000_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_abt_asr3000_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_ax3000t_an8855_defconfig b/atf-20240117-bacca82a8/configs/mt7981_ax3000t_an8855_defconfig new file mode 120000 index 000000000..8209e98c5 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_ax3000t_an8855_defconfig @@ -0,0 +1 @@ +mt7981_ax3000t_defconfig \ No newline at end of file diff --git a/atf-20240117-bacca82a8/configs/mt7981_ax3000t_defconfig b/atf-20240117-bacca82a8/configs/mt7981_ax3000t_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_ax3000t_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_cetron_ct3003_defconfig b/atf-20240117-bacca82a8/configs/mt7981_cetron_ct3003_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_cetron_ct3003_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_clt_r30b1_defconfig b/atf-20240117-bacca82a8/configs/mt7981_clt_r30b1_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_clt_r30b1_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_cmcc_a10_defconfig b/atf-20240117-bacca82a8/configs/mt7981_cmcc_a10_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_cmcc_a10_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_cmcc_rax3000m-emmc_defconfig b/atf-20240117-bacca82a8/configs/mt7981_cmcc_rax3000m-emmc_defconfig new file mode 100644 index 000000000..b4ba4798b --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_cmcc_rax3000m-emmc_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7981=y +_DRAM_DDR4=y +_BOOT_DEVICE_EMMC=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_cmcc_rax3000m_defconfig b/atf-20240117-bacca82a8/configs/mt7981_cmcc_rax3000m_defconfig new file mode 100644 index 000000000..dbfd0b773 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_cmcc_rax3000m_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_cmcc_xr30-emmc_defconfig b/atf-20240117-bacca82a8/configs/mt7981_cmcc_xr30-emmc_defconfig new file mode 100644 index 000000000..b4ba4798b --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_cmcc_xr30-emmc_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7981=y +_DRAM_DDR4=y +_BOOT_DEVICE_EMMC=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_cmcc_xr30_defconfig b/atf-20240117-bacca82a8/configs/mt7981_cmcc_xr30_defconfig new file mode 100644 index 000000000..dbfd0b773 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_cmcc_xr30_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_glinet_gl-mt2500_defconfig b/atf-20240117-bacca82a8/configs/mt7981_glinet_gl-mt2500_defconfig new file mode 100644 index 000000000..b4ba4798b --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_glinet_gl-mt2500_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7981=y +_DRAM_DDR4=y +_BOOT_DEVICE_EMMC=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_glinet_gl-mt3000_defconfig b/atf-20240117-bacca82a8/configs/mt7981_glinet_gl-mt3000_defconfig new file mode 100644 index 000000000..dbfd0b773 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_glinet_gl-mt3000_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_h3c_magic-nx30-pro_defconfig b/atf-20240117-bacca82a8/configs/mt7981_h3c_magic-nx30-pro_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_h3c_magic-nx30-pro_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_honor_fur-602_defconfig b/atf-20240117-bacca82a8/configs/mt7981_honor_fur-602_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_honor_fur-602_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_imou_lc-hx3001_defconfig b/atf-20240117-bacca82a8/configs/mt7981_imou_lc-hx3001_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_imou_lc-hx3001_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_jcg_q30_defconfig b/atf-20240117-bacca82a8/configs/mt7981_jcg_q30_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_jcg_q30_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_konka_komi-a31_defconfig b/atf-20240117-bacca82a8/configs/mt7981_konka_komi-a31_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_konka_komi-a31_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_livinet_zr-3020_defconfig b/atf-20240117-bacca82a8/configs/mt7981_livinet_zr-3020_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_livinet_zr-3020_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_newland_nl-wr8103_defconfig b/atf-20240117-bacca82a8/configs/mt7981_newland_nl-wr8103_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_newland_nl-wr8103_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_newland_nl-wr9103_defconfig b/atf-20240117-bacca82a8/configs/mt7981_newland_nl-wr9103_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_newland_nl-wr9103_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_nokia_ea0326gmp_defconfig b/atf-20240117-bacca82a8/configs/mt7981_nokia_ea0326gmp_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_nokia_ea0326gmp_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_openembed_som7981_defconfig b/atf-20240117-bacca82a8/configs/mt7981_openembed_som7981_defconfig new file mode 100644 index 000000000..5c7b3553c --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_openembed_som7981_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7981=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y +_NAND_SKIP_BAD=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_rfb_spim_nand_defconfig b/atf-20240117-bacca82a8/configs/mt7981_rfb_spim_nand_defconfig new file mode 100644 index 000000000..e9a46f11d --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_rfb_spim_nand_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_ENABLE_EMERG_MEM_DUMP=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_ruijie_rg-x30e-pro_defconfig b/atf-20240117-bacca82a8/configs/mt7981_ruijie_rg-x30e-pro_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_ruijie_rg-x30e-pro_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_ruijie_rg-x30e_defconfig b/atf-20240117-bacca82a8/configs/mt7981_ruijie_rg-x30e_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_ruijie_rg-x30e_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7981_wr30u_defconfig b/atf-20240117-bacca82a8/configs/mt7981_wr30u_defconfig new file mode 100644 index 000000000..451d5b8f3 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7981_wr30u_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7981=y +_MT7981_BOARD_BGA=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_glinet_gl-mt6000_defconfig b/atf-20240117-bacca82a8/configs/mt7986_glinet_gl-mt6000_defconfig new file mode 100644 index 000000000..af957784e --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_glinet_gl-mt6000_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_BOOT_DEVICE_EMMC=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_jdcloud_re-cp-03_defconfig b/atf-20240117-bacca82a8/configs/mt7986_jdcloud_re-cp-03_defconfig new file mode 100644 index 000000000..af957784e --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_jdcloud_re-cp-03_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_BOOT_DEVICE_EMMC=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_redmi_ax6000_defconfig b/atf-20240117-bacca82a8/configs/mt7986_redmi_ax6000_defconfig new file mode 100644 index 000000000..d6210b619 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_redmi_ax6000_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_rfb_spim_nand_defconfig b/atf-20240117-bacca82a8/configs/mt7986_rfb_spim_nand_defconfig new file mode 100644 index 000000000..c84248c73 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_rfb_spim_nand_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_ENABLE_EMERG_MEM_DUMP=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_ruijie_rg-x60-pro_defconfig b/atf-20240117-bacca82a8/configs/mt7986_ruijie_rg-x60-pro_defconfig new file mode 100644 index 000000000..d6210b619 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_ruijie_rg-x60-pro_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_ruijie_rg-x60_defconfig b/atf-20240117-bacca82a8/configs/mt7986_ruijie_rg-x60_defconfig new file mode 100644 index 000000000..d6210b619 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_ruijie_rg-x60_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_tplink_tl-xdr608x_defconfig b/atf-20240117-bacca82a8/configs/mt7986_tplink_tl-xdr608x_defconfig new file mode 100644 index 000000000..19144cec4 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_tplink_tl-xdr608x_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7986=y +_NAND_SKIP_BAD=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_tplink_tl-xtr8488_defconfig b/atf-20240117-bacca82a8/configs/mt7986_tplink_tl-xtr8488_defconfig new file mode 100644 index 000000000..0cac9998d --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_tplink_tl-xtr8488_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_NAND_SKIP_BAD=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7986_zyxel_ex5700_defconfig b/atf-20240117-bacca82a8/configs/mt7986_zyxel_ex5700_defconfig new file mode 100644 index 000000000..d6210b619 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7986_zyxel_ex5700_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7986=y +_DRAM_DDR4=y +_LOG_LEVEL_INFO=y diff --git a/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr3_defconfig b/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr3_defconfig new file mode 100644 index 000000000..e6b01b485 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr3_defconfig @@ -0,0 +1,2 @@ +_PLAT_MT7987=y +_DRAM_DEBUG_LOG=y diff --git a/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr4_2800_defconfig b/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr4_2800_defconfig new file mode 100644 index 000000000..dffb20883 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr4_2800_defconfig @@ -0,0 +1,4 @@ +_PLAT_MT7987=y +_DRAM_DDR4=y +_DDR4_SOCKET_BOARD=y +_DRAM_DEBUG_LOG=y diff --git a/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr4_3200_defconfig b/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr4_3200_defconfig new file mode 100644 index 000000000..40a44b6e4 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7987_spim_nand_ddr4_3200_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7987=y +_DRAM_DDR4=y +_DRAM_DEBUG_LOG=y diff --git a/atf-20240117-bacca82a8/configs/mt7988_rfb_spim_nand_defconfig b/atf-20240117-bacca82a8/configs/mt7988_rfb_spim_nand_defconfig new file mode 100644 index 000000000..141af7b06 --- /dev/null +++ b/atf-20240117-bacca82a8/configs/mt7988_rfb_spim_nand_defconfig @@ -0,0 +1,3 @@ +_PLAT_MT7988=y +_DRAM_DDR_COMB=y +_ENABLE_EMERG_MEM_DUMP=y diff --git a/atf-20231013-0ea67d76a/dco.txt b/atf-20240117-bacca82a8/dco.txt similarity index 100% rename from atf-20231013-0ea67d76a/dco.txt rename to atf-20240117-bacca82a8/dco.txt diff --git a/atf-20231013-0ea67d76a/docs/Makefile b/atf-20240117-bacca82a8/docs/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/docs/Makefile rename to atf-20240117-bacca82a8/docs/Makefile diff --git a/atf-20231013-0ea67d76a/docs/_static/css/custom.css b/atf-20240117-bacca82a8/docs/_static/css/custom.css similarity index 100% rename from atf-20231013-0ea67d76a/docs/_static/css/custom.css rename to atf-20240117-bacca82a8/docs/_static/css/custom.css diff --git a/atf-20231013-0ea67d76a/docs/about/acknowledgements.rst b/atf-20240117-bacca82a8/docs/about/acknowledgements.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/about/acknowledgements.rst rename to atf-20240117-bacca82a8/docs/about/acknowledgements.rst diff --git a/atf-20231013-0ea67d76a/docs/about/contact.rst b/atf-20240117-bacca82a8/docs/about/contact.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/about/contact.rst rename to atf-20240117-bacca82a8/docs/about/contact.rst diff --git a/atf-20231013-0ea67d76a/docs/about/features.rst b/atf-20240117-bacca82a8/docs/about/features.rst similarity index 85% rename from atf-20231013-0ea67d76a/docs/about/features.rst rename to atf-20240117-bacca82a8/docs/about/features.rst index 4a2c77ebe..c12509d9d 100644 --- a/atf-20231013-0ea67d76a/docs/about/features.rst +++ b/atf-20240117-bacca82a8/docs/about/features.rst @@ -108,6 +108,28 @@ Current features - Position-Independent Executable (PIE) support. +Experimental features +--------------------- + +A feature is considered experimental when still in development or isn't known +to the TF-A team as widely deployed or proven on end products. It is generally +advised such options aren't pulled into real deployments, or done with the +appropriate level of supplementary integration testing. + +A feature is no longer considered experimental when it is generally agreed +the said feature has reached a level of maturity and quality comparable to +other features that have been integrated into products. + +Experimental build options are found in following section +:ref:`build_options_experimental`. Their use through the build emits a warning +message. + +Additionally the following libraries are marked experimental when included +in a platform: + +- MPU translation library ``lib/xlat_mpu`` +- RSS comms driver ``drivers/arm/rss`` + Still to come ------------- diff --git a/atf-20231013-0ea67d76a/docs/about/index.rst b/atf-20240117-bacca82a8/docs/about/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/about/index.rst rename to atf-20240117-bacca82a8/docs/about/index.rst diff --git a/atf-20231013-0ea67d76a/docs/about/maintainers.rst b/atf-20240117-bacca82a8/docs/about/maintainers.rst similarity index 98% rename from atf-20231013-0ea67d76a/docs/about/maintainers.rst rename to atf-20240117-bacca82a8/docs/about/maintainers.rst index 604205333..4531a03ef 100644 --- a/atf-20231013-0ea67d76a/docs/about/maintainers.rst +++ b/atf-20240117-bacca82a8/docs/about/maintainers.rst @@ -67,6 +67,8 @@ LTS Maintainers :|G|: `bytefire`_ :|M|: Varun Wadekar :|G|: `vwadekar`_ +:|M|: Yann Gautier +:|G|: `Yann-lms`_ .. _code owners: @@ -422,6 +424,15 @@ Granule Protection Tables Library (GPT-RME) :|F|: lib/gpt_rme :|F|: include/lib/gpt_rme +Firmware Handoff Library (Transfer List) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +:|M|: Raymond Mao +:|G|: `raymo200915`_ +:|M|: Harrison Mutai +:|G|: `harrisonmutai-arm`_ +:|F|: lib/transfer_list +:|F|: include/lib/transfer_list.h + Platform Ports ~~~~~~~~~~~~~~ @@ -748,8 +759,6 @@ Raspberry Pi 4 platform port Renesas rcar-gen3 platform port ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -:|M|: Jorge Ramirez-Ortiz -:|G|: `ldts`_ :|M|: Marek Vasut :|G|: `marex`_ :|F|: docs/plat/rcar-gen3.rst @@ -959,7 +968,6 @@ Conventional Changelog Extensions .. _jwerner-chromium: https://github.com/jwerner-chromium .. _kostapr: https://github.com/kostapr .. _lachitp: https://github.com/lachitp -.. _ldts: https://github.com/ldts .. _marex: https://github.com/marex .. _masahir0y: https://github.com/masahir0y .. _michalsimek: https://github.com/michalsimek @@ -1028,3 +1036,5 @@ Conventional Changelog Extensions .. _rutigl: https://github.com/rutigl .. _avifishman: https://github.com/avifishman .. _xueliang-zhong-arm: https://github.com/xueliang-zhong-arm +.. _raymo200915: https://github.com/raymo200915 +.. _harrisonmutai-arm: https://github.com/harrisonmutai-arm diff --git a/atf-20231013-0ea67d76a/docs/about/release-information.rst b/atf-20240117-bacca82a8/docs/about/release-information.rst similarity index 90% rename from atf-20231013-0ea67d76a/docs/about/release-information.rst rename to atf-20240117-bacca82a8/docs/about/release-information.rst index 9b51dabe5..654d65fd1 100644 --- a/atf-20231013-0ea67d76a/docs/about/release-information.rst +++ b/atf-20240117-bacca82a8/docs/about/release-information.rst @@ -25,6 +25,18 @@ issues found, additional release candidates may be created to fix the issues. code freeze ver w.x code freeze ver y.z +Version numbering +~~~~~~~~~~~~~~~~~ +TF-A version is given in Makefile, through several macros: + +- VERSION_MAJOR +- VERSION_MINOR +- VERSION_PATCH + +For example, TF-A v2.10 has VERSION_MAJOR=2, VERSION_MINOR=10 and VERSION_PATCH=0. + +This VERSION_PATCH macro is only increased for LTS releases. + Upcoming Releases ~~~~~~~~~~~~~~~~~ @@ -69,7 +81,9 @@ after which it will be removed. | | Date | after | | | | | Release | | +================================+=============+=========+=========================================================+ -| None at this time | | | | +| Mbedtls-2.x | 2.10 | 2.10 | Support for TF-A builds with Mbedtls-2.x will be removed| ++--------------------------------+-------------+---------+---------------------------------------------------------+ +| STM32MP15_OPTEE_RSV_SHM | 2.10 | 3.0 | OP-TEE manages its own memory on STM32MP15 | +--------------------------------+-------------+---------+---------------------------------------------------------+ Removal of Deprecated Drivers @@ -84,9 +98,7 @@ after which it will be removed. | | Date | after | | | | | Release | | +================================+=============+=========+=========================================================+ -| CryptoCell-712 | 2.9 | 2.10 | No longer maintained. | -+--------------------------------+-------------+---------+---------------------------------------------------------+ -| CryptoCell-713 | 2.9 | 2.10 | No longer maintained. | +| None at this time. | | | | +--------------------------------+-------------+---------+---------------------------------------------------------+ -------------- diff --git a/atf-20231013-0ea67d76a/docs/change-log.md b/atf-20240117-bacca82a8/docs/change-log.md similarity index 85% rename from atf-20231013-0ea67d76a/docs/change-log.md rename to atf-20240117-bacca82a8/docs/change-log.md index b660c733c..cfc8c564c 100644 --- a/atf-20231013-0ea67d76a/docs/change-log.md +++ b/atf-20240117-bacca82a8/docs/change-log.md @@ -3,6 +3,985 @@ This document contains a summary of the new features, changes, fixes and known issues in each release of Trusted Firmware-A. +## [2.10.0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/tags/v2.9.0..refs/tags/v2.10.0) (2023-11-21) + +### ⚠ BREAKING CHANGES + +- **Architecture** + + - **Performance Monitors Extension (FEAT_PMUv3)** + + - This patch explicitly breaks the EL2 entry path. It is + currently unsupported. + + **See:** convert FEAT_MTPMU to C and move to persistent register init ([83a4dae](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/83a4dae1af916b938659b39b7d0884359c638185)) + +- **Libraries** + + - **EL3 Runtime** + + - **Context Management** + + - Initialisation code for handoff from EL3 to NS-EL1 + disabled by default. Platforms which do that need to enable this macro + going forward + + **See:** introduce INIT_UNUSED_NS_EL2 macro ([183329a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/183329a5847df2bc6164ac8e9dbe7de4ca92836d)) + +- **Drivers** + + - **Authentication** + + - remove CryptoCell-712/713 support + + **See:** remove CryptoCell-712/713 support ([b65dfe4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b65dfe40aef550ee9ef7e869749013cb7f3c4cce)) + +### New Features + +- **Architecture** + + - **CPU feature / ID register handling in general** + + - add AArch32 PAN detection support ([d156c52](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d156c5220adb35971aafa0b0de922992e4b8aa66)) + - add memory retention bit define for CLUSTERPWRDN ([278beb8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/278beb894aeda23278a01c3c6aff1f40b8ce0a34)) + - deny AArch64-only features when building for AArch32 ([733d112](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/733d112f05ecb29f7d8fce12c66a9721031970df)) + - initialize HFG*_EL2 registers ([4a530b4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4a530b4c6556c87deb22c027dfaf2c5d6c9997a3)) + + - **Memory Tagging Extension** + + - adds feature detection for MTE_PERM ([4d0b663](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4d0b66323b242323ff738431c523aeb6d18dd3d5)) + + - **Performance Monitors Extension (FEAT_PMUv3)** + + - introduce pmuv3 lib/extensions folder ([c73686a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c73686a11cea8f9d22d7df3c5480f8824cfeec09)) + +- **Platforms** + + - **Allwinner** + + - use reset through scpi for warm/soft reset ([0cf5f08](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0cf5f08a205e4877c9daef5d90e1086643590226)) + + - **Arm** + + - add IO policy to use backup gpt header ([3e6d245](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3e6d245772ccb4b43f1ba6cd9d1bb8abe86a516c)) + - ecdsa p384/p256 full key support ([b8ae689](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b8ae68908de5560436c565ac22d59c0cbfc9a7df)) + - enable FHI PPI interrupt to report CPU errors ([f1e4a28](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f1e4a28d3f9e4c5e7905f44d41c13de63d735864)) + - reuse SPM_MM specific defines for SPMC_AT_EL3 ([5df1dcc](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5df1dccd0be06cc45e82a57dc01be5b6b5d1a21b)) + - save BL32 image base and size in entry point info ([821b01f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/821b01fa7521c0d6a0f16d02929fac3c44d14f86)) + - add memory map entry for CPER memory region ([4dc91ac](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4dc91ac9069271325ffd3552a6a146256f5d0da3)) + - firmware first error handling support for base RAMs ([5b77a0e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5b77a0e6759733d8a7de86e4492bd9b8628282d5)) + - update common platform RAS implementation ([7f15131](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7f15131df42a42fef86cc594a56b6e7998dd2ba4)) + + - **FVP** + + - add mbedtls_asn1_get_len symbol in ROMlib ([0605060](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/06050601d2a0ff06f92ca30ab988cbaf4e9929a1)) + - add public key-OID information in RSS metadata structure ([bfbb1cb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bfbb1cbaac3e74da37d906c9ce1d39993dce8b66)) + - add spmd logical partition ([5cf311f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5cf311f3a41fc114289265305a6254a8fb412c0e)) + - allow configurable FVP Trusted SRAM size ([41e56f4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/41e56f422df47b8bc1a7699ff258999f900a6290)) + - capture timestamps in bl stages ([ed8f06d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ed8f06ddda52bc0333f79e9ff798419e67771ae5)) + - implement platform function to measure and publish Public Key ([db55d23](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/db55d23d34b687cf6ce79c0723fedf10ef7227be)) + - increase BL1 RW area for PSA_CRYPTO implementation ([ce18938](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ce189383dc816cf1a48c1a94329c00f44d8acdc3)) + - mock support for CCA NV ctr ([02552d4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/02552d45e526766e000f3e3ae91ef381d402dab1)) + - new SiP call to set an interrupt pending ([2032401](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/20324013b17706751ecdd68f57c0ab95c522ca7e)) + - spmd logical partition smc handler ([a1a9a95](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a1a9a950713468a734ef3d8da210baf97f7c1071)) + + - **Juno** + + - add mbedtls_asn1_get_len symbol in ROMlib ([ec8ba97](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ec8ba97e4ffde486670cb5a22ec4aac01409d92e)) + + - **Morello** + + - add cpuidle support ([4f7330d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4f7330dc78ee620b8564a4bbc1ca2f2ae4cd1d9e)) + - add support for I2S audio ([6bcbe43](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6bcbe437909d3779111e19774f911c625e98f1b3)) + - add TF-A version string to NT_FW_CONFIG ([f4e64d1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f4e64d1f5e8277013c35dbd8e056b8071942f759)) + - fdts: add CoreSight DeviceTree bindings ([3e6cfa7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3e6cfa7bd05521935c7753401dad823d044bfa23)) + - set NT_FW_CONFIG properties for MCC, PCC and SCP version ([10fd85d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/10fd85d8f4a8f338942616ed403a1e02a388a16f)) + + - **RD** + + - **RD-N2** + + - enable base element RAM RAS support on RD-N2 platform ([0288632](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/02886326659db3e4f46c0abd10be91a2de82cc90)) + - add defines needed for spmc-el3 ([b4bed4b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b4bed4b769e907c8431b07f698da24660dfe0059)) + - add plat hook for memory transaction ([f99dcba](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f99dcbace7015169ac5d230b8007686d144962fb)) + - enable Neoverse N2 CPU error handling support ([e802748](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e80274880bf694fd0b0e869a6ceb67e95e547544)) + - introduce accessor function to obtain datastore ([f458934](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f45893426546703d9e21970889e6333ca30c0dd7)) + - introduce platform handler for Group0 interrupt ([c47d049](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c47d0491ed078cfa8ca400e182fd4a44acd8041a)) + + - **SGI** + + - remove RAS setup call from common code ([0f5e8eb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0f5e8eb4536e27f5fd99b1367b18710927b014b9)) + - firmware first error handling for Neoverse N2 CPU ([31d1e4f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/31d1e4ff8dd70dc0094ff44df0c1844d27430e77)) + - increase sp memmap size ([7c33bca](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7c33bcab5973fb73b8278c674677663f5109948e)) + + - **TC** + + - define memory ranges for tc platform ([9be6b16](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9be6b168fb482835a13ad39e7567721f74d513f9)) + - implement platform function to measure and publish Public Key ([eee9fb0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/eee9fb02f7b2c29befa27a0f2f0b6cb966f6d7c5)) + - deprecate Arm TC1 FVP platform ([6a2b11c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6a2b11c29da50eed969834f6c6ee97cdb90cb51e)) + + - **Aspeed** + + - **AST2700** + + - add Aspeed AST2700 platform support ([85f199b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/85f199b774476706b21f793503b36d861cab0a14)) + + - **Intel** + + - add intel_rsu_update() to sip_svc_v2 ([e3c3a48](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e3c3a48c85dd1478e311e2e773a22fecfda69ec5)) + - ccu driver for Agilex5 SoC FPGA ([02df499](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/02df49900006ed44b4a0c239299dd45ca8509c17)) + - clock manager support for Agilex5 SoC FPGA ([1b1a3eb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1b1a3eb1edff99b49bb40ad4172073d04a230938)) + - cold/warm reset and smp support for Agilex5 SoC FPGA ([79626f4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/79626f460f115cc32b0dbeb48e72828d2dbf662a)) + - ddr driver for Agilex5 SoC FPGA ([29461e4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/29461e4c880235532385c01f202e638fb5ba11de)) + - mailbox and SMC support for Agilex5 SoC FPGA ([8e59b9f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8e59b9f42374aaa641409b6469c8fe9245a33107)) + - memory controller support for Agilex5 SoC FPGA ([18adb4e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/18adb4efa42946252b489d02f06cccb61ad0c867)) + - mmc support for Agilex5 SoC FPGA ([4a577da](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4a577da6612ef6584695311e687ca00c57d68d53)) + - pinmux, peripheral and Handoff support for Agilex5 SoC FPGA ([fcbb5cf](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/fcbb5cf7eadb8b048149941b08f09d04a860fee0)) + - platform enablement for Agilex5 SoC FPGA ([7931d33](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7931d3322dc137447981d261e900f5a62d2181ee)) + - power manager for Agilex5 SoC FPGA ([a8bf898](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a8bf898f02185ed838d8039949800843146ab245)) + - reset manager support for Agilex5 SoC FPGA ([9b8d813](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9b8d813cc96173ce8ab7634dea17fb7f89b21626)) + - restructure sys mgr for Agilex ([6197dc9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6197dc98feba98c3e123256424d2d33d5de997b8)) + - restructure sys mgr for S10/N5X ([b653f3c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b653f3caf0f5e624604564c8c89ac8f4b450ba20)) + - sdmmc/nand/combo-phy/qspi driver for Agilex5 SoC FPGA ([ddaf02d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ddaf02d17142187d9f17acd4900aafa598666317)) + - setup SEU ERR read interface for FP8 ([91239f2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/91239f2c05c5df041e4a570a9d29c0ccbc34269a)) + - system manager support for Agilex5 SoC FPGA ([7618403](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7618403110dad81c84822332225a7a687dc7f684)) + - uart support for Agilex5 SoC FPGA ([34971f8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/34971f816a777df5afb6672990b9eceda60e84b7)) + - vab support for Agilex5 SoC FPGA ([4754925](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4754925057b27d5992d4c913276602666d303b01)) + + - **MediaTek** + + - add APU bootup control smc call ([94a9e62](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/94a9e6243e3978b42017639dad93481267bcf6e4)) + - add APU watchdog timeout control ([baa0d45](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/baa0d45ced6b058681ade9213e30ab0e91f4f4fb)) + + - **MT8188** + + - add apusys ao devapc setting ([777e3b7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/777e3b71bb0a37f98b4105af657d97c2afc2d0bc)) + - add backup/restore function when power on/off ([233d604](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/233d604f500b5693b0caa6bcfdf0e2f766fd4cbd)) + - add devapc setting of apusys rcx ([5986ae5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5986ae57aa4468b392d0f5fcb8b5bc04388fa3e2)) + - add DSB before udelay ([b254b98](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b254b9815ee25c90264a2305940bc575910f55e4)) + - add emi mpu protection for APU secure memory ([176846a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/176846a50b73267ff787432f74a1d9607b57ed20)) + - add EMI MPU support for SCP and DSP ([013006f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/013006f1f889f5869502147af464e38619459463)) + - add support for SMC from OP-TEE ([34d9d61](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/34d9d619f1c58549736b63aa5c5cddd7f171762e)) + - enable apusys domain remap ([b5900c9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b5900c92a1579371ea6f40199c70673beb08b1ac)) + - enable apusys mailbox mpu protect ([ad7673a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ad7673adef9bc5eaeef333ecaca8e85e82abe342)) + - increase TZRAM_SIZE from 192KB to 256KB ([aa1cb27](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/aa1cb279b62d82e3d6e7b6ec17b9eb71d598497e)) + - modify APU DAPC permission ([d06edab](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d06edabfd14e0d196139fb1c780017f34366ae0d)) + - update return value in mtk_emi_mpu_sip_handler ([d07eee2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d07eee245b3fcc6b276969df34dc63ded1d4c8a2)) + + - **MT8195** + + - increase TZRAM ([4f79b67](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4f79b67250641f67327c3e351d2f8339e8fd2d26)) + + - **NXP** + + - **i.MX** + + - add dummy 'plat_mboot_measure_key' function ([b9bceef](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b9bceef8eebf5c0f7f213921cca885a3f3c64ec1)) + + - **i.MX 8M** + + - add more dram pll setting ([8947404](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/89474044a59d74cc088eb09292e99a3ca623fe33)) + - detect console base address during runtime ([df730d9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/df730d94cb5850683371dd695e242a0c3817f070)) + - enable snvs privileged registers access ([8d150c9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8d150c9524b1459b61c9d881100e20da827c1bd0)) + - move the gpc reg & macro to a separate header file ([2a6ffa9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2a6ffa99afb6091110231381d1263407e9d88c3f)) + + - **i.MX 8M Nano** + + - add workaround for errata ERR050362 ([8562564](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/85625646692597ba8a1829efaadf56163450efaf)) + + - **i.MX 9** + + - **i.MX93** + + - add cpuidle and basic suspend support ([422d30c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/422d30c626beef689967b56d26a68f029e7b7cf9)) + - add OPTEE support ([27a0be7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/27a0be77a064cbc87aaefecbf45fe0a2b133b188)) + - add reset & poweroff support ([cf7ef4c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cf7ef4c762ddb573ffb6f1f434c04fdc52f6c2cf)) + - add the basic support ([2368d7b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2368d7b157c169b84bc46d3d8a57d080507e81bd)) + - add the trdc driver ([2935291](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2935291009c2933714a027b7b5cd1c8e41f70aff)) + - allow SoC masters access to system TCM ([3d3b769](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3d3b769a7c112bff9468dbb21e36ce44125a72c0)) + - protect OPTEE memory to secure access only ([f560f84](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f560f843bdc0e33ef47918a6c10676fa6aff95ac)) + - update the ocram trdc config for did10 ([eb76a24](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/eb76a2416a9bd5239db7b55d846bd2a16eec417a)) + + - **QEMU** + + - add sdei support for QEMU ([cef76a7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cef76a7c5df7056cb73667e4e0b83d022e1b50fa)) + - add "cortex-a710" cpu support ([4734a62](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4734a62d2c22f5b6a1e2b0369248d42fb9eddd1b)) + - add "neoverse-n2" cpu support ([408f9cb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/408f9cb485796a73c5b87da70644665a13c685e4)) + - add "neoverse-v1" cpu support ([6d8d7d2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6d8d7d2380d5120b3235c6f00eddcab126c3d648)) + - add "neoverse-v1" cpu support ([214de62](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/214de62c92b2fc4b7edda9d9d637b7a4c0ba1fa5)) + - add A55 cpu support for virt ([409c20c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/409c20c84dcfa61de68754152f331a7277609fb2)) + - add dummy plat_mboot_measure_key() BL1 function ([8e2fd6a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8e2fd6a84b17fde92cef48ecaccdc3b666ef0588)) + - add dummy plat_mboot_measure_key() function ([f0f11ac](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f0f11acd86650da04a41298acbf4ae38b7e25894)) + - implement firmware handoff on qemu ([322af23](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/322af23445fe7a86eaad335b8a0f2ed523f5c1df)) + + - **SBSA** + + - handle platform version ([c681d02](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c681d02c6ce2652307a4fcef16bd5626135dfad9)) + - handle GIC base ([1e67b1b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1e67b1b17a1692dd653d31016ccd8fa18b5f8f67)) + - handle GIC ITS address ([4171e98](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4171e981d13e6aa764c2520a2b513beafe449818)) + + - **QTI** + + - **MSM8916** + + - add port for MDM9607 ([78aac78](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/78aac78ad246ac8a04e1946bb9cd41b5734ba909)) + - add port for MSM8909 ([cf0a75f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cf0a75f04df8e90c7958304e6e0499a7d2e2519c)) + - add port for MSM8939 ([c28e96c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c28e96cd52f8fbdbbfd0bbc8bacef353ac65bfd6)) + - add SP_MIN port for AArch32 ([45b2bd0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/45b2bd0acbf4678eb59d36eb0db7746f5286a868)) + - add Test Secure Payload (TSP) port ([6b8f9e1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6b8f9e16a7849852abaf190f96130462f70eae17)) + - allow selecting which UART to use ([aad23f1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/aad23f1a2c109fb853e498c17fa1e97fbdb6522c)) + - clear CACHE_LOCK for MMU-500 r2p0+ ([d9b0442](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d9b04423cfbf18cb510fb8e65ad02e7a1f4fe873)) + - initialize CCI-400 for multiple clusters ([1240dc7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1240dc7ef11e850bdf7a4e66de3d858e26555842)) + - power on L2 caches for secondary clusters ([c822d26](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c822d26506a589d4fa017246eeb83627f2efb554)) + + - **ST** + + - add RCC registers list ([4cfbb84](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4cfbb84aeb361d8e4d72f0b0652d02918168b55e)) + - allow AARCH64 compilation for common code ([dad7181](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/dad718169815f7cec09144b770fc66c6d9c58d17)) + - introduce new platform STM32MP2 ([35527fb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/35527fb41829102083b488a5150c0c707c5ede15)) + - support gcc as linker ([7762531](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7762531216a599d98dcf88aef8f8e980e0db90ed)) + - update STM32MP DT files ([4c8e8ea](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4c8e8ea772905c1420720a900dd3e7d94eefbc7e)) + + - **STM32MP1** + + - add FWU with boot from NOR-SPI ([dfbadfd](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/dfbadfd96b6f3d383e8f1c3c8b0c91ca2110ea2e)) + + - **STM32MP15** + + - disable OP-TEE shared memory ([fb1d3bd](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/fb1d3bd9330ce70f735a344dd4223faffb261118)) + + - **STM32MP2** + + - add console configuration ([87a940e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/87a940e027dd11d0ec03ec605f205374b18361ba)) + - generate stm32 file ([e5839ed](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e5839ed79e34b8aa8c7c94da8c79e8ee8a7467df)) + + - **Texas Instruments** + + - add TI-SCI query firmware capabilities command support ([7ab7828](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7ab782801f8c78ae6a8293d25cad687c86a4ac4e)) + - query firmware for suspend capability ([ce1008f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ce1008fef1ace613bc36886fd1627164edfef245)) + - remove extra core counts in cluster 2 and 3 ([e986845](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e9868458e6de2ffb3c08e2fafa444a812b895337)) + + - **Xilinx** + + - add support to get chipid ([0563601](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0563601f03f0404bbc57464d3458c07614f920ca)) + - clean macro names ([bfd0626](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bfd0626554374dd94a0105a5633df0afeae731b1)) + - fix IPI calculation for Versal/NET ([69a5bee](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/69a5bee4c3633fd963d97f90f3a98e95a640d2da)) + - move IPI related macros to plat_ipi.h ([b2258ce](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b2258ce30cf720d71b1022c9cbee135c879027c5)) + - remove crash console unused macros ([473ada6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/473ada6be65af7fdad85845336f42ed481eea11b)) + - setup local/remote id in header ([068b0bc](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/068b0bc6e39f1fc18f9450619942c711f860a7e2)) + - switch boot console to runtime ([9c1c8f0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9c1c8f010143e179dee76381f3796f3801e6d220)) + - sync macro names ([04a4833](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/04a483359fef61353d95619e84ec6b495b27adfb)) + - used console also as crash console ([3e6b96e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3e6b96e869238f21c8887b835c3bfed487dbe653)) + + - **Versal** + + - add support for SMCC ARCH SOC ID ([079c6e2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/079c6e2403fd07db2b41f7c6e7e8c568467a2c6b)) + - add tsp support ([7ff4d4f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7ff4d4fbe58273541da86fa72786d4bd4604be9a)) + - ddr address reservation in dtb at runtime ([56d1857](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/56d1857efc21cff5e75aa65bba21e333a8552d04)) + - enable assertion ([0375188](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0375188a3e114edf62a732e80ea0f08dde3bf0b0)) + - retrieval of console information from dtb ([7c36fbc](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7c36fbcc13793899390a01a9b4a623ff2fbf7ee1)) + + - **Versal NET** + + - add cluster check in handoff parameters ([01c8c6a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/01c8c6a5542fbf09fa91bbdbc95b735bbc9f02d7)) + - add support for SMCC ARCH SOC ID ([1873e7f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1873e7f7d879c3d0aba54c3785df534b9a7037b7)) + - add the IPI CRC checksum macro support ([ba56b01](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ba56b012c8ba8e5c4e6f77ab8a921e494d040a44)) + - add tsp support ([639b367](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/639b3676cc30dcf3e3e4d478906e7f7f37a7f1e4)) + - ddr address reservation in dtb at runtime ([46a08aa](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/46a08aab4c56ad9e3f57b127a02fead1e6b8cf38)) + - enable assertion ([80cb4b1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/80cb4b14049c01df9a57cad9d1b94b10f904462f)) + - get the handoff params using IPI ([a36ac40](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a36ac40c4e93e56380374301f558f508ad2cbf96)) + - remove empty crash console setup ([6a14246](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6a14246ad469664b56f1fdb111433515ffcccaf6)) + - retrieval of console information from dtb ([a467e81](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a467e813a362fae69484e70ecb26fd8b14489d38)) + + - **ZynqMP** + + - enable assertion ([2243ba3](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2243ba3c38ae5bab894709a4e98f188815398ef1)) + - remove pm_ioctl_set_sgmii_mode api ([7414aaa](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7414aaa1a1e31df66866f0e1c97ba7c9add2427f)) + - retrieval of console information from dtb ([3923462](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3923462239c9e54088bd5b01fd5df469b2758582)) + + - **Nuvoton** + + - added support for npcm845x chip ([edcece1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/edcece15c76423832fc1ffdb255528bf4c719516)) + +- **Bootloader Images** + + - **BL2** + + - add gpt support ([6ed98c4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6ed98c45db01023d52a47eb4ede0ffb44de85f00)) + + - **BL31** + + - reuse SPM_MM specific defines for SPMC_AT_EL3 ([f5e1bed](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f5e1bed2669cce46a1d7c6b8d3f8f884b4d589b3)) + + - **BL32** + + - print entry point before exiting SP_MIN ([94e1be2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/94e1be2b2918d8e70ac33cc8551e913d75e86398)) + +- **Services** + + - **RME** + + - save PAuth context when RME is enabled ([13cc1aa](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/13cc1aa70a666bc8f768569e5481b3daf499b7d1)) + + - **RMMD** + + - enable SME for RMM ([f92eb7e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f92eb7e261bdaea54c10ad34451a7667a6eb4084)) + - pass SMCCCv1.3 SVE hint bit to RMM ([6788963](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/678896301b807cb1130ca27fa53acc66d57b855e)) + + - **RMM** + + - update RMI VERSION command as per EAC5 ([ade6000](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ade6000ff0b3aa41d581d5738ce42f5ea4d3b77d)) + + - **SPM** + + - separate StMM SP specifics to add support for a S-EL0 SP ([549bc04](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/549bc04f148f3b42ea0808b9ab0794a48d67007d)) + + - **EL3 SPMC** + + - add a flag to enable support to load SEL0 SP ([801cd3c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/801cd3c84a7bb8a66c5a40de25e611ec6448239c)) + + - **SPMD** + + - add partition info get regs ([0b850e9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0b850e9e7c89667f9a12d49492a60baf44750dd9)) + - add spmd logical partitions ([890b508](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/890b5088203e990d683a9c837e976be62c6501aa)) + - el3 direct message API ([66bdfd6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/66bdfd6e4e6d8e086a30397be6055dbb04846895)) + - get logical partitions info ([95f7f6d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/95f7f6d86a6aadc9d235684fd1aa57ddc4c56ea9)) + + - **ERRATA ABI** + + - add support for Cortex-X3 ([9c16521](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9c16521606b1269ef13a69ec450b8d14ef92bde9)) + +- **Libraries** + + - **CPU Support** + + - add a concise way to implement AArch64 errata ([3f4c1e1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3f4c1e1e7b976e6950cbcc4ddf8c32e989d837ac)) + - add a way to automatically report errata ([4f748cc](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4f748cc44cb12160dfca86d94a1075f38f7c99e4)) + - add errata framework helpers ([445f7b5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/445f7b5191992c760e1089f566b94473a0432a1e)) + - add more errata framework helpers ([94a75ad](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/94a75ad456a8bda75ca1e4343f00be249a201a69)) + - add support for Gelas CPU ([02586e0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/02586e0e28e590fbc5e8461cfdc03db08485c14f)) + - add support for hermes cpu ([a00e907](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a00e907696dd7dcae9ec221ea4ee49d4179a8e2a)) + - add support for Nevis CPU ([5497958](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/549795895cae55b11c1a7ce522aa6740de863fb4)) + - add support for Travis CPU ([a0594ad](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a0594add2e2661a1b1e1f392bf015687004197bb)) + - conform DSU errata to errata framework PCS ([ee6d04d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ee6d04d449d7a23840bab00f3d3ffd88c6c7bca6)) + - make revision procedure call optional ([4d22b0e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4d22b0e5ba01b423f9f5200e4702750102635145)) + - wrappers to propagate AArch32 errata info ([34c51f3](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/34c51f327d47653637cf3604b4cd20819e795f25)) + + - **EL3 Runtime** + + - modify vector entry paths ([d04c04a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d04c04a4e8d968f9f82de810a3c763474e3faeb7)) + + - **RAS** + + - reuse SPM_MM specific defines for SPMC_AT_EL3 ([6e92a82](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6e92a82c81d2b0e49df730f68c8312beec1d3b48)) + - use FEAT_IESB for error synchronization ([6597fcf](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6597fcf169fa548d40f1e63391d12d207c491266)) + + - **Translation Tables** + + - detect 4KB and 16KB page support when FEAT_LPA2 is present ([bff074d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bff074dd941d4fb51d6abade5db4b636f977d6f7)) + + - **C Standard Library** + + - add %X to printf/snprintf ([483edc2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/483edc207a533a5eaf07fa1e2c47f29f1dc64e4a)) + - implement memcpy_s in lib ([f328bff](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f328bff667c12099e82de6e94f3775a124ee78c7)) + + - **PSA** + + - interface with RSS for retrieving ROTPK ([50316e2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/50316e226fbbe30b5eb4121225958a9b63e58bb1)) + + - **Firmware Handoff** + + - introduce firmware handoff library ([3ba2c15](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3ba2c15147cc0c86342a443cd0cbfab3d2931c06)) + - port BL31-BL33 interface to fw handoff framework ([94c90ac](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/94c90ac8168f4e257b67e138a53a2dbc612e4194)) + +- **Drivers** + + - **Authentication** + + - add CCA NV ctr to CCA CoT ([e3b1cc0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e3b1cc0c51c7b0bae6abd81e15e4c2a00442c5db)) + - add explicit entries for key OIDs ([0cffcdd](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0cffcdd617986f0750b384620f5b960059d91fc9)) + - create a zero-OID for Subject Public Key ([9505d03](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9505d03e368d8e620c4defeb53dad846d5bc7e62)) + - ecdsa p384 key support ([557f7d8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/557f7d806a62a460404f8d1bec84c9400585930b)) + - measure and publicise the Public Key ([9eaa5a0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9eaa5a09ed5805ec6423bc751b4254fba19090c1)) + + - **mbedTLS** + + - update to 3.4.1 ([e686cdb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e686cdb450bbf01d42850457f83e45208a2655f8)) + - add deprecation notice ([267c106](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/267c106f02e6996071985adbe695406a4978e97f)) + + - **mbedTLS-PSA** + + - initialise mbedtls psa crypto ([4eaaaa1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4eaaaa19299040cfee0585d7daa744dee716d398)) + - introduce PSA_CRYPTO build option ([5782b89](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5782b890d29646924d8bd3f46acdc73a6e02feb2)) + - mbedTLS PSA Crypto with ECDSA ([255ce97](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/255ce97d609a93ab5528a653735abc46c2627e8f)) + - register an ad-hoc PSA crypto driver ([38f8936](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/38f893692ad9b8edb5413f4b2b9cd15a9b485685)) + - use PSA crypto API during hash calculation ([484b586](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/484b58696d627c68869d86e2c401a9088392659e)) + - use PSA crypto API during signature verification ([eaa62e8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/eaa62e825e31fb22a6245d9a5ab9cf5c9f8c0e46)) + - use PSA crypto API for hash verification ([2ed061c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2ed061c43525b8a9cd82b38d31277a8df594edd5)) + + - **Measured Boot** + + - introduce platform function to measure and publish Public Key ([2971bad](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2971bad8d48c6f0ddb7436efd16375bd72ade6bd)) + + - **GUID Partition Tables Support** + + - add interface to init gpt ([f08460d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f08460dc085283f25fd6b5df792f263ccdf22421)) + - add support to use backup GPT header ([ad2dd65](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ad2dd65871b4411c735271f98a4fa5102abb2a00)) + + - **Arm** + + - **Ethos-N** + + - update npu error handling ([4796d2d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4796d2d9bb4a1c0ccaffa4f6b49dbb0f0304d1d1)) + + - **RSS** + + - set the signer-ID in the RSS metadata ([60861a0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/60861a04e06d98ba6a9ae984cc5565f064fac9d1)) + + - **ST** + + - **Clock** + + - allow aarch64 compilation of STGEN functions ([b1718c6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b1718c6382cff096c46dd216b5c99586eb303d29)) + - stub fdt_get_rcc_secure_state ([19c3808](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/19c38081d3cbb4062d8894e6c3ec3c4e1d01a767)) + + - **UART** + + - add AARCH64 stm32_console driver ([c6d070c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c6d070cdba2c9a37b2253354f4cc3ba7e127e35d)) + +- **Miscellaneous** + + - **AArch64** + + - add stack debug information to assembly routines ([f832885](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f8328853031ab6dfc57059ff181138babc7779a0)) + + - **DT Bindings** + + - add the STM32MP2 clock and reset bindings ([3ccb708](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3ccb708ecede0858c3c8633942dd9ceec1511fa5)) + + - **FDTs** + + - **Morello** + + - add thermal framework ([0b22160](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0b221603e909cd493feeaab96d9c6f5458c628a8)) + + - **STM32MP2** + + - add stm32mp257f-ev1 board ([9aa5371](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9aa5371f2fde18ed9ef466f3ee08e599bcdca2dd)) + - introduce stm32mp25 pinctrl files ([2c62cc4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2c62cc4a879b3ca5414227a2ddcd965814f3d112)) + - introduce stm32mp25 SoCs family ([0dc283d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0dc283d29e4d962553046ea7ba30e90ea64f6d3d)) + + - **TBBR** + + - add image id for backup GPT ([1051606](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1051606c3df3b5a0ebd4e4dad1e5e4a57e2f4d69)) + - update PK_DER_LEN for ECDSA P-384 keys ([c1ec23d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c1ec23dd60954582a9b5dd49e85b092e9ece0680)) + +- **Documentation** + + - introduce STM32MP2 doc ([ee5076f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ee5076f9716591333f1f5aa73b02c130c57917db)) + - save BL32 image base and size in entry point info ([31dcf23](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/31dcf2345172de50b098d7a080c65ee6faa87df8)) + - add a threat model for TF-A with Arm CCA ([4463541](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/446354122cea54255630d250064f5f889045acb0)) + - cover threats inherent to receiving data over UART ([348446a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/348446ad2a836f7fa0ab05cdf6142342a1c4a4b3)) + - add a section for experimental build options ([4885600](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/48856003bfaf8c8d0ce7b29e2e1262f7f1dfbb5d)) + +- **Build System** + + - include plat header in fdt build ([e03dcc8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e03dcc8f5ee2c2c48732745c5c364951eb36ceec)) + - manage patch version in Makefile ([055ebec](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/055ebeca1b642ae69885a95e3c102f95d567a11e)) + - march option selection ([7794d6c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7794d6c8f8c44acc14fbdc5ada5965310056be1e)) + - pass CCA NV ctr option to cert_create ([0f19b7a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0f19b7aada428e0ca69d27ab016928b8fbc64a79)) + - .gitignore to include memory tools ([82257de](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/82257de06df2f744b12907079d5224bd56704de1)) + - allow gcc linker on Aarch32 platforms ([cfe6767](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cfe6767f7dd483f1bd76b2ba88a75809e013c5bd)) + - bump certifi to version 2023.7.22 ([6cbf432](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6cbf43204f3ca7cc6db621652da182743748af3f)) + - convert tabs and ifdef comparisons ([72f027c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/72f027c335a9e20e479e0d684132401546685616)) + - convert tabs to spaces ([1ca73b4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1ca73b4f4a0f6929a6649b4eb12e4ce45644a892)) + - disable ENABLE_FEAT_MPAM for Aarch32 ([a07b459](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a07b4590dd06c9e27ec6d403003bcf55afa9dc27)) + - include Cortex-A78AE cpu file for FVP ([b996db1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b996db168dcdac89245bb2cb60212e3e1b3ad061)) + - pass parameters through response files ([430be43](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/430be4396bbf779c9d2cac0ed8fefd07c7b8fde2)) + - remove duplicated include order ([c189adb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c189adbd5559a31078749fd3ddd483337ad609f6)) + - remove handling of mandatory options ([1ca902a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1ca902a537d622b9f7f53f872586120ae75e2603)) + +- **Tools** + + - **Firmware Image Package Tool** + + - add ability to build statically ([4d4fec2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4d4fec281861066ab2249bc3db7c2decdd176f34)) + + - **Secure Partition Tool** + + - generate `ARM_BL2_SP_LIST_DTS` file from `sp_layout.json` ([20629b3](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/20629b3153bccdda32116ed5c4861e61fa1fba95)) + + - **Certificate Creation Tool** + + - add new option for CCA NV ctr ([60753a6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/60753a63290e255d6c4d34d0145ac00e8d69c9cf)) + - add pkcs11 engine support ([616b3ce](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/616b3ce27d9a8a83a189a16ff6a05698bc6df3c8)) + - ecdsa p384 key support ([c512c89](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c512c89cde91f10e1b283522ac956fa4da85a797)) + + - **Memory Mapping Tool** + + - add tabular memory use data ([d9d5eb1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d9d5eb138ded8d4abeaf0cd1341ddf451aa299b8)) + - add topological memory view ([cc60aba](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cc60aba227e74a171c924146a0b745450af72f3d)) + +### Resolved Issues + +- **Architecture** + + - **CPU feature / ID register handling in general** + + - move nested virtualization support to optionals ([8b2048c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8b2048c1c019d799d1806926724c2fbbc399c4c1)) + + - **Memory Partitioning and Monitoring (MPAM) Extension (FEAT_MPAM)** + + - refine MPAM initialization and enablement process ([edebefb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/edebefbcbc01f4ab67a7838e0191736fd9ee0192)) + + - **Performance Monitors Extension (FEAT_PMUv3)** + + - make MDCR_EL3.MTPME=1 out of reset ([33815eb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/33815eb7194e662169676b2ce88ee4785aac9ccd)) + +- **Platforms** + + - register PLAT_SP_PRI only if not already registered ([bf01999](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bf01999aba3949e810b7c66d3a164c4e3a964bf8)) + + - **Arm** + + - add Event Log area behind Trustzone Controller ([d836df7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d836df71ea50e0863f7858f71b06653058e64140)) + - correct the SPMC_AT_EL3 condition ([a0ef1c0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a0ef1c0ef030e8fee8ad8f8a5f4a0fa911403a7c)) + - fix GIC macros for GICv4.1 support ([f1df8f1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f1df8f10c6906519c54483f1f7a67f5cc507ec31)) + - add RAS_FFH_SUPPORT check for RAS EHF priority ([1c01284](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1c012840cab6529edbbc1bc7e3bcba11477a6955)) + - do not program DSU CLUSTERPWRDN register ([3209b35](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3209b35d2a372e71b96f3efbd7631d32518dc9b7)) + + - **FPGA** + + - enable CPU features required for ARMv9.2 cores ([b321c24](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b321c243423b9341bc04e839a795ff31247eacd5)) + + - **FVP** + + - adjust BL2 maximum size as per total SRAM size ([965aace](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/965aacea919525baa03308a5a08205e506be0bf4)) + - adjust BL31 maximum size as per total SRAM size ([24e224b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/24e224b41cc6fda4b507861cf8e409d8e4a3f7cd)) + - conditionally increase XLAT and MMAP table entries ([03cf4e9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/03cf4e9aad2774ce221ccfe6f345ffcc8aabee4a)) + - extract core id from mpidr for pwrc operations ([70bc744](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/70bc74441b9901ee91ebb32be1def1e645374488)) + - increase maximum MMAP and XLAT entries count ([12fe591](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/12fe591b3e05255c167c5a9e21eaac2a9946f55c)) + - increase the maximum size of Event Log ([f1dfaa4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f1dfaa42cf1a93523501ce694260d88acee7c0c0)) + - resolve broken workaround reference ([bcb3ea9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bcb3ea92f8626e48340bd65c7c3007953e0ee8f4)) + - update pwr_domain_suspend ([f51d277](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f51d277de3e5f84eafafb32596ca0b154d11c4d5)) + - update system suspend in OS-initiated mode ([e0ef05b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e0ef05bb2c260e0441186dd8647dea531bb1daf3)) + + - **Morello** + + - configure platform specific secure SPIs ([80f8769](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/80f8769b26efcbce842d0ed62950603dfd83ef9b)) + + - **N1SDP** + + - configure platform specific secure SPIs ([7b0c95a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7b0c95abc8e399a4a676647f4cffffa7ed21b3e6)) + - fix spi_ids range for n1sdp multichip boot ([31f60a9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/31f60a968347497562b0129134928d7ac4767710)) + + - **SGI** + + - update PLAT_SP_PRI macro definition ([6f689a5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6f689a51a577f740b341744e62c667733a79df94)) + + - **TC** + + - Correct return type ([b0542b5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b0542b58ca77b922cf879dfb7d38356b32399c56)) + - rename macro to match PSA spec ([1fc20d7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1fc20d7f523e5c4bafb23584b1309ca432307ea4)) + + - **Corstone-1000** + + - add cpu_helpers.S to platform.mk ([cb27274](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cb27274c9964deab3b613a48c1f293c122126ee5)) + - modify boot device dependencies ([3ff5fc2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3ff5fc2b35638afea2fad3cd0c76dcadc1adb8c2)) + - removing the signature area ([5856a91](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5856a91a641a4cd7403143bb90b098855a77ac16)) + + - **Aspeed** + + - **AST2700** + + - add device mapping for coherent memory ([cef2e92](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cef2e92568045da4e1d26a9ebfb38b0176b4ec33)) + + - **Broadcom** + + - fix misspelled header inclusion guard ([a9779c1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a9779c11daa251abb9c523b4e01e6ef26c7d46fc)) + + - **Cadence** + + - update console flush uart driver ([e27bebb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e27bebb0fe84bf58eed1fb61a65da9280309f24e)) + + - **Intel** + + - fix ncore ccu snoop dvm enable bug ([106aa54](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/106aa54d922c8d0980c527530cbb417141fe3f83)) + - resolved coverity checking ([1af7bf7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1af7bf71c042add4f473c056f850a8a4792b6bbd)) + - update boot scratch cold register to use cold 8 ([655af4f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/655af4f49278476ebac6bb865e325eca865684f2)) + - update checking for memcpy and memset ([c418064](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c418064eb5ae2f223457e4a25a91f379e8cf5223)) + + - **MediaTek** + + - support saving/restoring GICR registers ([f73466e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f73466e9a2fe35fc31a7a58a2e24308a9db341d7)) + + - **NVIDIA** + + - **Tegra** + + - return correct error code for plat_core_pos_by_mpidr ([6bd79b1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6bd79b13f8a8566d047ff25da9110a887b4e36e7)) + + - **NXP** + + - **i.MX** + + - **i.MX 8M** + + - make IMX_BOOT_UART_BASE autodetection option more obvious ([101f070](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/101f07022a0337b074c03e60078b94789bc766f6)) + - map BL32 memory only if SPD_opteed or SPD_trusty is enabled ([4827613](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/4827613c9a8db6238e9411b508ef20bda3113146)) + + - **QEMU** + + - fix 32-bit builds with stack protector ([e57ca89](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e57ca899efe414bd685e89e335a21d15a25b04f8)) + + - **SBSA** + + - align FIP base to BL1 size ([408cde8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/408cde8a59080ac2caa11c4d99474b2ef09f90df)) + + - **QTI** + + - **SC7280** + + - update pwr_domain_suspend ([a43be0f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a43be0f61003df1d8cf01bd706d5af305428c022)) + - update system suspend in OS-initiated mode ([0a9270a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0a9270abe82b396bf6fa15c7eb39c3499452686a)) + + - **Renesas** + + - **R-Car** + + - add mandatory fields in 'reserved-memory' node ([f945498](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f945498faab3bd44f0f957931809de2f59517814)) + + - **R-Car 3** + + - fix CPG register code comment ([69c371b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/69c371bc16533eb97a1d9bc408f9f17da87ba641)) + - update Draak and Eagle board IDs ([281edfe](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/281edfee02bc72d81aa4972d60216647f932f3df)) + + - **ST** + + - allow crypto lib compilation in aarch64 ([76e4fab](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/76e4fab000825c4361b4b9843c6e0c2f4f6eb1fd)) + - enable RTC clock before accessing nv counter ([77ce6a5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/77ce6a561eae769419559632afa4d807a4fc33b6)) + - flush UART at the end of uart_read() ([a9cb7d0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a9cb7d002df4f09dce779b5b56640c2fdd77ba3b)) + - properly check LOADADDR ([9f72f5e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9f72f5eac81c23fe39415b2346b112f64fba8610)) + - reduce MMC block_buffer ([a2500ab](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a2500ab7aba27ed5d613718f5f15371bbe895ca6)) + - setting default KEY_SIZE ([6f3ca8a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6f3ca8ada60addc601f685fa51619d2101d7406a)) + - update comment on encryption key ([5c506c7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5c506c73751cc3f51df88826b89b5f729d8955c5)) + - update dt_get_ddr_size() type ([2a4abe0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2a4abe0b37f8d1987019c3de30e3301d8f8958d7)) + + - **STM32MP1** + + - add void entry in plat_def_toc_entries ([8214ecd](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8214ecdab22a72877dfff539eee31cfb92f36423)) + - properly check PSCI functions return ([241f874](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/241f8745459ae413ca22fcc0f1081da8de48796f)) + - use the BSEC nodes compatible for stm32mp13 ([2171bd9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2171bd9511258e7aebaa3ce2f9498093d3a3c63e)) + + - **Texas Instruments** + + - align static device region addresses to reduce MMU table count ([53a868f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/53a868f676d9ad6ec37d69155241883b8e7bf0bf)) + - fix TISCI API changes during refactor ([d7a7135](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d7a7135d32a8c7da004c0c19b75bd4e2813f9759)) + - release lock in all TI-SCI xfer return paths ([e92375e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e92375e07cf54c2fbac6616e58116c98507ac177)) + - remove check for zero value in BL31 boot args ([44edd3b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/44edd3bd7cfe1d5fb1599ab5eee9b81efea984e0)) + + - **Xilinx** + + - add headers to resolve compile time issue ([744d60a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/744d60aab4e0173e21564fde092884c10267a6cc)) + - dcache flush for dtb region ([93ed138](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/93ed138006dc09e5b09222cabae8952dd5363ad2)) + - don't reserve 1 more byte ([c3b69bf](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c3b69bf17bc0231b0dae613dc9e1e01e41f32236)) + - dynamic mmap region for dtb ([7ca7fb1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7ca7fb1bf0873824531a6eee2da1214b61496b02)) + - remove clock_setrate and clock_getrate api ([e5955d7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e5955d7c63291a736efe75fb93effbc3fefb19fb)) + - remove console error message ([f9820f2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f9820f21b8317fb3a08598452b252f7a6a2a4ad7)) + - update dtb when dtb address and tf-a ddr flow is used ([fdf8f92](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/fdf8f929df078943c24154e25d9d7661139826b3)) + + - **DCC (Debug Communication Channel)** + + - add dcc console unregister function ([0936abe](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0936abe9b235dd996e9466288415bb994acbbe8f)) + - enable DCC also for crash console ([c6d9186](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c6d9186f60a08b4a44b1ecf38071eacdc9553ef6)) + + - **Versal** + + - add missing irq mapping for wakeup src ([06b9c4c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/06b9c4c87df0b2a052e4f3330b86cc572c7bf885)) + - fix BLXX memory limits for user defined values ([f123b91](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f123b91fddfcc882577590bbf4a54e1497ef9a64)) + - make pmc ipi channel as secure ([96eaafa](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/96eaafa3f855ea9e0b6ce13a44f37fa9f1026207)) + - type cast addresses to fix integer overflow ([bfe82cf](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bfe82cff6f6ab8e557e7ad7db8eae573f1fb02f3)) + - use correct macro name for ocm base address ([56afab7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/56afab73a852fd3e10e607d2d86dedc3bae3ff2d)) + + - **Versal NET** + + - add redundant call to avoid glitches ([cebb7cc](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cebb7cc110e02281060ec854a28a3bee382d8efa)) + - change flag to increase security ([e8efb65](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e8efb65afb996c9832384c96b36aee3092b56a4b)) + - correct device node indexes ([66b5620](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/66b5620c873ef656f779a4c2d844b187ba474d9d)) + - don't clear pending interrupts ([fb73ea6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/fb73ea6cc3f9f4f51195b416a0f803a72d81eff6)) + - fix BLXX memory limits for user defined values ([a80da38](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a80da3899a5eea6bc022c37101ac0b7d970846f7)) + - make pmc ipi channel as secure ([2c65b79](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2c65b79e256ea5ead117efeaa5d39c3e53c83bdc)) + - use correct macro name for uart baudrate ([e2ef1df](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e2ef1dfcdbef7e448e9dd96852ffb8489c187d34)) + + - **ZynqMP** + + - do not export apu_ipi ([237c5a7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/237c5a74a295d6306529be024aaa3d6af4b32898)) + - fix BLXX memory limits for user defined values ([8ce2fbf](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8ce2fbffe37ddcab5071601f1b311ee82a56b7cc)) + - fix prepare_dtb() memory description ([3efee73](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3efee73d528578162b8eb046dce540f0c5f0041a)) + - fix sdei arm_validate_ns_entrypoint() ([3b3c70a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3b3c70a418522176f3a55d8e266e3968f7d4f832)) + - handling of type el3 interrrupts ([e8d61f7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e8d61f7d91901f577030f6a45a71cf389b96d9dc)) + - make zynqmp_devices structure smaller ([7e3e799](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7e3e79995a3c02871211dd0e983fb6e886a9c518)) + - remove unused headers ([6288636](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/62886363a16f0dcef3b6acdff0a96880cf9940ce)) + - resolve runtime error in TSP ([81ad3b1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/81ad3b14b95e019eaa8d89d444680c14ede4d8ab)) + - type cast addresses to fix overflow issue ([9129163](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/91291633a1c99736803f39edb21cad95a3517ee8)) + - validate clock_id to avoid OOB variable access ([abc79c2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/abc79c275be764d76bd983837ffc487664182dac)) + + - **Nuvoton** + + - fix typo in platform.mk ([c7efb78](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c7efb78f8edc8fa66bbe2f9bad390d29f6a43fb0)) + +- **Bootloader Images** + + - **BL2** + + - bl2 start address for RESET_TO_BL2+ENABLE_PIE ([d478ac1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d478ac16c9002114da1c4708a0efb083c494ce2f)) + + - **BL31** + + - resolve runtime console garbage in next stage ([889e3d1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/889e3d1c68e37dc9f75ae432703fa8ffc7259546)) + + - **BL32** + + - always include arm_arch_svc in SP_MIN ([cd0786c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/cd0786c73e536a1d2507d77ce49e2ae2b8ee71a1)) + - avoid clearing argument registers in RESET_TO_SP_MIN case ([56055e8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/56055e87b0a756d4756a22ed26b855fbe7afe93c)) + + - **TSP** + + - fix destination ID in direct request ([ed23d27](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ed23d274fae0b2787421a1b2558d7c1e9ebb07ab)) + - flush uart console ([ae074b3](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ae074b369a25747acf98a23389e9d67b39738c71)) + +- **Services** + + - **RME** + + - **RMMD** + + - enable sme using sme_enable_per_world ([c0e16d3](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c0e16d30ab70c51737f7a01a6b365d27c1a94f3b)) + + - **SPM** + + - **EL3 SPM** + + - fix LSP direct message response ([c040621](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c040621dba5f4c097441e67c9fd99b9df174ba4e)) + - improve direct messaging validation ([48fe24c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/48fe24c50cd4990a76f88e89b77e71b9a90aec6c)) + + - **EL3 SPMC** + + - avoid descriptor size calc overflow ([27c0242](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/27c02425089548786a18d355b15acccd51880676)) + - correctly account for emad_offset ([0c2583c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0c2583c6fbfd03e70915554d4093e5f9148f3792)) + - fix incorrect CASSERT ([1dd79f9](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1dd79f9e2316e5a7a78b0ad5a34ec50288338e6f)) + - only call spmc_shm_check_obj() on complete objects ([d781959](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d781959f81923bc3a59e77abd44df2fcc61f044e)) + - prevent total_page_count overflow ([2d4da8e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2d4da8e265660ce7580219b51d5e79fd99ce1458)) + - remove experimental flag ([630a06c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/630a06c4c64f3a6804dd633081190241b1e78484)) + - use uint64_t for 64-bit type ([43318e4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/43318e4a4dcc79935150de75fe5dccbb615f4719)) + - use version-dependent minimum descriptor length ([52d8d50](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/52d8d506e715dbbeba0938cecd30ac6624d1dcfc)) + - validate descriptor headers ([56c052d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/56c052d31126c93b3c6782ea8e0c3348b5299b75)) + - validate memory address alignment ([327b5b8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/327b5b8b74faedefc45e861c797197cf6fbd6def)) + - validate shmem descriptor alignment ([dd94372](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/dd94372d77ff107726a7be53318b5694f3309ddb)) + + - **SPMD** + + - coverity scan issues ([b04343f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b04343f3c912c8abc1a37b0ebe461ab574959ecd)) + - fix FFA_VERSION forwarding ([76d53ee](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/76d53ee1aafca7ba908c7439670509107377b309)) + - perform G0 interrupt acknowledge and deactivation ([6c91fc4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6c91fc44580415aaca4cbd774d4373475f33deb2)) + - relax use of EHF with SPMC at S-EL2 ([bb6d0a1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bb6d0a174f76240728cd911130703e712520ce16)) + + - **ERRATA ABI** + + - added Neoverse N2 to Errata ABI list ([7e030b3](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7e030b376329a0466ffe7676be215770bb46d10f)) + - fix the rev-var for Cortex-A710 ([5c8fcc0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5c8fcc0ca7f5e6dc3aea947800e146fe0ffe9b84)) + - update the Cortex-A76 errata ABI struct ([92d5b50](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/92d5b501d4ba7e00e2ddfd546dc90b786966a352)) + - update the Cortex-A78C errata ABI struct ([7f2caec](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/7f2caecdbc64d1fbd34942285e1194e85c5e8614)) + - update the neoverse-N1 errata ABI struct ([56747a5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/56747a5caa50eedeb627795f1c37e0a14953c2bf)) + - update the Neoverse-N2 errata ABI struct ([80af87e](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/80af87e476ec3dd1ad26d7a906da82268a29e2b5)) + +- **Libraries** + + - **CPU Support** + + - assert invalid cpu_ops obtained ([3f721c6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/3f721c6edd20cef11c241a3ef84d94c06f5bebb4)) + - check for SME presence in Gelas ([0bbd432](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/0bbd4329bf73b0da1ed69578c385dd36358e261e)) + - fix minor issue seen with a9 cpu ([af70470](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/af704705c135f85b8b1eeda938e3dcdba3f6e561)) + - fix the rev-var for Cortex-A710 ([2bf7939](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2bf7939a7b313352deb6c6b77ee1316eff142a7c)) + - fix the rev-var of Cortex-X2 ([8ae66d6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8ae66d624e2f7cae9577ff8f99e0a45e21fb353d)) + - fix the rev-var of Neoverse-V1 ([ab2b56d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ab2b56df266f73aa53ca348d7945b119e1ef71c7)) + - flush L2 cache for Cortex-A7/12/15/17 ([c5c160c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c5c160cdddd1c365a447c1fcd148fabb9014cce0)) + - integer suffix macro definition ([1a56ed4](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1a56ed4b357e9023637c74c39c6885c558a737d2)) + - reduce generic_errata_report()'s size ([f43e09a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f43e09a12e4f4f32185d3e2accceb65895d1f16b)) + - revert erroneous use of override_vector_table macro in Cortex-A73 ([9a0c812](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9a0c81257ff116b2ca33f5b6737e0a000fb7e551)) + - update the fix for Cortex-A78AE erratum 1941500 ([67a2ad1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/67a2ad171d1fb604d4cba8fa7f92ccb66d1ef3f9)) + - update the rev-var for Cortex-A78AE ([c814619](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c814619a364aea3bd55b5ea238541864c0de7dab)) + - workaround for Cortex-A510 erratum 2080326 ([6e86475](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6e86475d55fa2981bc342a0eb78b86be233d7718)) + - workaround for Cortex-A710 erratum 2742423 ([d7bc2cb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d7bc2cb4303088873a715bcaa2ac3e0096b9d7f2)) + - workaround for Cortex-X2 erratum 2742423 ([fe06e11](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/fe06e118ab0837ff173f6b7e576dcc34b2d26bb1)) + - workaround for Cortex-X3 erratum 2070301 ([2454316](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2454316c2ae4411d0071d88c3db3c95598f12498)) + - workaround for Cortex-X3 erratum 2742421 ([5b0e443](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5b0e4438d0e604e80ffff17d02e37cae0f4b2a8f)) + - workaround for Neoverse N2 erratum 2009478 ([74bfe31](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/74bfe31fd2c992d8e1e13bf396a9d5c136967ca5)) + - workaround for Neoverse N2 erratum 2340933 ([68085ad](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/68085ad4827ac7daa39767d479d0565daa32cb47)) + - workaround for Neoverse N2 erratum 2346952 ([6cb8be1](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6cb8be17a53f4e11880ba13b78fca15895281cfe)) + - workaround for Neoverse N2 erratum 2743014 ([eb44035](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/eb44035cdec5d47d7eb3c904c8e5d8443b9dfcba)) + - workaround for Neoverse N2 erratum 2779511 ([12d2806](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/12d28067c9e76a78b148ed6fb94faf96de5e8502)) + - workaround for Neoverse V2 erratum 2331132 ([8852fb5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8852fb5b7d94229475446c81cfa58851bc2204ff)) + - workaround for Neoverse V2 erratum 2719105 ([b011402](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b01140256b5c0620cbde8e98c0df0e95343a3c71)) + - workaround for Neoverse V2 erratum 2743011 ([58dd153](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/58dd153cc88e832a6b019f1d4c2e6d64986ea69d)) + - workaround for Neoverse V2 erratum 2779510 ([ff34264](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ff342643bcfaf20d61148b90a068694fa1c44dca)) + - workaround for Neoverse V2 erratum 2801372 ([40c81ed](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/40c81ed5335191fbe32466e56aa4fb6db1da466c)) + + - **EL3 Runtime** + + - leverage generic interrupt controller helpers ([07f867b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/07f867b12251235b8582bec38e9cf39a95703e77)) + - restrict lower el EA handlers in FFH mode ([6d22b08](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6d22b089ffb1793d581fde4de76245397ad7d4ee)) + + - **Context Management** + + - make ICC_SRE_EL2 fixup generic to all worlds ([5e8cc72](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5e8cc7278659820bcd64c243cbd89c131462314c)) + - set MDCR_EL3.{NSPBE, STE} explicitly ([99506fa](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/99506face112410ae37cf617b6efa809b4eee0ee)) + + - **RAS** + + - remove RAS_FFH_SUPPORT and introduce FFH_SUPPORT ([f87e54f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f87e54f73cfee5042df526af6185ac6d9653a8f5)) + - restrict ENABLE_FEAT_RAS to have only two states ([970a4a8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/970a4a8d8c0d6894fe2fd483d06b6392639e8760)) + + - **PSCI** + + - add optional pwr_domain_validate_suspend to plat_psci_ops_t ([d348861](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d34886140c74c0afc48ab20e63523505fcfb4b7d)) + + - **SMCCC** + + - ensure that mpidr passed through SMC is valid ([e60c184](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e60c18471fc7488cc0bf1dc7eae3b43be77045a4)) + - pass SMCCCv1.3 SVE hint to internal flags ([b2d8517](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b2d851785f6c03cae4feb015fe69091582e18f5e)) + + - **Translation Tables** + + - fix defects on the xlat library reported by coverity scan ([2974ad8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/2974ad87b8561706176e113e2ec4457c919cb99a)) + - set MAX_PHYS_ADDR to total mapped physical region ([1a38aaf](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1a38aafbff93e478aa6f9e19af1ed76024062a73)) + +- **Drivers** + + - **Authentication** + + - allow hashes of different lengths ([22a5354](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/22a53545aa37c06a1ffd0f3c15e870b256a41cb7)) + - don't overwrite pk with converted pk when rotpk is hash ([1046b41](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1046b41808b23b4079f04cad370646e05207ded5)) + + - **Measured Boot** + + - don't strip last non-0 char ([b85bcb8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b85bcb8ec92126c238572ed7d242115125e411e1)) + + - **MMC** + + - initialises response buffer with zeros ([b1a2c51](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b1a2c51a0820fce803431e6ee5bd078bb1a65b0d)) + + - **MTD** + + - **NAND** + + - reset the SLC NAND ([f4d765a](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f4d765a12815e3f4bd9c4dff5fd88661b3615114)) + + - **SPI NAND** + + - add Quad Enable management ([da7a33c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/da7a33cf2f27545d9d290ff0c2ee1ec333b061bb)) + + - **SCMI** + + - add parameter for plat_scmi_clock_rates_array ([ca9d6ed](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ca9d6edc892165c38f1b2710b537c10d4a57062d)) + + - **UFS** + + - performs unsigned shift for doorbell ([e47d8a5](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/e47d8a58b0d5745c943c36fad2ec8a98af709bea)) + - set data segment length ([9d6786c](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9d6786cacee7c0eff33d1cec42c09c7002dd83d2)) + + - **Arm** + + - **GIC** + + - **GICv3** + + - map generic interrupt type to GICv3 group ([632e5ff](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/632e5ffeb8f50a98090065b63d9d071b72acd23c)) + - move invocation of gicv3_get_multichip_base function ([36704d0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/36704d09c6b26045fe2d18530a020ed23d74593d)) + + - **GIC-600** + + - fix gic600 maximum SPI ID ([69ed7dc](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/69ed7dc2e964c66eb8ff926a63a47b701ae1f3c6)) + + - **Renesas** + + - **R-Car3** + + - update DDR setting ([138ddcb](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/138ddcbf4d330d13a11576d973513014055f98c1)) + + - **ST** + + - **Clock** + + - disabling CKPER clock is not functional on stm32mp13 ([1bbcb58](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/1bbcb58a69c4ee2ee13e9d5de4499438ca08b149)) + + - **Crypto** + + - do not read RNG data if it's not ready ([53092a7](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/53092a7780fa3d1b926aae8666f1c5a19cb039f1)) + - use GENMASK_32 to define PKA registers masks ([379d77b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/379d77b3705b0f3a88332663bba956289cad5797)) + + - **DDR** + + - express memory size with size_t type ([b4e1e8f](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b4e1e8fbf0dde5679d6b3717b8579f7a3343fdf8)) + + - **UART** + + - allow 64 bit compilation ([6fef0f6](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/6fef0f67e47b3b42fc9b5dbc55bdef00a970765d)) + - correctly check UART enabled in flush fonction ([a527380](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a5273808aa1a4514f7849ca91b7859e15bf82bff)) + - skip console flush if UART is disabled ([b156d7b](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/b156d7b1cca1542f0c1c6f5d4354c43e048dc4a0)) + +- **Miscellaneous** + + - **AArch32** + + - disable workaround discovery on aarch32 for now ([d1f2748](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d1f2748ed25748237e894c68c5a163326a8c33b9)) + + - **FDTs** + + - **STM32MP1** + + - move /omit-if-no-ref/ to overlay files ([f351f91](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f351f9110f29a33923780c40d0896832fdb0ac81)) + + - **STM32MP13** + + - correct the BSEC nodes compatible ([85c2ea8](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/85c2ea8fd325797a44e814b575611aafae9e7613)) + - cosmetic fixes in PLL nodes ([8b82663](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/8b826636a39e0f20cc2c0557288b1eeab46fb923)) + + - **SDEI** + + - ensure that interrupt ID is valid ([a7eff34](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/a7eff3477dcf3624c74f5217419b1a27b7ebd2aa)) + + - **TBBR** + + - guard defines under MBEDTLS_CONFIG_FILE ([81c2e15](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/81c2e1566dc4484c23d293961744489a9a6ea3f0)) + - unrecognised 'tos-fw-key-cert' option ([f1cb5bd](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/f1cb5bd19034407f2de7cad23f2cc52ca924e561)) + +- **Documentation** + + - match boot-order size to implementation ([fd1479d](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/fd1479d9194d3f3ec98d235e077c9d6e24276fa2)) + - add missing line in the fiptool command for stm32mp1 ([d526d00](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d526d00a13f86bbd2c073c065b6e9aff339e1b41)) + - fix build errors for latexpdf ([443d6ea](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/443d6ea69992986f56246bcee44e537ab8dec069)) + - remove out-dated information about CI review comments ([74306b2](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/74306b2ac8971693d148b34d02c556d94b3e4926)) + - replace deprecated urls under tfa/docs ([5fdf198](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/5fdf198c117a4b6dbcf5242f5136f7224ceff6ff)) + - update maintainers list ([9766f41](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/9766f41d3c4cae4cd515c2f9266bb7adb4725349)) + - updated certain Neoverse N2 erratum status in docs ([d6d34b3](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d6d34b39132425dfa8c75352711c463d2989a216)) + - use rsvg-convert as the conversion backend ([c365476](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/c3654760033c08e7ffa9337e05c48336032eacb9)) + +- **Tools** + + - **Firmware Image Package Tool** + + - move juno plat_fiptool.mk ([570a230](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/570a23099c32cafcb63ecb6cc0516d76ea099daf)) + + - **Certificate Creation Tool** + + - fix key loading logic ([bb3b0c0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/bb3b0c0b09ff1d969ddd49b99642740ce2a07064)) + - key: Avoid having a temporary value for pkey in key_load ([ea6f845](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/ea6f8452f6eb561a0fa96a712da93fcdba40cd9c)) + + - **Memory Mapping Tool** + + - reintroduce support for GNU map files ([d0e3053](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/d0e3053c4f5b9d2bc70daf4db3c71f99c6da216d)) + ## [2.9.0](https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/tags/v2.8.0..refs/tags/v2.9.0) (2023-05-16) ### ⚠ BREAKING CHANGES diff --git a/atf-20231013-0ea67d76a/docs/components/activity-monitors.rst b/atf-20240117-bacca82a8/docs/components/activity-monitors.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/activity-monitors.rst rename to atf-20240117-bacca82a8/docs/components/activity-monitors.rst diff --git a/atf-20231013-0ea67d76a/docs/components/arm-sip-service.rst b/atf-20240117-bacca82a8/docs/components/arm-sip-service.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/arm-sip-service.rst rename to atf-20240117-bacca82a8/docs/components/arm-sip-service.rst diff --git a/atf-20231013-0ea67d76a/docs/components/cot-binding.rst b/atf-20240117-bacca82a8/docs/components/cot-binding.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/cot-binding.rst rename to atf-20240117-bacca82a8/docs/components/cot-binding.rst diff --git a/atf-20231013-0ea67d76a/docs/components/debugfs-design.rst b/atf-20240117-bacca82a8/docs/components/debugfs-design.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/debugfs-design.rst rename to atf-20240117-bacca82a8/docs/components/debugfs-design.rst diff --git a/atf-20231013-0ea67d76a/docs/components/el3-spmc.rst b/atf-20240117-bacca82a8/docs/components/el3-spmc.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/el3-spmc.rst rename to atf-20240117-bacca82a8/docs/components/el3-spmc.rst diff --git a/atf-20231013-0ea67d76a/docs/components/exception-handling.rst b/atf-20240117-bacca82a8/docs/components/exception-handling.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/exception-handling.rst rename to atf-20240117-bacca82a8/docs/components/exception-handling.rst diff --git a/atf-20231013-0ea67d76a/docs/components/fconf/amu-bindings.rst b/atf-20240117-bacca82a8/docs/components/fconf/amu-bindings.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/fconf/amu-bindings.rst rename to atf-20240117-bacca82a8/docs/components/fconf/amu-bindings.rst diff --git a/atf-20231013-0ea67d76a/docs/components/fconf/fconf_properties.rst b/atf-20240117-bacca82a8/docs/components/fconf/fconf_properties.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/fconf/fconf_properties.rst rename to atf-20240117-bacca82a8/docs/components/fconf/fconf_properties.rst diff --git a/atf-20231013-0ea67d76a/docs/components/fconf/index.rst b/atf-20240117-bacca82a8/docs/components/fconf/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/fconf/index.rst rename to atf-20240117-bacca82a8/docs/components/fconf/index.rst diff --git a/atf-20231013-0ea67d76a/docs/components/fconf/mpmm-bindings.rst b/atf-20240117-bacca82a8/docs/components/fconf/mpmm-bindings.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/fconf/mpmm-bindings.rst rename to atf-20240117-bacca82a8/docs/components/fconf/mpmm-bindings.rst diff --git a/atf-20231013-0ea67d76a/docs/components/ffa-manifest-binding.rst b/atf-20240117-bacca82a8/docs/components/ffa-manifest-binding.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/ffa-manifest-binding.rst rename to atf-20240117-bacca82a8/docs/components/ffa-manifest-binding.rst diff --git a/atf-20231013-0ea67d76a/docs/components/firmware-update.rst b/atf-20240117-bacca82a8/docs/components/firmware-update.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/firmware-update.rst rename to atf-20240117-bacca82a8/docs/components/firmware-update.rst diff --git a/atf-20231013-0ea67d76a/docs/components/granule-protection-tables-design.rst b/atf-20240117-bacca82a8/docs/components/granule-protection-tables-design.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/granule-protection-tables-design.rst rename to atf-20240117-bacca82a8/docs/components/granule-protection-tables-design.rst diff --git a/atf-20231013-0ea67d76a/docs/components/index.rst b/atf-20240117-bacca82a8/docs/components/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/index.rst rename to atf-20240117-bacca82a8/docs/components/index.rst diff --git a/atf-20231013-0ea67d76a/docs/components/measured_boot/event_log.rst b/atf-20240117-bacca82a8/docs/components/measured_boot/event_log.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/measured_boot/event_log.rst rename to atf-20240117-bacca82a8/docs/components/measured_boot/event_log.rst diff --git a/atf-20231013-0ea67d76a/docs/components/measured_boot/index.rst b/atf-20240117-bacca82a8/docs/components/measured_boot/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/measured_boot/index.rst rename to atf-20240117-bacca82a8/docs/components/measured_boot/index.rst diff --git a/atf-20231013-0ea67d76a/docs/components/mpmm.rst b/atf-20240117-bacca82a8/docs/components/mpmm.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/mpmm.rst rename to atf-20240117-bacca82a8/docs/components/mpmm.rst diff --git a/atf-20231013-0ea67d76a/docs/components/platform-interrupt-controller-API.rst b/atf-20240117-bacca82a8/docs/components/platform-interrupt-controller-API.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/platform-interrupt-controller-API.rst rename to atf-20240117-bacca82a8/docs/components/platform-interrupt-controller-API.rst diff --git a/atf-20231013-0ea67d76a/docs/components/ras.rst b/atf-20240117-bacca82a8/docs/components/ras.rst similarity index 78% rename from atf-20231013-0ea67d76a/docs/components/ras.rst rename to atf-20240117-bacca82a8/docs/components/ras.rst index 8d003452c..747367a4c 100644 --- a/atf-20231013-0ea67d76a/docs/components/ras.rst +++ b/atf-20240117-bacca82a8/docs/components/ras.rst @@ -10,6 +10,9 @@ precise definition of RAS terminology, please refer to the Arm Architecture Reference Manual and `RAS Supplement`_. The rest of this document assumes familiarity with architecture and terminology. +**IMPORTANT NOTE**: TF-A implementation assumes that if RAS extension is present +then FEAT_IESB is also implmented. + There are two philosophies for handling RAS errors from Non-secure world point of view. @@ -56,26 +59,87 @@ Introduction EA's originating/attributed to NS world are handled first in NS and Kernel navigates the std error records directly. -**KFH can be supported in a platform without TF-A being aware of it but there are few -corner cases where TF-A needs to have special handling, which is currently missing and -will be added in future** +- KFH is the default handling mode if platform does not explicitly enable FFH mode. +- KFH mode does not need any EL3 involvement except for the reflection of errors back + to lower EL. This happens when there is an error (EA) in the system which is not yet + signaled to PE while executing at lower EL. During entry into EL3 the errors (EA) are + synchronized causing async EA to pend at EL3. + +Error Syncronization at EL3 entry +================================= + +During entry to EL3 from lower EL, if there is any pending async EAs they are either +reflected back to lower EL (KFH) or handled in EL3 itself (FFH). + +|Image 1| TF-A build options ================== -- **ENABLE_FEAT_RAS**: Manage FEAT_RAS extension when switching the world. -- **RAS_FFH_SUPPORT**: Pull in necessary framework and platform hooks for Firmware first - handling(FFH) of RAS errors. +- **ENABLE_FEAT_RAS**: Enable RAS extension feature at EL3. +- **HANDLE_EA_EL3_FIRST_NS**: Required for FFH - **RAS_TRAP_NS_ERR_REC_ACCESS**: Trap Non-secure access of RAS error record registers. -- **RAS_EXTENSION**: Deprecated macro, equivalent to ENABLE_FEAT_RAS and RAS_FFH_SUPPORT - put together. +- **RAS_EXTENSION**: Deprecated macro, equivalent to ENABLE_FEAT_RAS and + HANDLE_EA_EL3_FIRST_NS put together. + +RAS internal macros + +- **FFH_SUPPORT**: Gets enabled if **HANDLE_EA_EL3_FIRST_NS** is enabled. RAS feature has dependency on some other TF-A build flags - **EL3_EXCEPTION_HANDLING**: Required for FFH -- **HANDLE_EA_EL3_FIRST_NS**: Required for FFH - **FAULT_INJECTION_SUPPORT**: Required for testing RAS feature on fvp platform +TF-A Tests +========== + +RAS functionality is regularly tested in TF-A CI using `RAS test group`_ which has multiple +configurations for testing lower EL External aborts. + +All the tests are written in TF-A tests which runs as NS-EL2 payload. + +- **FFH without RAS extension** + + *fvp-ea-ffh,fvp-ea-ffh:fvp-tftf-fip.tftf-aemv8a-debug* + + Couple of tests, one each for sync EA and async EA from lower EL which gets handled in El3. + Inject External aborts(sync/async) which traps in EL3, FVP has a handler which gracefully + handles these errors and returns back to TF-A Tests + + Build Configs : **HANDLE_EA_EL3_FIRST_NS** , **PLATFORM_TEST_EA_FFH** + +- **FFH with RAS extension** + + Three Tests : + + - *fvp-ras-ffh,fvp-single-fault:fvp-tftf-fip.tftf-aemv8a.fi-debug* + + Inject an unrecoverable RAS error, which gets handled in EL3. + + - *fvp-ras-ffh,fvp-uncontainable:fvp-tftf.fault-fip.tftf-aemv8a.fi-debug* + + Inject uncontainable RAS errors which causes platform to panic. + + - *fvp-ras-ffh,fvp-ras-ffh-nested:fvp-tftf-fip.tftf-ras_ffh_nested-aemv8a.fi-debug* + + Test nested exception handling at El3 for synchronized async EAs. Inject an SError in lower EL + which remain pending until we enter EL3 through SMC call. At EL3 entry on encountering a pending + async EA it will handle the async EA first (nested exception) before handling the original SMC call. + +- **KFH with RAS extension** + + Couple of tests in the group : + + - *fvp-ras-kfh,fvp-ras-kfh:fvp-tftf-fip.tftf-aemv8a.fi-debug* + + Inject and handle RAS errors in TF-A tests (no El3 involvement) + + - *fvp-ras-kfh,fvp-ras-kfh-reflect:fvp-tftf-fip.tftf-ras_kfh_reflection-aemv8a.fi-debug* + + Reflection of synchronized errors from EL3 to TF-A tests, two tests one each for reflecting + in IRQ and SMC path. + RAS Framework ============= @@ -238,7 +302,7 @@ Engaging the RAS framework Enabling RAS support is a platform choice The RAS support in |TF-A| introduces a default implementation of -``plat_ea_handler``, the External Abort handler in EL3. When ``RAS_FFH_SUPPORT`` +``plat_ea_handler``, the External Abort handler in EL3. When ``ENABLE_FEAT_RAS`` is set to ``1``, it'll first call ``ras_ea_handler()`` function, which is the top-level RAS exception handler. ``ras_ea_handler`` is responsible for iterating to through platform-supplied error records, probe them, and when an error is @@ -277,3 +341,6 @@ for non-interrupt exceptions, they're explicit using :ref:`EHF APIs *Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved.* .. _RAS Supplement: https://developer.arm.com/documentation/ddi0587/latest +.. _RAS Test group: https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git/tree/group/tf-l3-boot-tests-ras?h=refs/heads/master + +.. |Image 1| image:: ../resources/diagrams/bl31-exception-entry-error-synchronization.png diff --git a/atf-20231013-0ea67d76a/docs/components/realm-management-extension.rst b/atf-20240117-bacca82a8/docs/components/realm-management-extension.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/realm-management-extension.rst rename to atf-20240117-bacca82a8/docs/components/realm-management-extension.rst diff --git a/atf-20231013-0ea67d76a/docs/components/rmm-el3-comms-spec.rst b/atf-20240117-bacca82a8/docs/components/rmm-el3-comms-spec.rst similarity index 98% rename from atf-20231013-0ea67d76a/docs/components/rmm-el3-comms-spec.rst rename to atf-20240117-bacca82a8/docs/components/rmm-el3-comms-spec.rst index 009ac28c2..5f0b5abac 100644 --- a/atf-20231013-0ea67d76a/docs/components/rmm-el3-comms-spec.rst +++ b/atf-20240117-bacca82a8/docs/components/rmm-el3-comms-spec.rst @@ -159,8 +159,8 @@ as per the following table: ``E_RMM_BOOT_SUCCESS``,Boot successful,0 ``E_RMM_BOOT_ERR_UNKNOWN``,Unknown error,-1 ``E_RMM_BOOT_VERSION_NOT_VALID``,Boot Interface version reported by EL3 is not supported by RMM,-2 - ``E_RMM_BOOT_CPUS_OUT_OF_RAGE``,Number of CPUs reported by EL3 larger than maximum supported by RMM,-3 - ``E_RMM_BOOT_CPU_ID_OUT_OF_RAGE``,Current CPU Id is higher or equal than the number of CPUs supported by RMM,-4 + ``E_RMM_BOOT_CPUS_OUT_OF_RANGE``,Number of CPUs reported by EL3 larger than maximum supported by RMM,-3 + ``E_RMM_BOOT_CPU_ID_OUT_OF_RANGE``,Current CPU Id is higher or equal than the number of CPUs supported by RMM,-4 ``E_RMM_BOOT_INVALID_SHARED_BUFFER``,Invalid pointer to shared memory area,-5 ``E_RMM_BOOT_MANIFEST_VERSION_NOT_SUPPORTED``,Version reported by the Boot Manifest not supported by RMM,-6 ``E_RMM_BOOT_MANIFEST_DATA_ERROR``,Error parsing core Boot Manifest,-7 diff --git a/atf-20231013-0ea67d76a/docs/components/romlib-design.rst b/atf-20240117-bacca82a8/docs/components/romlib-design.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/romlib-design.rst rename to atf-20240117-bacca82a8/docs/components/romlib-design.rst diff --git a/atf-20231013-0ea67d76a/docs/components/sdei.rst b/atf-20240117-bacca82a8/docs/components/sdei.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/sdei.rst rename to atf-20240117-bacca82a8/docs/components/sdei.rst diff --git a/atf-20231013-0ea67d76a/docs/components/secure-partition-manager-mm.rst b/atf-20240117-bacca82a8/docs/components/secure-partition-manager-mm.rst similarity index 98% rename from atf-20231013-0ea67d76a/docs/components/secure-partition-manager-mm.rst rename to atf-20240117-bacca82a8/docs/components/secure-partition-manager-mm.rst index 4cdb96c10..d9b2b1b7c 100644 --- a/atf-20231013-0ea67d76a/docs/components/secure-partition-manager-mm.rst +++ b/atf-20240117-bacca82a8/docs/components/secure-partition-manager-mm.rst @@ -4,17 +4,10 @@ Secure Partition Manager (MM) Foreword ======== -Two implementations of a Secure Partition Manager co-exist in the TF-A codebase: - -- SPM based on the FF-A specification (:ref:`Secure Partition Manager`). -- SPM based on the MM interface. - -Both implementations differ in their architectures and only one can be selected -at build time. - -This document describes the latter implementation where the Secure Partition Manager -resides at EL3 and management services run from isolated Secure Partitions at S-EL0. -The communication protocol is established through the Management Mode (MM) interface. +This document describes the implementation where the Secure Partition Manager +resides at EL3 and management services run from isolated Secure Partitions at +S-EL0. The communication protocol is established through the Management Mode +(MM) interface. Background ========== diff --git a/atf-20231013-0ea67d76a/docs/components/secure-partition-manager.rst b/atf-20240117-bacca82a8/docs/components/secure-partition-manager.rst similarity index 99% rename from atf-20231013-0ea67d76a/docs/components/secure-partition-manager.rst rename to atf-20240117-bacca82a8/docs/components/secure-partition-manager.rst index d4f0b0081..5d3adec82 100644 --- a/atf-20231013-0ea67d76a/docs/components/secure-partition-manager.rst +++ b/atf-20240117-bacca82a8/docs/components/secure-partition-manager.rst @@ -152,6 +152,8 @@ SPMC located at S-EL1, S-EL2 or EL3: exception level is set to S-EL1. ``SPMD_SPM_AT_SEL2`` is enabled. The context save/restore routine and exhaustive list of registers is visible at `[4]`_. +- **SPMC_AT_EL3_SEL0_SP**: this option enables the support to load SEL0 SP + when SPMC at EL3 support is enabled. - **SP_LAYOUT_FILE**: this option specifies a text description file providing paths to SP binary images and manifests in DTS format (see `Describing secure partitions`_). It @@ -257,6 +259,22 @@ Sample TF-A build command line when the SPMC is located at EL3: PLAT=fvp \ all fip +Sample TF-A build command line when the SPMC is located at EL3 and SEL0 SP is +enabled: + +.. code:: shell + + make \ + CROSS_COMPILE=aarch64-none-elf- \ + SPD=spmd \ + SPMD_SPM_AT_SEL2=0 \ + SPMC_AT_EL3=1 \ + SPMC_AT_EL3_SEL0_SP=1 \ + BL32= \ + BL33= \ + PLAT=fvp \ + all fip + FVP model invocation ==================== diff --git a/atf-20231013-0ea67d76a/docs/components/spd/index.rst b/atf-20240117-bacca82a8/docs/components/spd/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/spd/index.rst rename to atf-20240117-bacca82a8/docs/components/spd/index.rst diff --git a/atf-20231013-0ea67d76a/docs/components/spd/optee-dispatcher.rst b/atf-20240117-bacca82a8/docs/components/spd/optee-dispatcher.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/spd/optee-dispatcher.rst rename to atf-20240117-bacca82a8/docs/components/spd/optee-dispatcher.rst diff --git a/atf-20231013-0ea67d76a/docs/components/spd/pnc-dispatcher.rst b/atf-20240117-bacca82a8/docs/components/spd/pnc-dispatcher.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/spd/pnc-dispatcher.rst rename to atf-20240117-bacca82a8/docs/components/spd/pnc-dispatcher.rst diff --git a/atf-20231013-0ea67d76a/docs/components/spd/tlk-dispatcher.rst b/atf-20240117-bacca82a8/docs/components/spd/tlk-dispatcher.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/spd/tlk-dispatcher.rst rename to atf-20240117-bacca82a8/docs/components/spd/tlk-dispatcher.rst diff --git a/atf-20231013-0ea67d76a/docs/components/spd/trusty-dispatcher.rst b/atf-20240117-bacca82a8/docs/components/spd/trusty-dispatcher.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/spd/trusty-dispatcher.rst rename to atf-20240117-bacca82a8/docs/components/spd/trusty-dispatcher.rst diff --git a/atf-20231013-0ea67d76a/docs/components/xlat-tables-lib-v2-design.rst b/atf-20240117-bacca82a8/docs/components/xlat-tables-lib-v2-design.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/components/xlat-tables-lib-v2-design.rst rename to atf-20240117-bacca82a8/docs/components/xlat-tables-lib-v2-design.rst diff --git a/atf-20231013-0ea67d76a/docs/conf.py b/atf-20240117-bacca82a8/docs/conf.py similarity index 98% rename from atf-20231013-0ea67d76a/docs/conf.py rename to atf-20240117-bacca82a8/docs/conf.py index 9e7a5f8c9..d4e542391 100644 --- a/atf-20231013-0ea67d76a/docs/conf.py +++ b/atf-20240117-bacca82a8/docs/conf.py @@ -14,8 +14,8 @@ project = "Trusted Firmware-A" author = "Trusted Firmware-A contributors" -version = "2.9.0" -release = "2.9.0" +version = "2.10.0" +release = "2.10.0" # -- General configuration --------------------------------------------------- diff --git a/atf-20231013-0ea67d76a/docs/design/alt-boot-flows.rst b/atf-20240117-bacca82a8/docs/design/alt-boot-flows.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/alt-boot-flows.rst rename to atf-20240117-bacca82a8/docs/design/alt-boot-flows.rst diff --git a/atf-20231013-0ea67d76a/docs/design/auth-framework.rst b/atf-20240117-bacca82a8/docs/design/auth-framework.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/auth-framework.rst rename to atf-20240117-bacca82a8/docs/design/auth-framework.rst index 597f955ec..281f35fe8 100644 --- a/atf-20231013-0ea67d76a/docs/design/auth-framework.rst +++ b/atf-20240117-bacca82a8/docs/design/auth-framework.rst @@ -254,8 +254,8 @@ These functions are registered in the CM using the macro: REGISTER_CRYPTO_LIB(_name, _init, _verify_signature, - _calc_hash, _verify_hash, + _calc_hash, _auth_decrypt, _convert_pk); diff --git a/atf-20231013-0ea67d76a/docs/design/cpu-specific-build-macros.rst b/atf-20240117-bacca82a8/docs/design/cpu-specific-build-macros.rst similarity index 92% rename from atf-20231013-0ea67d76a/docs/design/cpu-specific-build-macros.rst rename to atf-20240117-bacca82a8/docs/design/cpu-specific-build-macros.rst index ad05a505a..905b0161f 100644 --- a/atf-20231013-0ea67d76a/docs/design/cpu-specific-build-macros.rst +++ b/atf-20240117-bacca82a8/docs/design/cpu-specific-build-macros.rst @@ -335,26 +335,26 @@ For Cortex-A78, the following errata build flags are defined : CPU. This needs to be enabled for revisions r0p0, r1p0, r1p1 and r1p2 and it is still open. -For Cortex-A78 AE, the following errata build flags are defined : +For Cortex-A78AE, the following errata build flags are defined : - ``ERRATA_A78_AE_1941500`` : This applies errata 1941500 workaround to - Cortex-A78 AE CPU. This needs to be enabled for revisions r0p0 and r0p1. + Cortex-A78AE CPU. This needs to be enabled for revisions r0p0 and r0p1. This erratum is still open. - ``ERRATA_A78_AE_1951502`` : This applies errata 1951502 workaround to - Cortex-A78 AE CPU. This needs to be enabled for revisions r0p0 and r0p1. This + Cortex-A78AE CPU. This needs to be enabled for revisions r0p0 and r0p1. This erratum is still open. - ``ERRATA_A78_AE_2376748`` : This applies errata 2376748 workaround to - Cortex-A78 AE CPU. This needs to be enabled for revisions r0p0 and r0p1. This - erratum is still open. + Cortex-A78AE CPU. This needs to be enabled for revisions r0p0, r0p1 and r0p2. + This erratum is still open. - ``ERRATA_A78_AE_2395408`` : This applies errata 2395408 workaround to - Cortex-A78 AE CPU. This needs to be enabled for revisions r0p0 and r0p1. This + Cortex-A78AE CPU. This needs to be enabled for revisions r0p0 and r0p1. This erratum is still open. - ``ERRATA_A78_AE_2712574`` : This applies erratum 2712574 workaround to - Cortex-A78 AE CPU. This erratum affects system configurations that do not use + Cortex-A78AE CPU. This erratum affects system configurations that do not use an ARM interconnect IP. This needs to be enabled for revisions r0p0, r0p1 and r0p2. This erratum is still open. @@ -389,6 +389,10 @@ For Cortex-A78C, the following errata build flags are defined : an ARM interconnect IP. This needs to be enabled for revisions r0p1 and r0p2 and is still open. +- ``ERRATA_A78C_2743232`` : This applies erratum 2743232 workaround to + Cortex-A78C CPU. This needs to be enabled for revisions r0p1 and r0p2. + This erratum is still open. + - ``ERRATA_A78C_2772121`` : This applies errata 2772121 workaround to Cortex-A78C CPU. This needs to be enabled for revisions r0p0, r0p1 and r0p2. This erratum is still open. @@ -498,7 +502,12 @@ For Neoverse V1, the following errata build flags are defined : revision. It is still open. - ``ERRATA_V1_2294912``: This applies errata 2294912 workaround to Neoverse-V1 - CPU. This needs to be enabled for revisions r0p0, r1p0, and r1p1 of the CPU. + CPU. This needs to be enabled for revisions r0p0, r1p0, and r1p1 and r1p2 of + the CPU. + +- ``ERRATA_V1_2348377``: This applies errata 2348377 workaroud to Neoverse-V1 + CPU. This needs to be enabled for revisions r0p0, r1p0 and r1p1 of the CPU. + It has been fixed in r1p2. - ``ERRATA_V1_2372203``: This applies errata 2372203 workaround to Neoverse-V1 CPU. This needs to be enabled for revisions r0p0, r1p0 and r1p1 of the CPU. @@ -527,6 +536,14 @@ For Neoverse V2, the following errata build flags are defined : CPU. This needs to be enabled for revisions r0p0, r0p1 and r0p2. It is still open. +- ``ERRATA_V2_2618597``: This applies errata 2618597 workaround to Neoverse-V2 + CPU. This needs to be enabled for revisions r0p0 and r0p1. It is fixed in + r0p2. + +- ``ERRATA_V2_2662553``: This applies errata 2662553 workaround to Neoverse-V2 + CPU. This needs to be enabled for revisions r0p0 and r0p1. It is fixed in + r0p2. + - ``ERRATA_V2_2719103``: This applies errata 2719103 workaround to Neoverse-V2 CPU, this affects system configurations that do not use and ARM interconnect IP. This needs to be enabled for revisions r0p0 and r0p1. It has been fixed @@ -572,7 +589,7 @@ For Cortex-A710, the following errata build flags are defined : - ``ERRATA_A710_2058056``: This applies errata 2058056 workaround to Cortex-A710 CPU. This needs to be enabled for revisions r0p0, r1p0 and r2p0 - of the CPU and is still open. + and r2p1 of the CPU and is still open. - ``ERRATA_A710_2267065``: This applies errata 2267065 workaround to Cortex-A710 CPU. This needs to be enabled for revisions r0p0, r1p0 and r2p0 @@ -611,10 +628,18 @@ For Cortex-A710, the following errata build flags are defined : interconnect IP. This needs to be enabled for r0p0, r1p0, r2p0 and r2p1 and is still open. +- ``ERRATA_A710_2742423``: This applies errata 2742423 workaround to + Cortex-A710 CPU. This needs to be enabled for revisions r0p0, r1p0, r2p0 and + r2p1 of the CPU and is still open. + - ``ERRATA_A710_2768515``: This applies errata 2768515 workaround to Cortex-A710 CPU. This needs to be enabled for revisions r0p0, r1p0, r2p0 and r2p1 of the CPU and is still open. +- ``ERRATA_A710_2778471``: This applies errata 2778471 workaround to Cortex-A710 + CPU. This needs to be enabled for revisions r0p0, r1p0, r2p0 and r2p1 of the + CPU and is still open. + For Neoverse N2, the following errata build flags are defined : - ``ERRATA_N2_2002655``: This applies errata 2002655 workaround to Neoverse-N2 @@ -654,6 +679,14 @@ For Neoverse N2, the following errata build flags are defined : CPU. This needs to be enabled for revision r0p0 of the CPU, it is fixed in r0p1. +- ``ERRATA_N2_2340933``: This applies errata 2340933 workaround to Neoverse-N2 + CPU. This needs to be enabled for revision r0p0 of the CPU, it is fixed in + r0p1. + +- ``ERRATA_N2_2346952``: This applies errata 2346952 workaround to Neoverse-N2 + CPU. This needs to be enabled for revisions r0p0, r0p1 and r0p2 of the CPU, + it is fixed in r0p3. + - ``ERRATA_N2_2376738``: This applies errata 2376738 workaround to Neoverse-N2 CPU. This needs to be enabled for revision r0p0, r0p1, r0p2, r0p3 and is still open. @@ -685,7 +718,7 @@ For Cortex-X2, the following errata build flags are defined : it is still open. - ``ERRATA_X2_2058056``: This applies errata 2058056 workaround to Cortex-X2 - CPU. This needs to be enabled for revisions r0p0, r1p0, and r2p0 of the CPU, + CPU. This needs to be enabled for revisions r0p0, r1p0, r2p0 and r2p1 of the CPU, it is still open. - ``ERRATA_X2_2083908``: This applies errata 2083908 workaround to Cortex-X2 @@ -720,10 +753,18 @@ For Cortex-X2, the following errata build flags are defined : This needs to be enabled for revisions r0p0, r1p0, r2p0 and r2p1 and is still open. +- ``ERRATA_X2_2742423``: This applies errata 2742423 workaround to Cortex-X2 + CPU. This needs to be enabled for revisions r0p0, r1p0, r2p0 and r2p1 of the + CPU and is still open. + - ``ERRATA_X2_2768515``: This applies errata 2768515 workaround to Cortex-X2 CPU. This needs to be enabled for revisions r0p0, r1p0, r2p0 and r2p1 of the CPU and is still open. +- ``ERRATA_X2_2778471``: This applies errata 2778471 workaround to Cortex-X2 + CPU. This needs to be enabled for revisions r0p0, r1p0, r2p0 and r2p1 of the + CPU and it is still open. + For Cortex-X3, the following errata build flags are defined : - ``ERRATA_X3_2070301``: This applies errata 2070301 workaround to the Cortex-X3 @@ -742,6 +783,14 @@ For Cortex-X3, the following errata build flags are defined : Cortex-X3 CPU. This needs to be enabled only for revisions r0p0, r1p0 and r1p1. It is fixed in r1p2. +- ``ERRATA_X3_2743088``: This applies errata 2743088 workaround to Cortex-X3 + CPU. This needs to be enabled only for revisions r0p0, r1p0 and r1p1. It is + fixed in r1p2. + +- ``ERRATA_X3_2779509``: This applies errata 2779509 workaround to Cortex-X3 + CPU. This needs to be enabled only for revisions r0p0, r1p0 and r1p1 of the + CPU. It is fixed in r1p2. + For Cortex-A510, the following errata build flags are defined : - ``ERRATA_A510_1922240``: This applies errata 1922240 workaround to @@ -761,6 +810,11 @@ For Cortex-A510, the following errata build flags are defined : in r0p3. The issue is also present in r0p0 and r0p1 but there is no workaround for those revisions. +- ``ERRATA_A510_2080326``: This applies errata 2080326 workaround to + Cortex-A510 CPU. This needs to be enabled only for revision r0p2 and is + fixed in r0p3. This issue is also present in r0p0 and r0p1 but there is no + workaround for those revisions. + - ``ERRATA_A510_2250311``: This applies errata 2250311 workaround to Cortex-A510 CPU. This needs to be enabled for revisions r0p0, r0p1, r0p2, r0p3 and r1p0, it is fixed in r1p1. This workaround disables MPMM even if @@ -790,6 +844,16 @@ For Cortex-A510, the following errata build flags are defined : Cortex-A510 CPU. This needs to be applied to revision r0p0, r0p1, r0p2, r0p3, r1p0, r1p1 and r1p2. It is fixed in r1p3. +For Cortex-A520, the following errata build flags are defined : + +- ``ERRATA_A520_2630792``: This applies errata 2630792 workaround to + Cortex-A520 CPU. This needs to applied for revisions r0p0, r0p1 of the + CPU and is still open. + +- ``ERRATA_A520_2858100``: This applies errata 2858100 workaround to + Cortex-A520 CPU. This needs to be enabled for revisions r0p0 and r0p1. + It is still open. + For Cortex-A715, the following errata build flags are defined : - ``ERRATA_A715_2701951``: This applies erratum 2701951 workaround to Cortex-A715 diff --git a/atf-20231013-0ea67d76a/docs/design/firmware-design.rst b/atf-20240117-bacca82a8/docs/design/firmware-design.rst similarity index 97% rename from atf-20231013-0ea67d76a/docs/design/firmware-design.rst rename to atf-20240117-bacca82a8/docs/design/firmware-design.rst index 879ddda41..3fce39395 100644 --- a/atf-20231013-0ea67d76a/docs/design/firmware-design.rst +++ b/atf-20240117-bacca82a8/docs/design/firmware-design.rst @@ -130,6 +130,12 @@ convention: - For other BL3x images, if the firmware configuration file is loaded by BL2, then its address is passed in ``arg0`` and if HW_CONFIG is loaded then its address is passed in ``arg1``. + - In case SPMC_AT_EL3 is enabled, populate the BL32 image base, size and max + limit in the entry point information, since there is no platform function + to retrieve these in generic code. We choose ``arg2``, ``arg3`` and + ``arg4`` since the generic code uses ``arg1`` for stashing the SP manifest + size. The SPMC setup uses these arguments to update SP manifest with + actual SP's base address and it size. - In case of the Arm FVP platform, FW_CONFIG address passed in ``arg1`` to BL31/SP_MIN, and the SOC_FW_CONFIG and HW_CONFIG details are retrieved from FW_CONFIG device tree. @@ -1118,6 +1124,65 @@ returning through EL3 and running the non-trusted firmware (BL33): ``bl31_main()`` will set up the return to the normal world firmware BL33 and continue the boot process in the normal world. +Exception handling in BL31 +-------------------------- + +When exception occurs, PE must execute handler corresponding to exception. The +location in memory where the handler is stored is called the exception vector. +For ARM architecture, exception vectors are stored in a table, called the exception +vector table. + +Each EL (except EL0) has its own vector table, VBAR_ELn register stores the base +of vector table. Refer to `AArch64 exception vector table`_ + +Current EL with SP_EL0 +~~~~~~~~~~~~~~~~~~~~~~ + +- Sync exception : Not expected except for BRK instruction, its debugging tool which + a programmer may place at specific points in a program, to check the state of + processor flags at these points in the code. + +- IRQ/FIQ : Unexpected exception, panic + +- SError : "plat_handle_el3_ea", defaults to panic + +Current EL with SP_ELx +~~~~~~~~~~~~~~~~~~~~~~ + +- Sync exception : Unexpected exception, panic + +- IRQ/FIQ : Unexpected exception, panic + +- SError : "plat_handle_el3_ea" Except for special handling of lower EL's SError exception + which gets triggered in EL3 when PSTATE.A is unmasked. Its only applicable when lower + EL's EA is routed to EL3 (FFH_SUPPORT=1). + +Lower EL Exceptions +~~~~~~~~~~~~~~~~~~~ + +Applies to all the exceptions in both AArch64/AArch32 mode of lower EL. + +Before handling any lower EL exception, we synchronize the errors at EL3 entry to ensure +that any errors pertaining to lower EL is isolated/identified. If we continue without +identifying these errors early on then these errors will trigger in EL3 (as SError from +current EL) any time after PSTATE.A is unmasked. This is wrong because the error originated +in lower EL but exception happened in EL3. + +To solve this problem, synchronize the errors at EL3 entry and check for any pending +errors (async EA). If there is no pending error then continue with original exception. +If there is a pending error then, handle them based on routing model of EA's. Refer to +:ref:`Reliability, Availability, and Serviceability (RAS) Extensions` for details about +routing models. + +- KFH : Reflect it back to lower EL using **reflect_pending_async_ea_to_lower_el()** + +- FFH : Handle the synchronized error first using **handle_pending_async_ea()** after + that continue with original exception. It is the only scenario where EL3 is capable + of doing nested exception handling. + +After synchronizing and handling lower EL SErrors, unmask EA (PSTATE.A) to ensure +that any further EA's caused by EL3 are caught. + Crash Reporting in BL31 ----------------------- @@ -2803,5 +2868,6 @@ kernel at boot time. These can be found in the ``fdts`` directory. .. _SMC Calling Convention: https://developer.arm.com/docs/den0028/latest .. _Trusted Board Boot Requirements CLIENT (TBBR-CLIENT) Armv8-A (ARM DEN0006D): https://developer.arm.com/docs/den0006/latest/trusted-board-boot-requirements-client-tbbr-client-armv8-a .. _Arm Confidential Compute Architecture (Arm CCA): https://www.arm.com/why-arm/architecture/security-features/arm-confidential-compute-architecture +.. _AArch64 exception vector table: https://developer.arm.com/documentation/100933/0100/AArch64-exception-vector-table .. |Image 1| image:: ../resources/diagrams/rt-svc-descs-layout.png diff --git a/atf-20231013-0ea67d76a/docs/design/index.rst b/atf-20240117-bacca82a8/docs/design/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/index.rst rename to atf-20240117-bacca82a8/docs/design/index.rst diff --git a/atf-20231013-0ea67d76a/docs/design/interrupt-framework-design.rst b/atf-20240117-bacca82a8/docs/design/interrupt-framework-design.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/interrupt-framework-design.rst rename to atf-20240117-bacca82a8/docs/design/interrupt-framework-design.rst diff --git a/atf-20231013-0ea67d76a/docs/design/psci-pd-tree.rst b/atf-20240117-bacca82a8/docs/design/psci-pd-tree.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/psci-pd-tree.rst rename to atf-20240117-bacca82a8/docs/design/psci-pd-tree.rst diff --git a/atf-20231013-0ea67d76a/docs/design/reset-design.rst b/atf-20240117-bacca82a8/docs/design/reset-design.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/reset-design.rst rename to atf-20240117-bacca82a8/docs/design/reset-design.rst diff --git a/atf-20231013-0ea67d76a/docs/design/trusted-board-boot-build.rst b/atf-20240117-bacca82a8/docs/design/trusted-board-boot-build.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/trusted-board-boot-build.rst rename to atf-20240117-bacca82a8/docs/design/trusted-board-boot-build.rst diff --git a/atf-20231013-0ea67d76a/docs/design/trusted-board-boot.rst b/atf-20240117-bacca82a8/docs/design/trusted-board-boot.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design/trusted-board-boot.rst rename to atf-20240117-bacca82a8/docs/design/trusted-board-boot.rst diff --git a/atf-20231013-0ea67d76a/docs/design_documents/cmake_framework.rst b/atf-20240117-bacca82a8/docs/design_documents/cmake_framework.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design_documents/cmake_framework.rst rename to atf-20240117-bacca82a8/docs/design_documents/cmake_framework.rst diff --git a/atf-20231013-0ea67d76a/docs/design_documents/context_mgmt_rework.rst b/atf-20240117-bacca82a8/docs/design_documents/context_mgmt_rework.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design_documents/context_mgmt_rework.rst rename to atf-20240117-bacca82a8/docs/design_documents/context_mgmt_rework.rst diff --git a/atf-20231013-0ea67d76a/docs/design_documents/drtm_poc.rst b/atf-20240117-bacca82a8/docs/design_documents/drtm_poc.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design_documents/drtm_poc.rst rename to atf-20240117-bacca82a8/docs/design_documents/drtm_poc.rst diff --git a/atf-20231013-0ea67d76a/docs/design_documents/index.rst b/atf-20240117-bacca82a8/docs/design_documents/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design_documents/index.rst rename to atf-20240117-bacca82a8/docs/design_documents/index.rst diff --git a/atf-20231013-0ea67d76a/docs/design_documents/measured_boot.rst b/atf-20240117-bacca82a8/docs/design_documents/measured_boot.rst similarity index 99% rename from atf-20231013-0ea67d76a/docs/design_documents/measured_boot.rst rename to atf-20240117-bacca82a8/docs/design_documents/measured_boot.rst index c4e521355..8a2ab2df8 100644 --- a/atf-20231013-0ea67d76a/docs/design_documents/measured_boot.rst +++ b/atf-20240117-bacca82a8/docs/design_documents/measured_boot.rst @@ -222,7 +222,7 @@ Responsibilities of these platform interfaces are - - Public key data size is passed as the third argument to this function. - This function must return 0 on success, a signed integer error code otherwise. - - In FVP platform, this function is used to calculate the hash of the given + - In TC2 platform, this function is used to calculate the hash of the given key and forward this hash to RSS alongside the measurement of the image which the key signs. diff --git a/atf-20231013-0ea67d76a/docs/design_documents/measured_boot_poc.rst b/atf-20240117-bacca82a8/docs/design_documents/measured_boot_poc.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design_documents/measured_boot_poc.rst rename to atf-20240117-bacca82a8/docs/design_documents/measured_boot_poc.rst diff --git a/atf-20231013-0ea67d76a/docs/design_documents/psci_osi_mode.rst b/atf-20240117-bacca82a8/docs/design_documents/psci_osi_mode.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design_documents/psci_osi_mode.rst rename to atf-20240117-bacca82a8/docs/design_documents/psci_osi_mode.rst diff --git a/atf-20231013-0ea67d76a/docs/design_documents/rss.rst b/atf-20240117-bacca82a8/docs/design_documents/rss.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/design_documents/rss.rst rename to atf-20240117-bacca82a8/docs/design_documents/rss.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/build-internals.rst b/atf-20240117-bacca82a8/docs/getting_started/build-internals.rst similarity index 60% rename from atf-20231013-0ea67d76a/docs/getting_started/build-internals.rst rename to atf-20240117-bacca82a8/docs/getting_started/build-internals.rst index a015d7167..390c3671d 100644 --- a/atf-20231013-0ea67d76a/docs/getting_started/build-internals.rst +++ b/atf-20240117-bacca82a8/docs/getting_started/build-internals.rst @@ -12,3 +12,10 @@ depends on certain options to be enabled or disabled. interest when Armv8.4-SecEL2 or RME extension is implemented. Default is 0 (disabled). This option will be set to 1 (enabled) when ``SPD=spmd`` and ``SPMD_SPM_AT_SEL2`` is set or when ``ENABLE_RME`` is set to 1 (enabled). + +- ``FFH_SUPPORT``: This boolean option provides support to enable Firmware First + handling (FFH) of External aborts and SError interrupts originating from lower + ELs which gets trapped in EL3. This option will be set to 1 (enabled) if + ``HANDLE_EA_EL3_FIRST_NS`` is set. Currently only NS world routes EA to EL3 but + in future when Secure/Realm wants to use FFH then they can introduce new macros + which will enable this option implicitly. diff --git a/atf-20231013-0ea67d76a/docs/getting_started/build-options.rst b/atf-20240117-bacca82a8/docs/getting_started/build-options.rst similarity index 94% rename from atf-20231013-0ea67d76a/docs/getting_started/build-options.rst rename to atf-20240117-bacca82a8/docs/getting_started/build-options.rst index c045a6aa2..5b039672b 100644 --- a/atf-20231013-0ea67d76a/docs/getting_started/build-options.rst +++ b/atf-20240117-bacca82a8/docs/getting_started/build-options.rst @@ -180,6 +180,11 @@ Common build options registers to be included when saving and restoring the CPU context. Default is 0. +- ``CTX_INCLUDE_MPAM_REGS``: Boolean option that, when set to 1, will cause the + Memory System Resource Partitioning and Monitoring (MPAM) + registers to be included when saving and restoring the CPU context. + Default is '0'. + - ``CTX_INCLUDE_MTE_REGS``: Numeric value to include Memory Tagging Extension registers in cpu context. This must be enabled, if the platform wants to use this feature in the Secure world and MTE is enabled at ELX. This flag can @@ -397,7 +402,7 @@ Common build options support in GCC for TF-A. This option is currently only supported for AArch64. Default is 0. -- ``ENABLE_MPAM_FOR_LOWER_ELS``: Numeric value to enable lower ELs to use MPAM +- ``ENABLE_FEAT_MPAM``: Numeric value to enable lower ELs to use MPAM feature. MPAM is an optional Armv8.4 extension that enables various memory system components and resources to define partitions; software running at various ELs can assign themselves to desired partition to control their @@ -408,7 +413,9 @@ Common build options access their own MPAM registers without trapping into EL3. This option doesn't make use of partitioning in EL3, however. Platform initialisation code should configure and use partitions in EL3 as required. This option - defaults to ``0``. + defaults to ``2`` since MPAM is enabled by default for NS world only. + The flag is automatically disabled when the target + architecture is AArch32. - ``ENABLE_MPMM``: Boolean option to enable support for the Maximum Power Mitigation Mechanism supported by certain Arm cores, which allows the SoC @@ -434,40 +441,12 @@ Common build options be enabled. If ``ENABLE_PMF`` is set, the residency statistics are tracked in software. -- ``ENABLE_RME``: Numeric value to enable support for the ARMv9 Realm - Management Extension. This flag can take the values 0 to 2, to align with - the ``FEATURE_DETECTION`` mechanism. Default value is 0. This is currently - an experimental feature. - - ``ENABLE_RUNTIME_INSTRUMENTATION``: Boolean option to enable runtime instrumentation which injects timestamp collection points into TF-A to allow runtime performance to be measured. Currently, only PSCI is instrumented. Enabling this option enables the ``ENABLE_PMF`` build option as well. Default is 0. -- ``ENABLE_SME_FOR_NS``: Numeric value to enable Scalable Matrix Extension - (SME), SVE, and FPU/SIMD for the non-secure world only. These features share - registers so are enabled together. Using this option without - ENABLE_SME_FOR_SWD=1 will cause SME, SVE, and FPU/SIMD instructions in secure - world to trap to EL3. Requires ``ENABLE_SVE_FOR_NS`` to be set as SME is a - superset of SVE. SME is an optional architectural feature for AArch64 - and TF-A support is experimental. At this time, this build option cannot be - used on systems that have SPD=spmd/SPM_MM and atempting to build with this - option will fail. This flag can take the values 0 to 2, to align with the - ``FEATURE_DETECTION`` mechanism. Default is 0. - -- ``ENABLE_SME2_FOR_NS``: Numeric value to enable Scalable Matrix Extension - version 2 (SME2) for the non-secure world only. SME2 is an optional - architectural feature for AArch64 and TF-A support is experimental. - This should be set along with ENABLE_SME_FOR_NS=1, if not, the default SME - accesses will still be trapped. This flag can take the values 0 to 2, to - align with the ``FEATURE_DETECTION`` mechanism. Default is 0. - -- ``ENABLE_SME_FOR_SWD``: Boolean option to enable the Scalable Matrix - Extension for secure world. Used along with SVE and FPU/SIMD. - ENABLE_SME_FOR_NS and ENABLE_SVE_FOR_SWD must also be set to use this. - This is experimental. Default is 0. - - ``ENABLE_SPE_FOR_NS`` : Numeric value to enable Statistical Profiling extensions. This is an optional architectural feature for AArch64. This flag can take the values 0 to 2, to align with the ``FEATURE_DETECTION`` @@ -553,44 +532,6 @@ Common build options This feature is intended for testing purposes only, and is advisable to keep disabled for production images. -- ``FEATURE_DETECTION``: Boolean option to enable the architectural features - detection mechanism. It detects whether the Architectural features enabled - through feature specific build flags are supported by the PE or not by - validating them either at boot phase or at runtime based on the value - possessed by the feature flag (0 to 2) and report error messages at an early - stage. This flag will also enable errata ordering checking for ``DEBUG`` - builds. - - This prevents and benefits us from EL3 runtime exceptions during context save - and restore routines guarded by these build flags. Henceforth validating them - before their usage provides more control on the actions taken under them. - - The mechanism permits the build flags to take values 0, 1 or 2 and - evaluates them accordingly. - - Lets consider ``ENABLE_FEAT_HCX``, build flag for ``FEAT_HCX`` as an example: - - :: - - ENABLE_FEAT_HCX = 0: Feature disabled statically at compile time. - ENABLE_FEAT_HCX = 1: Feature Enabled and the flag is validated at boottime. - ENABLE_FEAT_HCX = 2: Feature Enabled and the flag is validated at runtime. - - In the above example, if the feature build flag, ``ENABLE_FEAT_HCX`` set to - 0, feature is disabled statically during compilation. If it is defined as 1, - feature is validated, wherein FEAT_HCX is detected at boot time. In case not - implemented by the PE, a hard panic is generated. Finally, if the flag is set - to 2, feature is validated at runtime. - - Note that the entire implementation is divided into two phases, wherein as - as part of phase-1 we are supporting the values 0,1. Value 2 is currently not - supported and is planned to be handled explicilty in phase-2 implementation. - - FEATURE_DETECTION macro is disabled by default, and is currently an - experimental procedure. Platforms can explicitly make use of this by - mechanism, by enabling it to validate whether they have set their build flags - properly at an early phase. - - ``FIP_NAME``: This is an optional build option which specifies the FIP filename for the ``fip`` target. Default is ``fip.bin``. @@ -690,19 +631,15 @@ Common build options +---------------------------+------------------------------------+ | KEY_ALG | Possible key sizes | +===========================+====================================+ - | rsa | 1024 , 2048 (default), 3072, 4096* | + | rsa | 1024 , 2048 (default), 3072, 4096 | +---------------------------+------------------------------------+ - | ecdsa | unavailable | + | ecdsa | 256 (default), 384 | +---------------------------+------------------------------------+ | ecdsa-brainpool-regular | unavailable | +---------------------------+------------------------------------+ | ecdsa-brainpool-twisted | unavailable | +---------------------------+------------------------------------+ - - * Only 2048 bits size is available with CryptoCell 712 SBROM release 1. - Only 3072 bits size is available with CryptoCell 712 SBROM release 2. - - ``HASH_ALG``: This build flag enables the user to select the secure hash algorithm. It accepts 3 values: ``sha256``, ``sha384`` and ``sha512``. The default value of this flag is ``sha256``. @@ -732,15 +669,6 @@ Common build options This option defaults to 0. -- ``DRTM_SUPPORT``: Boolean flag to enable support for Dynamic Root of Trust - for Measurement (DRTM). This feature has trust dependency on BL31 for taking - the measurements and recording them as per `PSA DRTM specification`_. For - platforms which use BL2 to load/authenticate BL31 ``TRUSTED_BOARD_BOOT`` can - be used and for the platforms which use ``RESET_TO_BL31`` platform owners - should have mechanism to authenticate BL31. This is an experimental feature. - - This option defaults to 0. - - ``MARCH_DIRECTIVE``: used to pass a -march option from the platform build options to the compiler. An example usage: @@ -748,6 +676,19 @@ Common build options MARCH_DIRECTIVE := -march=armv8.5-a +- ``HARDEN_SLS``: used to pass -mharden-sls=all from the TF-A build + options to the compiler currently supporting only of the options. + GCC documentation: + https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#index-mharden-sls + + An example usage: + + .. code:: make + + HARDEN_SLS := 1 + + This option defaults to 0. + - ``NON_TRUSTED_WORLD_KEY``: This option is used when ``GENERATE_COT=1``. It specifies a file that contains the Non-Trusted World private key in PEM format or a PKCS11 URI. If ``SAVE_KEYS=1``, only a file is accepted and it @@ -781,6 +722,11 @@ Common build options platform makefile named ``platform.mk``. For example, to build TF-A for the Arm Juno board, select PLAT=juno. +- ``PLATFORM_REPORT_CTX_MEM_USE``: Reports the context memory allocated for + each core as well as the global context. The data includes the memory used + by each world and each privileged exception level. This build option is + applicable only for ``ARCH=aarch64`` builds. The default value is 0. + - ``PRELOADED_BL33_BASE``: This option enables booting a preloaded BL33 image instead of the normal boot flow. When defined, it must specify the entry point address for the preloaded BL33 image. This option is incompatible with @@ -809,14 +755,12 @@ Common build options - ``PSCI_OS_INIT_MODE``: Boolean flag to enable support for optional PSCI OS-initiated mode. This option defaults to 0. -- ``ENABLE_FEAT_RAS``: Numeric value to enable Armv8.2 RAS features. RAS features +- ``ENABLE_FEAT_RAS``: Boolean flag to enable Armv8.2 RAS features. RAS features are an optional extension for pre-Armv8.2 CPUs, but are mandatory for Armv8.2 - or later CPUs. This flag can take the values 0 to 2, to align with the - ``FEATURE_DETECTION`` mechanism. - -- ``RAS_FFH_SUPPORT``: Support to enable Firmware first handling of RAS errors - originating from NS world. When ``RAS_FFH_SUPPORT`` is set to ``1``, - ``HANDLE_EA_EL3_FIRST_NS`` and ``ENABLE_FEAT_RAS`` must also be set to ``1``. + or later CPUs. This flag can take the values 0 or 1. The default value is 0. + NOTE: This flag enables use of IESB capability to reduce entry latency into + EL3 even when RAS error handling is not performed on the platform. Hence this + flag is recommended to be turned on Armv8.2 and later CPUs. - ``RESET_TO_BL31``: Enable BL31 entrypoint as the CPU reset vector instead of the BL1 entrypoint. It can take the value 0 (CPU reset to BL1 @@ -898,7 +842,11 @@ Common build options Dispatcher option (``SPD=spmd``). When enabled (1) it indicates the SPMC component runs at the EL3 exception level. The default value is ``0`` ( disabled). This configuration supports pre-Armv8.4 platforms (aka not - implementing the ``FEAT_SEL2`` extension). This is an experimental feature. + implementing the ``FEAT_SEL2`` extension). + +- ``SPMC_AT_EL3_SEL0_SP`` : Boolean option to enable SEL0 SP load support when + ``SPMC_AT_EL3`` is enabled. The default value if ``0`` (disabled). This + option cannot be enabled (``1``) when (``SPMC_AT_EL3``) is disabled. - ``SPMC_OPTEE`` : This boolean option is used jointly with the SPM Dispatcher option (``SPD=spmd``) and with ``SPMD_SPM_AT_SEL2=0`` to @@ -914,12 +862,6 @@ Common build options support pre-Armv8.4 platforms (aka not implementing the ``FEAT_SEL2`` extension). -- ``ENABLE_SPMD_LP`` : This boolean option is used jointly with the SPM - Dispatcher option (``SPD=spmd``). When enabled (1) it indicates support - for logical partitions in EL3, managed by the SPMD as defined in the FF-A - 1.2 specification. This flag is disabled by default. This flag must not be - used if ``SPMC_AT_EL3`` is enabled. This is an experimental feature. - - ``SPM_MM`` : Boolean option to enable the Management Mode (MM)-based Secure Partition Manager (SPM) implementation. The default value is ``0`` (disabled). This option cannot be enabled (``1``) when SPM Dispatcher is @@ -945,11 +887,6 @@ Common build options hardware will limit the effective VL to the maximum physically supported VL. -- ``TRANSFER_LIST``: Setting this to ``1`` enables support for Firmware - Handoff using Transfer List defined in `Firmware Handoff specification`_. - This defaults to ``0``. Please note that this is an experimental feature - based on Firmware Handoff specification v0.9. - - ``TRNG_SUPPORT``: Setting this to ``1`` enables support for True Random Number Generator Interface to BL31 image. This defaults to ``0``. @@ -1008,10 +945,6 @@ Common build options (Coherent memory region is included) or 0 (Coherent memory region is excluded). Default is 1. -- ``USE_DEBUGFS``: When set to 1 this option activates an EXPERIMENTAL feature - exposing a virtual filesystem interface through BL31 as a SiP SMC function. - Default is 0. - - ``ARM_IO_IN_DTB``: This flag determines whether to use IO based on the firmware configuration framework. This will move the io_policies into a configuration device tree, instead of static structure in the code base. @@ -1167,11 +1100,6 @@ Common build options if FEAT_TRF is implemented. This flag can take the values 0 to 2, to align with the ``FEATURE_DETECTION`` mechanism. This flag is disabled by default. -- ``PLAT_RSS_NOT_SUPPORTED``: Boolean option to enable the usage of the PSA - APIs on platforms that doesn't support RSS (providing Arm CCA HES - functionalities). When enabled (``1``), a mocked version of the APIs are used. - The default value is 0. - - ``CONDITIONAL_CMO``: Boolean option to enable call to platform-defined routine ``plat_can_cmo`` which will return zero if cache management operations should be skipped and non-zero otherwise. By default, this option is disabled which @@ -1185,12 +1113,6 @@ Common build options errata mitigation for platforms with a non-arm interconnect using the errata ABI. By default its disabled (``0``). -- ``PSA_CRYPTO``: Boolean option for enabling MbedTLS PSA crypto APIs support. - The platform will use PSA compliant Crypto APIs during authentication and - image measurement process by enabling this option. It uses APIs defined as - per the `PSA Crypto API specification`_. This feature is only supported if - using MbedTLS 3.x version. By default it is disabled (``0``). - - ``ENABLE_CONSOLE_GETC``: Boolean option to enable `getc()` feature in console driver(s). By default it is disabled (``0``) because it constitutes an attack vector into TF-A by potentially allowing an attacker to inject arbitrary data. @@ -1287,8 +1209,118 @@ commands can be used: # Resume execution continue +.. _build_options_experimental: + +Experimental build options +--------------------------- + +Common build options +~~~~~~~~~~~~~~~~~~~~ + +- ``DRTM_SUPPORT``: Boolean flag to enable support for Dynamic Root of Trust + for Measurement (DRTM). This feature has trust dependency on BL31 for taking + the measurements and recording them as per `PSA DRTM specification`_. For + platforms which use BL2 to load/authenticate BL31 ``TRUSTED_BOARD_BOOT`` can + be used and for the platforms which use ``RESET_TO_BL31`` platform owners + should have mechanism to authenticate BL31. This option defaults to 0. + +- ``ENABLE_RME``: Numeric value to enable support for the ARMv9 Realm + Management Extension. This flag can take the values 0 to 2, to align with + the ``FEATURE_DETECTION`` mechanism. Default value is 0. + +- ``ENABLE_SME_FOR_NS``: Numeric value to enable Scalable Matrix Extension + (SME), SVE, and FPU/SIMD for the non-secure world only. These features share + registers so are enabled together. Using this option without + ENABLE_SME_FOR_SWD=1 will cause SME, SVE, and FPU/SIMD instructions in secure + world to trap to EL3. Requires ``ENABLE_SVE_FOR_NS`` to be set as SME is a + superset of SVE. SME is an optional architectural feature for AArch64. + At this time, this build option cannot be used on systems that have + SPD=spmd/SPM_MM and atempting to build with this option will fail. + This flag can take the values 0 to 2, to align with the ``FEATURE_DETECTION`` + mechanism. Default is 0. + +- ``ENABLE_SME2_FOR_NS``: Numeric value to enable Scalable Matrix Extension + version 2 (SME2) for the non-secure world only. SME2 is an optional + architectural feature for AArch64. + This should be set along with ENABLE_SME_FOR_NS=1, if not, the default SME + accesses will still be trapped. This flag can take the values 0 to 2, to + align with the ``FEATURE_DETECTION`` mechanism. Default is 0. + +- ``ENABLE_SME_FOR_SWD``: Boolean option to enable the Scalable Matrix + Extension for secure world. Used along with SVE and FPU/SIMD. + ENABLE_SME_FOR_NS and ENABLE_SVE_FOR_SWD must also be set to use this. + Default is 0. + +- ``ENABLE_SPMD_LP`` : This boolean option is used jointly with the SPM + Dispatcher option (``SPD=spmd``). When enabled (1) it indicates support + for logical partitions in EL3, managed by the SPMD as defined in the + FF-A v1.2 specification. This flag is disabled by default. This flag + must not be used if ``SPMC_AT_EL3`` is enabled. + +- ``FEATURE_DETECTION``: Boolean option to enable the architectural features + detection mechanism. It detects whether the Architectural features enabled + through feature specific build flags are supported by the PE or not by + validating them either at boot phase or at runtime based on the value + possessed by the feature flag (0 to 2) and report error messages at an early + stage. This flag will also enable errata ordering checking for ``DEBUG`` + builds. + + This prevents and benefits us from EL3 runtime exceptions during context save + and restore routines guarded by these build flags. Henceforth validating them + before their usage provides more control on the actions taken under them. + + The mechanism permits the build flags to take values 0, 1 or 2 and + evaluates them accordingly. + + Lets consider ``ENABLE_FEAT_HCX``, build flag for ``FEAT_HCX`` as an example: + + :: + + ENABLE_FEAT_HCX = 0: Feature disabled statically at compile time. + ENABLE_FEAT_HCX = 1: Feature Enabled and the flag is validated at boottime. + ENABLE_FEAT_HCX = 2: Feature Enabled and the flag is validated at runtime. + + In the above example, if the feature build flag, ``ENABLE_FEAT_HCX`` set to + 0, feature is disabled statically during compilation. If it is defined as 1, + feature is validated, wherein FEAT_HCX is detected at boot time. In case not + implemented by the PE, a hard panic is generated. Finally, if the flag is set + to 2, feature is validated at runtime. + + Note that the entire implementation is divided into two phases, wherein as + as part of phase-1 we are supporting the values 0,1. Value 2 is currently not + supported and is planned to be handled explicilty in phase-2 implementation. + + ``FEATURE_DETECTION`` macro is disabled by default. Platforms can explicitly + make use of this by mechanism, by enabling it to validate whether they have + set their build flags properly at an early phase. + +- ``PSA_CRYPTO``: Boolean option for enabling MbedTLS PSA crypto APIs support. + The platform will use PSA compliant Crypto APIs during authentication and + image measurement process by enabling this option. It uses APIs defined as + per the `PSA Crypto API specification`_. This feature is only supported if + using MbedTLS 3.x version. It is disabled (``0``) by default. + +- ``TRANSFER_LIST``: Setting this to ``1`` enables support for Firmware + Handoff using Transfer List defined in `Firmware Handoff specification`_. + This defaults to ``0``. Current implementation follows the Firmware Handoff + specification v0.9. + +- ``USE_DEBUGFS``: When set to 1 this option exposes a virtual filesystem + interface through BL31 as a SiP SMC function. + Default is disabled (0). + Firmware update options ------------------------ +~~~~~~~~~~~~~~~~~~~~~~~ + +- ``PSA_FWU_SUPPORT``: Enable the firmware update mechanism as per the + `PSA FW update specification`_. The default value is 0. + PSA firmware update implementation has few limitations, such as: + + - BL2 is not part of the protocol-updatable images. If BL2 needs to + be updated, then it should be done through another platform-defined + mechanism. + + - It assumes the platform's hardware supports CRC32 instructions. - ``NR_OF_FW_BANKS``: Define the number of firmware banks. This flag is used in defining the firmware update metadata structure. This flag is by default @@ -1300,14 +1332,6 @@ Firmware update options This flag is used in defining the firmware update metadata structure. This flag is by default set to '1'. -- ``PSA_FWU_SUPPORT``: Enable the firmware update mechanism as per the - `PSA FW update specification`_. The default value is 0, and this is an - experimental feature. - PSA firmware update implementation has some limitations, such as BL2 is - not part of the protocol-updatable images, if BL2 needs to be updated, then - it should be done through another platform-defined mechanism, and it assumes - that the platform's hardware supports CRC32 instructions. - -------------- *Copyright (c) 2019-2023, Arm Limited. All rights reserved.* diff --git a/atf-20231013-0ea67d76a/docs/getting_started/docs-build.rst b/atf-20240117-bacca82a8/docs/getting_started/docs-build.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/docs-build.rst rename to atf-20240117-bacca82a8/docs/getting_started/docs-build.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/image-terminology.rst b/atf-20240117-bacca82a8/docs/getting_started/image-terminology.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/image-terminology.rst rename to atf-20240117-bacca82a8/docs/getting_started/image-terminology.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/index.rst b/atf-20240117-bacca82a8/docs/getting_started/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/index.rst rename to atf-20240117-bacca82a8/docs/getting_started/index.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/initial-build.rst b/atf-20240117-bacca82a8/docs/getting_started/initial-build.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/initial-build.rst rename to atf-20240117-bacca82a8/docs/getting_started/initial-build.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/prerequisites.rst b/atf-20240117-bacca82a8/docs/getting_started/prerequisites.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/prerequisites.rst rename to atf-20240117-bacca82a8/docs/getting_started/prerequisites.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/psci-lib-integration-guide.rst b/atf-20240117-bacca82a8/docs/getting_started/psci-lib-integration-guide.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/psci-lib-integration-guide.rst rename to atf-20240117-bacca82a8/docs/getting_started/psci-lib-integration-guide.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/rt-svc-writers-guide.rst b/atf-20240117-bacca82a8/docs/getting_started/rt-svc-writers-guide.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/rt-svc-writers-guide.rst rename to atf-20240117-bacca82a8/docs/getting_started/rt-svc-writers-guide.rst diff --git a/atf-20231013-0ea67d76a/docs/getting_started/tools-build.rst b/atf-20240117-bacca82a8/docs/getting_started/tools-build.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/getting_started/tools-build.rst rename to atf-20240117-bacca82a8/docs/getting_started/tools-build.rst diff --git a/atf-20231013-0ea67d76a/docs/global_substitutions.txt b/atf-20240117-bacca82a8/docs/global_substitutions.txt similarity index 100% rename from atf-20231013-0ea67d76a/docs/global_substitutions.txt rename to atf-20240117-bacca82a8/docs/global_substitutions.txt diff --git a/atf-20231013-0ea67d76a/docs/glossary.rst b/atf-20240117-bacca82a8/docs/glossary.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/glossary.rst rename to atf-20240117-bacca82a8/docs/glossary.rst diff --git a/atf-20231013-0ea67d76a/docs/index.rst b/atf-20240117-bacca82a8/docs/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/index.rst rename to atf-20240117-bacca82a8/docs/index.rst diff --git a/atf-20231013-0ea67d76a/docs/license.rst b/atf-20240117-bacca82a8/docs/license.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/license.rst rename to atf-20240117-bacca82a8/docs/license.rst diff --git a/atf-20231013-0ea67d76a/docs/perf/index.rst b/atf-20240117-bacca82a8/docs/perf/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/perf/index.rst rename to atf-20240117-bacca82a8/docs/perf/index.rst diff --git a/atf-20231013-0ea67d76a/docs/perf/performance-monitoring-unit.rst b/atf-20240117-bacca82a8/docs/perf/performance-monitoring-unit.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/perf/performance-monitoring-unit.rst rename to atf-20240117-bacca82a8/docs/perf/performance-monitoring-unit.rst diff --git a/atf-20231013-0ea67d76a/docs/perf/psci-performance-instr.rst b/atf-20240117-bacca82a8/docs/perf/psci-performance-instr.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/perf/psci-performance-instr.rst rename to atf-20240117-bacca82a8/docs/perf/psci-performance-instr.rst diff --git a/atf-20231013-0ea67d76a/docs/perf/psci-performance-juno.rst b/atf-20240117-bacca82a8/docs/perf/psci-performance-juno.rst similarity index 58% rename from atf-20231013-0ea67d76a/docs/perf/psci-performance-juno.rst rename to atf-20240117-bacca82a8/docs/perf/psci-performance-juno.rst index d458d86ea..bab108620 100644 --- a/atf-20231013-0ea67d76a/docs/perf/psci-performance-juno.rst +++ b/atf-20240117-bacca82a8/docs/perf/psci-performance-juno.rst @@ -73,83 +73,157 @@ Results ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in - parallel + parallel (v2.9) - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 243.76 | 239.92 | 6.32 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 663.5 | 30.32 | 167.82 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 105.12 | 22.84 | 5.88 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 384.16 | 19.06 | 4.7 | - +---------+------+-----------+---------+-------------+ - | 1 | 2 | 523.98 | 270.46 | 4.74 | - +---------+------+-----------+---------+-------------+ - | 1 | 3 | 950.54 | 220.9 | 89.2 | - +---------+------+-----------+---------+-------------+ + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 104.58 | 241.20 | 5.26 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 384.24 | 22.50 | 138.76 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 244.56 | 22.18 | 5.16 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 670.56 | 18.58 | 4.44 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 809.36 | 269.28 | 4.44 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 984.96 | 219.70 | 79.62 | + +---------+------+-----------+--------+-------------+ .. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in - serial + parallel (v2.10) - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 266.96 | 31.74 | 167.92 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 266.9 | 31.52 | 167.82 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 279.86 | 23.42 | 87.52 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 101.38 | 18.8 | 4.64 | - +---------+------+-----------+---------+-------------+ - | 1 | 2 | 101.18 | 19.28 | 4.64 | - +---------+------+-----------+---------+-------------+ - | 1 | 3 | 101.32 | 19.02 | 4.62 | - +---------+------+-----------+---------+-------------+ + +---------+------+-------------------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-------------------+--------+-------------+ + | 0 | 0 | 242.66 (+132.03%) | 245.1 | 5.4 | + +---------+------+-------------------+--------+-------------+ + | 0 | 1 | 522.08 (+35.87%) | 26.24 | 138.32 | + +---------+------+-------------------+--------+-------------+ + | 1 | 0 | 104.36 (-57.33%) | 27.1 | 5.32 | + +---------+------+-------------------+--------+-------------+ + | 1 | 1 | 382.56 (-42.95%) | 23.34 | 4.42 | + +---------+------+-------------------+--------+-------------+ + | 1 | 2 | 807.74 | 271.54 | 4.64 | + +---------+------+-------------------+--------+-------------+ + | 1 | 3 | 981.36 | 221.8 | 79.48 | + +---------+------+-------------------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in + serial (v2.9) + + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 236.56 | 23.24 | 138.18 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 236.86 | 23.28 | 138.10 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 281.04 | 22.80 | 77.24 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 100.28 | 18.52 | 4.54 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 100.12 | 18.78 | 4.50 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 100.36 | 18.94 | 4.44 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in + serial (v2.10) + + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 236.84 | 27.1 | 138.36 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 236.96 | 27.1 | 138.32 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 280.06 | 26.94 | 77.5 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 100.76 | 23.42 | 4.36 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 100.02 | 23.42 | 4.44 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 100.08 | 23.2 | 4.4 | + +---------+------+-----------+--------+-------------+ ``CPU_SUSPEND`` to power level 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in - parallel + parallel (v2.9) - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - +---------+------+-----------+---------+-------------+ - | 0 | 0 | 661.94 | 22.88 | 9.66 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 801.64 | 23.38 | 9.62 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 105.56 | 16.02 | 8.12 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 245.42 | 16.26 | 7.78 | - +---------+------+-----------+---------+-------------+ - | 1 | 2 | 384.42 | 16.1 | 7.84 | - +---------+------+-----------+---------+-------------+ - | 1 | 3 | 523.74 | 15.4 | 8.02 | - +---------+------+-----------+---------+-------------+ + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 662.34 | 15.22 | 8.08 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 802.00 | 15.50 | 8.16 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 385.22 | 15.74 | 7.88 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 106.16 | 16.06 | 7.44 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 524.38 | 15.64 | 7.34 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 246.00 | 15.78 | 7.72 | + +---------+------+-----------+--------+-------------+ -.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial +.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in + parallel (v2.10) - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 102.16 | 23.64 | 6.7 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 101.66 | 23.78 | 6.6 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 277.74 | 15.96 | 4.66 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 98.0 | 15.88 | 4.64 | - +---------+------+-----------+---------+-------------+ - | 1 | 2 | 97.66 | 15.88 | 4.62 | - +---------+------+-----------+---------+-------------+ - | 1 | 3 | 97.76 | 15.38 | 4.64 | - +---------+------+-----------+---------+-------------+ + +---------+------+-------------------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-------------------+--------+-------------+ + | 0 | 0 | 801.04 | 18.66 | 8.22 | + +---------+------+-------------------+--------+-------------+ + | 0 | 1 | 661.28 | 19.08 | 7.88 | + +---------+------+-------------------+--------+-------------+ + | 1 | 0 | 105.9 (-72.51%) | 20.3 | 7.58 | + +---------+------+-------------------+--------+-------------+ + | 1 | 1 | 383.58 (+261.32%) | 20.4 | 7.42 | + +---------+------+-------------------+--------+-------------+ + | 1 | 2 | 523.52 | 20.1 | 7.74 | + +---------+------+-------------------+--------+-------------+ + | 1 | 3 | 244.5 | 20.16 | 7.56 | + +---------+------+-------------------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial (v2.9) + + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 99.80 | 15.94 | 5.42 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 99.76 | 15.80 | 5.24 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 278.26 | 16.16 | 4.58 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 96.88 | 16.00 | 4.52 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 96.80 | 16.12 | 4.54 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 96.88 | 16.12 | 4.54 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial (v2.10) + + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 99.84 | 18.86 | 5.54 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 100.2 | 18.82 | 5.66 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 278.12 | 20.56 | 4.48 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 96.68 | 20.62 | 4.3 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 96.94 | 20.14 | 4.42 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 96.68 | 20.46 | 4.32 | + +---------+------+-----------+--------+-------------+ ``CPU_OFF`` on all non-lead CPUs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -157,44 +231,82 @@ Results ``CPU_OFF`` on all non-lead CPUs in sequence then, ``CPU_SUSPEND`` on the lead core to the deepest power level. -.. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs +.. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs (v2.9) - +---------+------+-----------+---------+-------------+ - | Cluster | Core | Powerdown | Wakekup | Cache Flush | - +=========+======+===========+=========+=============+ - | 0 | 0 | 265.38 | 34.12 | 167.36 | - +---------+------+-----------+---------+-------------+ - | 0 | 1 | 265.72 | 33.98 | 167.48 | - +---------+------+-----------+---------+-------------+ - | 1 | 0 | 185.3 | 23.18 | 87.42 | - +---------+------+-----------+---------+-------------+ - | 1 | 1 | 101.58 | 23.46 | 4.48 | - +---------+------+-----------+---------+-------------+ - | 1 | 2 | 101.66 | 22.02 | 4.72 | - +---------+------+-----------+---------+-------------+ - | 1 | 3 | 101.48 | 22.22 | 4.52 | - +---------+------+-----------+---------+-------------+ + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 235.76 | 26.14 | 137.80 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 235.40 | 25.72 | 137.62 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 174.70 | 22.40 | 77.26 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 100.92 | 24.04 | 4.52 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 100.68 | 22.44 | 4.36 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 101.36 | 22.70 | 4.52 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs (v2.10) + + +---------------------------------------------------+ + | test_rt_instr_cpu_off_serial (latest) | + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 236.04 | 30.02 | 137.9 | + +---------+------+-----------+--------+-------------+ + | 0 | 1 | 235.38 | 29.7 | 137.72 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 175.18 | 26.96 | 77.26 | + +---------+------+-----------+--------+-------------+ + | 1 | 1 | 100.56 | 28.34 | 4.32 | + +---------+------+-----------+--------+-------------+ + | 1 | 2 | 100.38 | 26.82 | 4.3 | + +---------+------+-----------+--------+-------------+ + | 1 | 3 | 100.86 | 26.98 | 4.42 | + +---------+------+-----------+--------+-------------+ ``CPU_VERSION`` in parallel ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores +.. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores (2.9) - +-------------+--------+--------------+ - | Cluster | Core | Latency | - +=============+========+==============+ - | 0 | 0 | 1.22 | - +-------------+--------+--------------+ - | 0 | 1 | 1.2 | - +-------------+--------+--------------+ - | 1 | 0 | 0.6 | - +-------------+--------+--------------+ - | 1 | 1 | 1.08 | - +-------------+--------+--------------+ - | 1 | 2 | 1.04 | - +-------------+--------+--------------+ - | 1 | 3 | 1.04 | - +-------------+--------+--------------+ + +-------------+--------+-------------+ + | Cluster | Core | Latency | + +-------------+--------+-------------+ + | 0 | 0 | 1.48 | + +-------------+--------+-------------+ + | 0 | 1 | 1.04 | + +-------------+--------+-------------+ + | 1 | 0 | 0.56 | + +-------------+--------+-------------+ + | 1 | 1 | 0.92 | + +-------------+--------+-------------+ + | 1 | 2 | 0.96 | + +-------------+--------+-------------+ + | 1 | 3 | 0.96 | + +-------------+--------+-------------+ + +.. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores (2.10) + + +-------------+--------+----------------------+ + | Cluster | Core | Latency | + +-------------+--------+----------------------+ + | 0 | 0 | 1.1 (-25.68%) | + +-------------+--------+----------------------+ + | 0 | 1 | 1.06 | + +-------------+--------+----------------------+ + | 1 | 0 | 0.58 | + +-------------+--------+----------------------+ + | 1 | 1 | 0.88 | + +-------------+--------+----------------------+ + | 1 | 2 | 0.92 | + +-------------+--------+----------------------+ + | 1 | 3 | 0.9 | + +-------------+--------+----------------------+ Annotated Historic Results -------------------------- diff --git a/atf-20231013-0ea67d76a/docs/perf/psci-performance-methodology.rst b/atf-20240117-bacca82a8/docs/perf/psci-performance-methodology.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/perf/psci-performance-methodology.rst rename to atf-20240117-bacca82a8/docs/perf/psci-performance-methodology.rst diff --git a/atf-20240117-bacca82a8/docs/perf/psci-performance-n1sdp.rst b/atf-20240117-bacca82a8/docs/perf/psci-performance-n1sdp.rst new file mode 100644 index 000000000..fd3c9c943 --- /dev/null +++ b/atf-20240117-bacca82a8/docs/perf/psci-performance-n1sdp.rst @@ -0,0 +1,297 @@ +Runtime Instrumentation Testing - N1SDP +======================================= + +For this test we used the N1 System Development Platform (`N1SDP`_), which +contains an SoC consisting of two dual-core Arm N1 clusters. + +The following source trees and binaries were used: + +- TF-A [`v2.9-rc0-16-g666aec401`_] +- TFTF [`v2.9-rc0`_] +- SCP/MCP `Prebuilt Images`_ + +Please see the Runtime Instrumentation :ref:`Testing Methodology +` page for more details. + +Procedure +--------- + +#. Build TFTF with runtime instrumentation enabled: + + .. code:: shell + + make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ + TESTS=runtime-instrumentation all + +#. Build TF-A with the following build options: + + .. code:: shell + + make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ + ENABLE_RUNTIME_INSTRUMENTATION=1 fiptool all + +#. Fetch the SCP firmware images: + + .. code:: shell + + curl --fail --connect-timeout 5 --retry 5 \ + -sLS -o build/n1sdp/release/scp_rom.bin \ + https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-bl1.bin + curl --fail --connect-timeout 5 \ + --retry 5 -sLS -o build/n1sdp/release/scp_ram.bin \ + https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-bl2.bin + +#. Fetch the MCP firmware images: + + .. code:: shell + + curl --fail --connect-timeout 5 --retry 5 \ + -sLS -o build/n1sdp/release/mcp_rom.bin \ + https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-mcp-bl1.bin + curl --fail --connect-timeout 5 --retry 5 \ + -sLS -o build/n1sdp/release/mcp_ram.bin \ + https://downloads.trustedfirmware.org/tf-a/css_scp_2.12.0/n1sdp/release/n1sdp-mcp-bl2.bin + +#. Using the fiptool, create a new FIP package and append the SCP ram image onto + it. + + .. code:: shell + + ./tools/fiptool/fiptool create --blob \ + uuid=cfacc2c4-15e8-4668-82be-430a38fad705,file=build/n1sdp/release/bl1.bin \ + --scp-fw build/n1sdp/release/scp_ram.bin build/n1sdp/release/scp_fw.bin + +#. Append the MCP image to the FIP. + + .. code:: shell + + ./tools/fiptool/fiptool create \ + --blob uuid=54464222-a4cf-4bf8-b1b6-cee7dade539e,file=build/n1sdp/release/mcp_ram.bin \ + build/n1sdp/release/mcp_fw.bin + +#. Then, add TFTF as the Non-Secure workload in the FIP image: + + .. code:: shell + + make CROSS_COMPILE=aarch64-none-elf- PLAT=n1sdp \ + ENABLE_RUNTIME_INSTRUMENTATION=1 SCP_BL2=/dev/null \ + BL33= fip + +#. Load the following images onto the development board: ``fip.bin``, + ``scp_rom.bin``, ``scp_ram.bin``, ``mcp_rom.bin``, and ``mcp_ram.bin``. + +.. note:: + + These instructions presume you have a complete firmware stack. The N1SDP + `user guide`_ provides a detailed explanation on how to get setup from + scratch. + +Results +------- + +``CPU_SUSPEND`` to deepest power level +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in + parallel (v2.9) + + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 2.80 | 10.08 | 0.80 | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 4.14 | 15.92 | 0.16 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 3.68 | 12.96 | 0.16 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 3.36 | 18.58 | 0.18 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in + parallel (v2.10) + + +---------+------+----------------+------------------+-----------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+----------------+------------------+-----------------+ + | 0 | 0 | 2.12 | 23.94 (+137.50%) | 0.42 (-47.50%) | + +---------+------+----------------+------------------+-----------------+ + | 0 | 0 | 3.52 | 42.08 (+164.32%) | 0.26 (+62.50%) | + +---------+------+----------------+------------------+-----------------+ + | 1 | 0 | 2.76 (-25.00%) | 38.3 (+195.52%) | 0.26 (+62.50%) | + +---------+------+----------------+------------------+-----------------+ + | 1 | 0 | 2.64 | 44.56 (+139.83%) | 0.36 (+100.00%) | + +---------+------+----------------+------------------+-----------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in + serial (v2.9) + + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 1.86 | 9.92 | 0.32 | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 2.70 | 10.48 | 0.36 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 1.78 | 9.72 | 0.16 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 1.94 | 10.44 | 0.16 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to deepest power level in + serial (v2.10) + + +---------+------+-----------+------------------+----------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+------------------+----------------+ + | 0 | 0 | 1.74 | 23.7 (+138.91%) | 0.3 | + +---------+------+-----------+------------------+----------------+ + | 0 | 0 | 2.08 | 23.96 (+128.63%) | 0.26 (-27.78%) | + +---------+------+-----------+------------------+----------------+ + | 1 | 0 | 1.9 | 23.62 (+143.00%) | 0.28 (+75.00%) | + +---------+------+-----------+------------------+----------------+ + | 1 | 0 | 2.06 | 23.92 (+129.12%) | 0.26 (+62.50%) | + +---------+------+-----------+------------------+----------------+ + +``CPU_SUSPEND`` to power level 0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in + parallel (v2.9) + + +---------------------------------------------------+ + | test_rt_instr_cpu_susp_parallel | + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 0.88 | 12.32 | 0.26 | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 2.12 | 14.62 | 0.26 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 1.86 | 14.14 | 0.16 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 1.92 | 9.44 | 0.18 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in + parallel (v2.10) + + +---------+------+---------------+------------------+----------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+---------------+------------------+----------------+ + | 0 | 0 | 1.5 (+70.45%) | 35.02 (+184.25%) | 0.24 | + +---------+------+---------------+------------------+----------------+ + | 0 | 0 | 1.92 | 38.12 (+160.74%) | 0.28 | + +---------+------+---------------+------------------+----------------+ + | 1 | 0 | 1.88 | 38.1 (+169.45%) | 0.26 (+62.50%) | + +---------+------+---------------+------------------+----------------+ + | 1 | 0 | 2.04 | 23.1 (+144.70%) | 0.24 | + +---------+------+---------------+------------------+----------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial (v2.9) + + +---------------------------------------------------+ + | test_rt_instr_cpu_susp_serial | + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 1.52 | 9.40 | 0.30 | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 1.92 | 9.80 | 0.18 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 2.20 | 9.60 | 0.14 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 1.82 | 9.78 | 0.18 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_SUSPEND`` latencies (µs) to power level 0 in serial (v2.10) + + +---------+------+-----------+------------------+-----------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+------------------+-----------------+ + | 0 | 0 | 1.52 | 23.08 (+145.53%) | 0.3 | + +---------+------+-----------+------------------+-----------------+ + | 0 | 0 | 1.98 | 23.68 (+141.63%) | 0.28 (+55.56%) | + +---------+------+-----------+------------------+-----------------+ + | 1 | 0 | 1.84 | 23.86 (+148.54%) | 0.28 (+100.00%) | + +---------+------+-----------+------------------+-----------------+ + | 1 | 0 | 1.98 | 23.68 (+142.13%) | 0.28 (+55.56%) | + +---------+------+-----------+------------------+-----------------+ + +``CPU_OFF`` on all non-lead CPUs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +``CPU_OFF`` on all non-lead CPUs in sequence then, ``CPU_SUSPEND`` on the lead +core to the deepest power level. + +.. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs (v2.9) + + +---------+------+-----------+--------+-------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 1.84 | 9.94 | 0.32 | + +---------+------+-----------+--------+-------------+ + | 0 | 0 | 14.20 | 13.10 | 0.50 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 13.88 | 12.36 | 0.42 | + +---------+------+-----------+--------+-------------+ + | 1 | 0 | 14.40 | 13.26 | 0.52 | + +---------+------+-----------+--------+-------------+ + +.. table:: ``CPU_OFF`` latencies (µs) on all non-lead CPUs (v2.10) + + +---------+------+-----------+------------------+----------------+ + | Cluster | Core | Powerdown | Wakeup | Cache Flush | + +---------+------+-----------+------------------+----------------+ + | 0 | 0 | 1.78 | 23.7 (+138.43%) | 0.3 | + +---------+------+-----------+------------------+----------------+ + | 0 | 0 | 13.96 | 31.16 (+137.86%) | 0.34 (-32.00%) | + +---------+------+-----------+------------------+----------------+ + | 1 | 0 | 13.54 | 30.24 (+144.66%) | 0.26 (-38.10%) | + +---------+------+-----------+------------------+----------------+ + | 1 | 0 | 14.46 | 31.12 (+134.69%) | 0.7 (+34.62%) | + +---------+------+-----------+------------------+----------------+ + +``CPU_VERSION`` in parallel +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores (v2.9) + + +------------------------------------+ + | test_rt_instr_psci_version_parallel| + +-------------+--------+-------------+ + | Cluster | Core | Latency | + +-------------+--------+-------------+ + | 0 | 0 | 0.08 | + +-------------+--------+-------------+ + | 0 | 0 | 0.26 | + +-------------+--------+-------------+ + | 1 | 0 | 0.20 | + +-------------+--------+-------------+ + | 1 | 0 | 0.26 | + +-------------+--------+-------------+ + +.. table:: ``CPU_VERSION`` latency (µs) in parallel on all cores (v2.10) + + +----------------------------------------------+ + | test_rt_instr_psci_version_parallel (latest) | + +-------------+--------+-----------------------+ + | Cluster | Core | Latency | + +-------------+--------+-----------------------+ + | 0 | 0 | 0.14 (+75.00%) | + +-------------+--------+-----------------------+ + | 0 | 0 | 0.22 | + +-------------+--------+-----------------------+ + | 1 | 0 | 0.2 | + +-------------+--------+-----------------------+ + | 1 | 0 | 0.26 | + +-------------+--------+-----------------------+ + +-------------- + +*Copyright (c) 2023, Arm Limited. All rights reserved.* + +.. _v2.9-rc0-16-g666aec401: https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/heads/v2.9-rc0-16-g666aec401 +.. _v2.9-rc0: https://review.trustedfirmware.org/plugins/gitiles/TF-A/tf-a-tests/+/refs/tags/v2.9-rc0 +.. _user guide: https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/n1sdp/user-guide.rst +.. _Prebuilt Images: https://downloads.trustedfirmware.org/tf-a/css_scp_2.11.0/n1sdp/release/ +.. _N1SDP: https://developer.arm.com/documentation/101489/latest diff --git a/atf-20231013-0ea67d76a/docs/perf/tsp.rst b/atf-20240117-bacca82a8/docs/perf/tsp.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/perf/tsp.rst rename to atf-20240117-bacca82a8/docs/perf/tsp.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/allwinner.rst b/atf-20240117-bacca82a8/docs/plat/allwinner.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/allwinner.rst rename to atf-20240117-bacca82a8/docs/plat/allwinner.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/arm-build-options.rst b/atf-20240117-bacca82a8/docs/plat/arm/arm-build-options.rst similarity index 96% rename from atf-20231013-0ea67d76a/docs/plat/arm/arm-build-options.rst rename to atf-20240117-bacca82a8/docs/plat/arm/arm-build-options.rst index e81052b36..3301067e4 100644 --- a/atf-20231013-0ea67d76a/docs/plat/arm/arm-build-options.rst +++ b/atf-20240117-bacca82a8/docs/plat/arm/arm-build-options.rst @@ -90,11 +90,6 @@ Arm Platform Build Options of the translation tables library instead of version 2. It is set to 0 by default, which selects version 2. -- ``ARM_CRYPTOCELL_INTEG`` : bool option to enable TF-A to invoke Arm® - TrustZone® CryptoCell functionality for Trusted Board Boot on capable Arm - platforms. If this option is specified, then the path to the CryptoCell - SBROM library must be specified via ``CCSBROM_LIB_PATH`` flag. - - ``ARM_GPT_SUPPORT``: Enable GPT parser to get the entry address and length of the various partitions present in the GPT image. This support is available only for the BL2 component, and it is disabled by default. diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/arm_fpga/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/arm_fpga/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/arm/arm_fpga/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/arm_fpga/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/corstone1000/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/corstone1000/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/arm/corstone1000/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/corstone1000/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/fvp-ve/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/fvp-ve/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/arm/fvp-ve/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/fvp-ve/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/fvp/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/fvp/index.rst similarity index 98% rename from atf-20231013-0ea67d76a/docs/plat/arm/fvp/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/fvp/index.rst index fcfa04aba..700020f53 100644 --- a/atf-20231013-0ea67d76a/docs/plat/arm/fvp/index.rst +++ b/atf-20240117-bacca82a8/docs/plat/arm/fvp/index.rst @@ -12,7 +12,7 @@ Arm FVPs without shifted affinities, and that do not support threaded CPU cores (64-bit host machine only). .. note:: - The FVP models used are Version 11.19 Build 14, unless otherwise stated. + The FVP models used are Version 11.22 Build 14, unless otherwise stated. - ``Foundation_Platform`` - ``FVP_Base_AEMv8A-AEMv8A-AEMv8A-AEMv8A-CCN502`` (Version 11.17/21) @@ -41,18 +41,18 @@ Arm FVPs without shifted affinities, and that do not support threaded CPU cores - ``FVP_Base_Cortex-A76AE`` - ``FVP_Base_Cortex-A77`` - ``FVP_Base_Cortex-A78`` +- ``FVP_Base_Cortex-A78AE`` - ``FVP_Base_Cortex-A78C`` - ``FVP_Base_Cortex-X2x4`` (Version 11.17/21) - ``FVP_Base_Neoverse-E1`` - ``FVP_Base_Neoverse-N1`` -- ``FVP_Base_Neoverse-N2x4`` (Version 11.16/16) - ``FVP_Base_Neoverse-V1`` - ``FVP_Base_RevC-2xAEMvA`` -- ``FVP_Morello`` (Version 0.11/33) -- ``FVP_RD_E1_edge`` (Version 11.17/29) -- ``FVP_RD_V1`` (Version 11.17/29) -- ``FVP_TC1`` (Version 11.17/33) -- ``FVP_TC2`` (Version 11.18/28) +- ``FVP_BaseR_AEMv8R`` +- ``FVP_Morello`` (Version 0.11/33) +- ``FVP_RD_V1`` +- ``FVP_TC1`` +- ``FVP_TC2`` (Version 11.20/24) The latest version of the AArch32 build of TF-A has been tested on the following Arm FVPs without shifted affinities, and that do not support threaded diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/fvp_r/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/fvp_r/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/arm/fvp_r/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/fvp_r/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/arm/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/juno/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/juno/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/arm/juno/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/juno/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/morello/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/morello/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/arm/morello/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/morello/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/arm/tc/index.rst b/atf-20240117-bacca82a8/docs/plat/arm/tc/index.rst similarity index 95% rename from atf-20231013-0ea67d76a/docs/plat/arm/tc/index.rst rename to atf-20240117-bacca82a8/docs/plat/arm/tc/index.rst index c5058f5cb..9469e9ad9 100644 --- a/atf-20231013-0ea67d76a/docs/plat/arm/tc/index.rst +++ b/atf-20240117-bacca82a8/docs/plat/arm/tc/index.rst @@ -18,7 +18,7 @@ Currently, the main difference between TC0 (TARGET_PLATFORM=0), TC1 is the CPUs supported as below: - TC0 has support for Cortex A510, Cortex A710 and Cortex X2. (Note TC0 is now deprecated) -- TC1 has support for Cortex A510, Cortex A715 and Cortex X3. +- TC1 has support for Cortex A510, Cortex A715 and Cortex X3. (Note TC1 is now deprecated) - TC2 has support for Cortex A520, Cortex A720 and Cortex x4. Boot Sequence diff --git a/atf-20231013-0ea67d76a/docs/plat/ast2700.rst b/atf-20240117-bacca82a8/docs/plat/ast2700.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/ast2700.rst rename to atf-20240117-bacca82a8/docs/plat/ast2700.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/brcm-stingray.rst b/atf-20240117-bacca82a8/docs/plat/brcm-stingray.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/brcm-stingray.rst rename to atf-20240117-bacca82a8/docs/plat/brcm-stingray.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/hikey.rst b/atf-20240117-bacca82a8/docs/plat/hikey.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/hikey.rst rename to atf-20240117-bacca82a8/docs/plat/hikey.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/hikey960.rst b/atf-20240117-bacca82a8/docs/plat/hikey960.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/hikey960.rst rename to atf-20240117-bacca82a8/docs/plat/hikey960.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/imx8.rst b/atf-20240117-bacca82a8/docs/plat/imx8.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/imx8.rst rename to atf-20240117-bacca82a8/docs/plat/imx8.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/imx8m.rst b/atf-20240117-bacca82a8/docs/plat/imx8m.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/imx8m.rst rename to atf-20240117-bacca82a8/docs/plat/imx8m.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/imx9.rst b/atf-20240117-bacca82a8/docs/plat/imx9.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/imx9.rst rename to atf-20240117-bacca82a8/docs/plat/imx9.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/index.rst b/atf-20240117-bacca82a8/docs/plat/index.rst similarity index 88% rename from atf-20231013-0ea67d76a/docs/plat/index.rst rename to atf-20240117-bacca82a8/docs/plat/index.rst index fc3effd6e..b1ccaa51e 100644 --- a/atf-20231013-0ea67d76a/docs/plat/index.rst +++ b/atf-20240117-bacca82a8/docs/plat/index.rst @@ -73,12 +73,14 @@ Deprecated platforms +----------------+----------------+--------------------+--------------------+ | mt6795 | MTK | 2.5 | 2.7 | +----------------+----------------+--------------------+--------------------+ -| sgi575 | Arm | 2.8 | 2.10 | +| sgi575 | Arm | 2.8 | TBD | +----------------+----------------+--------------------+--------------------+ -| rdn1edge | Arm | 2.8 | 2.10 | +| rdn1edge | Arm | 2.8 | TBD | +----------------+----------------+--------------------+--------------------+ | tc0 | Arm | 2.8 | 2.10 | +----------------+----------------+--------------------+--------------------+ +| tc1 | Arm | 2.10 | TBD | ++----------------+----------------+--------------------+--------------------+ | rde1edge | Arm | 2.9 | 3.0 | +----------------+----------------+--------------------+--------------------+ diff --git a/atf-20231013-0ea67d76a/docs/plat/intel-agilex.rst b/atf-20240117-bacca82a8/docs/plat/intel-agilex.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/intel-agilex.rst rename to atf-20240117-bacca82a8/docs/plat/intel-agilex.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/intel-stratix10.rst b/atf-20240117-bacca82a8/docs/plat/intel-stratix10.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/intel-stratix10.rst rename to atf-20240117-bacca82a8/docs/plat/intel-stratix10.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/build.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/build.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/build.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/build.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-a8k-addr-map.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-a8k-addr-map.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-a8k-addr-map.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-a8k-addr-map.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-amb.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-amb.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-amb.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-amb.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-ccu.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-ccu.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-ccu.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-ccu.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-io-win.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-io-win.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-io-win.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-io-win.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-iob.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-iob.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/misc/mvebu-iob.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/misc/mvebu-iob.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/porting.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/porting.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/porting.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/porting.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/armada/uart-booting.rst b/atf-20240117-bacca82a8/docs/plat/marvell/armada/uart-booting.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/armada/uart-booting.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/armada/uart-booting.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/marvell/index.rst b/atf-20240117-bacca82a8/docs/plat/marvell/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/marvell/index.rst rename to atf-20240117-bacca82a8/docs/plat/marvell/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/meson-axg.rst b/atf-20240117-bacca82a8/docs/plat/meson-axg.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/meson-axg.rst rename to atf-20240117-bacca82a8/docs/plat/meson-axg.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/meson-g12a.rst b/atf-20240117-bacca82a8/docs/plat/meson-g12a.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/meson-g12a.rst rename to atf-20240117-bacca82a8/docs/plat/meson-g12a.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/meson-gxbb.rst b/atf-20240117-bacca82a8/docs/plat/meson-gxbb.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/meson-gxbb.rst rename to atf-20240117-bacca82a8/docs/plat/meson-gxbb.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/meson-gxl.rst b/atf-20240117-bacca82a8/docs/plat/meson-gxl.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/meson-gxl.rst rename to atf-20240117-bacca82a8/docs/plat/meson-gxl.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/mt8183.rst b/atf-20240117-bacca82a8/docs/plat/mt8183.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/mt8183.rst rename to atf-20240117-bacca82a8/docs/plat/mt8183.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/mt8186.rst b/atf-20240117-bacca82a8/docs/plat/mt8186.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/mt8186.rst rename to atf-20240117-bacca82a8/docs/plat/mt8186.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/mt8188.rst b/atf-20240117-bacca82a8/docs/plat/mt8188.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/mt8188.rst rename to atf-20240117-bacca82a8/docs/plat/mt8188.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/mt8192.rst b/atf-20240117-bacca82a8/docs/plat/mt8192.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/mt8192.rst rename to atf-20240117-bacca82a8/docs/plat/mt8192.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/mt8195.rst b/atf-20240117-bacca82a8/docs/plat/mt8195.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/mt8195.rst rename to atf-20240117-bacca82a8/docs/plat/mt8195.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/npcm845x.rst b/atf-20240117-bacca82a8/docs/plat/npcm845x.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/npcm845x.rst rename to atf-20240117-bacca82a8/docs/plat/npcm845x.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/nvidia-tegra.rst b/atf-20240117-bacca82a8/docs/plat/nvidia-tegra.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/nvidia-tegra.rst rename to atf-20240117-bacca82a8/docs/plat/nvidia-tegra.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/nxp/index.rst b/atf-20240117-bacca82a8/docs/plat/nxp/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/nxp/index.rst rename to atf-20240117-bacca82a8/docs/plat/nxp/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/nxp/nxp-layerscape.rst b/atf-20240117-bacca82a8/docs/plat/nxp/nxp-layerscape.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/nxp/nxp-layerscape.rst rename to atf-20240117-bacca82a8/docs/plat/nxp/nxp-layerscape.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/nxp/nxp-ls-fuse-prov.rst b/atf-20240117-bacca82a8/docs/plat/nxp/nxp-ls-fuse-prov.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/nxp/nxp-ls-fuse-prov.rst rename to atf-20240117-bacca82a8/docs/plat/nxp/nxp-ls-fuse-prov.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/nxp/nxp-ls-tbbr.rst b/atf-20240117-bacca82a8/docs/plat/nxp/nxp-ls-tbbr.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/nxp/nxp-ls-tbbr.rst rename to atf-20240117-bacca82a8/docs/plat/nxp/nxp-ls-tbbr.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/poplar.rst b/atf-20240117-bacca82a8/docs/plat/poplar.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/poplar.rst rename to atf-20240117-bacca82a8/docs/plat/poplar.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/qemu-sbsa.rst b/atf-20240117-bacca82a8/docs/plat/qemu-sbsa.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/qemu-sbsa.rst rename to atf-20240117-bacca82a8/docs/plat/qemu-sbsa.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/qemu.rst b/atf-20240117-bacca82a8/docs/plat/qemu.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/qemu.rst rename to atf-20240117-bacca82a8/docs/plat/qemu.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/qti-msm8916.rst b/atf-20240117-bacca82a8/docs/plat/qti-msm8916.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/qti-msm8916.rst rename to atf-20240117-bacca82a8/docs/plat/qti-msm8916.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/qti.rst b/atf-20240117-bacca82a8/docs/plat/qti.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/qti.rst rename to atf-20240117-bacca82a8/docs/plat/qti.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/rcar-gen3.rst b/atf-20240117-bacca82a8/docs/plat/rcar-gen3.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/rcar-gen3.rst rename to atf-20240117-bacca82a8/docs/plat/rcar-gen3.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/rockchip.rst b/atf-20240117-bacca82a8/docs/plat/rockchip.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/rockchip.rst rename to atf-20240117-bacca82a8/docs/plat/rockchip.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/rpi3.rst b/atf-20240117-bacca82a8/docs/plat/rpi3.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/rpi3.rst rename to atf-20240117-bacca82a8/docs/plat/rpi3.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/rpi4.rst b/atf-20240117-bacca82a8/docs/plat/rpi4.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/rpi4.rst rename to atf-20240117-bacca82a8/docs/plat/rpi4.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/rz-g2.rst b/atf-20240117-bacca82a8/docs/plat/rz-g2.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/rz-g2.rst rename to atf-20240117-bacca82a8/docs/plat/rz-g2.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/socionext-uniphier.rst b/atf-20240117-bacca82a8/docs/plat/socionext-uniphier.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/socionext-uniphier.rst rename to atf-20240117-bacca82a8/docs/plat/socionext-uniphier.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/st/index.rst b/atf-20240117-bacca82a8/docs/plat/st/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/st/index.rst rename to atf-20240117-bacca82a8/docs/plat/st/index.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/st/stm32mp1.rst b/atf-20240117-bacca82a8/docs/plat/st/stm32mp1.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/st/stm32mp1.rst rename to atf-20240117-bacca82a8/docs/plat/st/stm32mp1.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/st/stm32mp2.rst b/atf-20240117-bacca82a8/docs/plat/st/stm32mp2.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/st/stm32mp2.rst rename to atf-20240117-bacca82a8/docs/plat/st/stm32mp2.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/st/stm32mpus.rst b/atf-20240117-bacca82a8/docs/plat/st/stm32mpus.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/st/stm32mpus.rst rename to atf-20240117-bacca82a8/docs/plat/st/stm32mpus.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/stm32mp1.rst b/atf-20240117-bacca82a8/docs/plat/stm32mp1.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/stm32mp1.rst rename to atf-20240117-bacca82a8/docs/plat/stm32mp1.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/synquacer.rst b/atf-20240117-bacca82a8/docs/plat/synquacer.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/synquacer.rst rename to atf-20240117-bacca82a8/docs/plat/synquacer.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/ti-k3.rst b/atf-20240117-bacca82a8/docs/plat/ti-k3.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/ti-k3.rst rename to atf-20240117-bacca82a8/docs/plat/ti-k3.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/warp7.rst b/atf-20240117-bacca82a8/docs/plat/warp7.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/warp7.rst rename to atf-20240117-bacca82a8/docs/plat/warp7.rst diff --git a/atf-20231013-0ea67d76a/docs/plat/xilinx-versal-net.rst b/atf-20240117-bacca82a8/docs/plat/xilinx-versal-net.rst similarity index 90% rename from atf-20231013-0ea67d76a/docs/plat/xilinx-versal-net.rst rename to atf-20240117-bacca82a8/docs/plat/xilinx-versal-net.rst index 5d0463943..1db7695b1 100644 --- a/atf-20231013-0ea67d76a/docs/plat/xilinx-versal-net.rst +++ b/atf-20240117-bacca82a8/docs/plat/xilinx-versal-net.rst @@ -14,6 +14,11 @@ To build: make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal_net bl31 ``` +To build bl32 TSP you have to rebuild bl31 too +```bash +make CROSS_COMPILE=aarch64-none-elf- PLAT=versal_net SPD=tspd RESET_TO_BL31=1 bl31 bl32 +``` + To build TF-A for JTAG DCC console: ```bash make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal_net VERSAL_NET_CONSOLE=dcc bl31 diff --git a/atf-20231013-0ea67d76a/docs/plat/xilinx-versal.rst b/atf-20240117-bacca82a8/docs/plat/xilinx-versal.rst similarity index 87% rename from atf-20231013-0ea67d76a/docs/plat/xilinx-versal.rst rename to atf-20240117-bacca82a8/docs/plat/xilinx-versal.rst index 09a6ee27a..e76b95574 100644 --- a/atf-20231013-0ea67d76a/docs/plat/xilinx-versal.rst +++ b/atf-20240117-bacca82a8/docs/plat/xilinx-versal.rst @@ -19,11 +19,21 @@ To build ATF for different platform (supported are "silicon"(default) and "versa make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal VERSAL_PLATFORM=versal_virt bl31 ``` +To build bl32 TSP you have to rebuild bl31 too +```bash +make CROSS_COMPILE=aarch64-none-elf- PLAT=versal SPD=tspd RESET_TO_BL31=1 bl31 bl32 +``` + To build TF-A for JTAG DCC console ```bash make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 VERSAL_CONSOLE=dcc ``` +To build TF-A with Errata management interface +```bash +make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 ERRATA_ABI_SUPPORT=1 +``` + To build TF-A with Straight-Line Speculation(SLS) ```bash make RESET_TO_BL31=1 CROSS_COMPILE=aarch64-none-elf- PLAT=versal bl31 HARDEN_SLS_ALL=1 diff --git a/atf-20231013-0ea67d76a/docs/plat/xilinx-zynqmp.rst b/atf-20240117-bacca82a8/docs/plat/xilinx-zynqmp.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/plat/xilinx-zynqmp.rst rename to atf-20240117-bacca82a8/docs/plat/xilinx-zynqmp.rst diff --git a/atf-20231013-0ea67d76a/docs/porting-guide.rst b/atf-20240117-bacca82a8/docs/porting-guide.rst similarity index 99% rename from atf-20231013-0ea67d76a/docs/porting-guide.rst rename to atf-20240117-bacca82a8/docs/porting-guide.rst index f612e1ca5..7c66d1118 100644 --- a/atf-20231013-0ea67d76a/docs/porting-guide.rst +++ b/atf-20240117-bacca82a8/docs/porting-guide.rst @@ -319,13 +319,6 @@ also be defined: Firmware Update (FWU) certificate identifier, used by NS_BL1U to load the FWU content certificate. -- **#define : PLAT_CRYPTOCELL_BASE** - - This defines the base address of Arm® TrustZone® CryptoCell and must be - defined if CryptoCell crypto driver is used for Trusted Board Boot. For - capable Arm platforms, this driver is used if ``ARM_CRYPTOCELL_INTEG`` is - set. - If the AP Firmware Updater Configuration image, BL2U is used, the following must also be defined: @@ -3298,10 +3291,10 @@ Function : plat_ea_handler Argument : uint64_t Return : void -This function is invoked by the RAS framework for the platform to handle an -External Abort received at EL3. The intention of the function is to attempt to -resolve the cause of External Abort and return; if that's not possible, to -initiate orderly shutdown of the system. +This function is invoked by the runtime exception handling framework for the +platform to handle an External Abort received at EL3. The intention of the +function is to attempt to resolve the cause of External Abort and return; +if that's not possible then an orderly shutdown of the system is initiated. The first parameter (``int ea_reason``) indicates the reason for External Abort. Its value is one of ``ERROR_EA_*`` constants defined in ``ea_handle.h``. @@ -3316,13 +3309,8 @@ The third parameter (``void *cookie``) is unused for now. The fourth parameter (``uint64_t flags``) indicates the preempted security state. These parameters are received from the top-level exception handler. -If ``RAS_FFH_SUPPORT`` is set to ``1``, the default implementation of this -function iterates through RAS handlers registered by the platform. If any of the -RAS handlers resolve the External Abort, no further action is taken. - -If ``RAS_FFH_SUPPORT`` is set to ``0``, or if none of the platform RAS handlers -could resolve the External Abort, the default implementation prints an error -message, and panics. +This function must be implemented if a platform expects Firmware First handling +of External Aborts. Function : plat_handle_uncontainable_ea ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/atf-20231013-0ea67d76a/docs/process/code-review-guidelines.rst b/atf-20240117-bacca82a8/docs/process/code-review-guidelines.rst similarity index 98% rename from atf-20231013-0ea67d76a/docs/process/code-review-guidelines.rst rename to atf-20240117-bacca82a8/docs/process/code-review-guidelines.rst index bd4281132..5e9a6678f 100644 --- a/atf-20231013-0ea67d76a/docs/process/code-review-guidelines.rst +++ b/atf-20240117-bacca82a8/docs/process/code-review-guidelines.rst @@ -242,4 +242,4 @@ concerns, questions, or any other type of blocking comment, they should set *Copyright (c) 2020-2023, Arm Limited. All rights reserved.* -.. _Project Maintenance Process: https://developer.trustedfirmware.org/w/collaboration/project-maintenance-process/ +.. _Project Maintenance Process: https://trusted-firmware-docs.readthedocs.io/en/latest/generic_processes/project_maintenance_process.html diff --git a/atf-20231013-0ea67d76a/docs/process/coding-guidelines.rst b/atf-20240117-bacca82a8/docs/process/coding-guidelines.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/coding-guidelines.rst rename to atf-20240117-bacca82a8/docs/process/coding-guidelines.rst diff --git a/atf-20231013-0ea67d76a/docs/process/coding-style.rst b/atf-20240117-bacca82a8/docs/process/coding-style.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/coding-style.rst rename to atf-20240117-bacca82a8/docs/process/coding-style.rst diff --git a/atf-20231013-0ea67d76a/docs/process/commit-style.rst b/atf-20240117-bacca82a8/docs/process/commit-style.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/commit-style.rst rename to atf-20240117-bacca82a8/docs/process/commit-style.rst diff --git a/atf-20231013-0ea67d76a/docs/process/contributing.rst b/atf-20240117-bacca82a8/docs/process/contributing.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/contributing.rst rename to atf-20240117-bacca82a8/docs/process/contributing.rst diff --git a/atf-20231013-0ea67d76a/docs/process/faq.rst b/atf-20240117-bacca82a8/docs/process/faq.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/faq.rst rename to atf-20240117-bacca82a8/docs/process/faq.rst diff --git a/atf-20231013-0ea67d76a/docs/process/index.rst b/atf-20240117-bacca82a8/docs/process/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/index.rst rename to atf-20240117-bacca82a8/docs/process/index.rst diff --git a/atf-20231013-0ea67d76a/docs/process/maintenance.rst b/atf-20240117-bacca82a8/docs/process/maintenance.rst similarity index 86% rename from atf-20231013-0ea67d76a/docs/process/maintenance.rst rename to atf-20240117-bacca82a8/docs/process/maintenance.rst index 45aada260..5ee435e8b 100644 --- a/atf-20231013-0ea67d76a/docs/process/maintenance.rst +++ b/atf-20240117-bacca82a8/docs/process/maintenance.rst @@ -51,5 +51,5 @@ To put an individual's name up for election, and update the list of maintainers on the :ref:`Project Maintenance` page. -.. _trustedfirmware.org Project Maintenance Process: https://developer.trustedfirmware.org/w/collaboration/project-maintenance-process/ -.. _here: https://developer.trustedfirmware.org/w/collaboration/project-maintenance-process/#how-to-become-a-maintainer +.. _trustedfirmware.org Project Maintenance Process: https://trusted-firmware-docs.readthedocs.io/en/latest/generic_processes/project_maintenance_process.html +.. _here: https://trusted-firmware-docs.readthedocs.io/en/latest/generic_processes/project_maintenance_process.html#how-to-become-a-maintainer diff --git a/atf-20231013-0ea67d76a/docs/process/platform-ports-policy.rst b/atf-20240117-bacca82a8/docs/process/platform-ports-policy.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/platform-ports-policy.rst rename to atf-20240117-bacca82a8/docs/process/platform-ports-policy.rst diff --git a/atf-20231013-0ea67d76a/docs/process/security-hardening.rst b/atf-20240117-bacca82a8/docs/process/security-hardening.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/process/security-hardening.rst rename to atf-20240117-bacca82a8/docs/process/security-hardening.rst diff --git a/atf-20231013-0ea67d76a/docs/process/security.rst b/atf-20240117-bacca82a8/docs/process/security.rst similarity index 97% rename from atf-20231013-0ea67d76a/docs/process/security.rst rename to atf-20240117-bacca82a8/docs/process/security.rst index c6429ad5b..bbc939a41 100644 --- a/atf-20231013-0ea67d76a/docs/process/security.rst +++ b/atf-20240117-bacca82a8/docs/process/security.rst @@ -88,7 +88,7 @@ Security Advisories .. |TFV-9| replace:: :ref:`Advisory TFV-9 (CVE-2022-23960)` .. |TFV-10| replace:: :ref:`Advisory TFV-10 (CVE-2022-47630)` -.. _TrustedFirmware.org security incident process: https://developer.trustedfirmware.org/w/collaboration/security_center/ +.. _TrustedFirmware.org security incident process: https://trusted-firmware-docs.readthedocs.io/en/latest/security_center/ -------------- diff --git a/atf-20231013-0ea67d76a/docs/resources/TrustedFirmware-Logo_standard-white.png b/atf-20240117-bacca82a8/docs/resources/TrustedFirmware-Logo_standard-white.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/TrustedFirmware-Logo_standard-white.png rename to atf-20240117-bacca82a8/docs/resources/TrustedFirmware-Logo_standard-white.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/FIP_in_a_GPT_image.png b/atf-20240117-bacca82a8/docs/resources/diagrams/FIP_in_a_GPT_image.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/FIP_in_a_GPT_image.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/FIP_in_a_GPT_image.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/MMU-600.png b/atf-20240117-bacca82a8/docs/resources/diagrams/MMU-600.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/MMU-600.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/MMU-600.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/Makefile b/atf-20240117-bacca82a8/docs/resources/diagrams/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/Makefile rename to atf-20240117-bacca82a8/docs/resources/diagrams/Makefile diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/PSA-FWU.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/PSA-FWU.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/PSA-FWU.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/PSA-FWU.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/PSA-FWU.png b/atf-20240117-bacca82a8/docs/resources/diagrams/PSA-FWU.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/PSA-FWU.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/PSA-FWU.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/arm-cca-software-arch.png b/atf-20240117-bacca82a8/docs/resources/diagrams/arm-cca-software-arch.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/arm-cca-software-arch.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/arm-cca-software-arch.png diff --git a/atf-20240117-bacca82a8/docs/resources/diagrams/bl31-exception-entry-error-synchronization.png b/atf-20240117-bacca82a8/docs/resources/diagrams/bl31-exception-entry-error-synchronization.png new file mode 100644 index 000000000..cdfdcb910 Binary files /dev/null and b/atf-20240117-bacca82a8/docs/resources/diagrams/bl31-exception-entry-error-synchronization.png differ diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/cmake_framework_structure.png b/atf-20240117-bacca82a8/docs/resources/diagrams/cmake_framework_structure.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/cmake_framework_structure.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/cmake_framework_structure.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/cmake_framework_workflow.png b/atf-20240117-bacca82a8/docs/resources/diagrams/cmake_framework_workflow.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/cmake_framework_workflow.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/cmake_framework_workflow.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/context_management_abs.png b/atf-20240117-bacca82a8/docs/resources/diagrams/context_management_abs.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/context_management_abs.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/context_management_abs.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/context_mgmt_existing.png b/atf-20240117-bacca82a8/docs/resources/diagrams/context_mgmt_existing.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/context_mgmt_existing.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/context_mgmt_existing.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/context_mgmt_proposed.png b/atf-20240117-bacca82a8/docs/resources/diagrams/context_mgmt_proposed.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/context_mgmt_proposed.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/context_mgmt_proposed.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/default_reset_code.png b/atf-20240117-bacca82a8/docs/resources/diagrams/default_reset_code.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/default_reset_code.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/default_reset_code.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ehf.svg b/atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ehf.svg similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ehf.svg rename to atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ehf.svg diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ehf.xml b/atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ehf.xml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ehf.xml rename to atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ehf.xml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ras.svg b/atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ras.svg similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ras.svg rename to atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ras.svg diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ras.xml b/atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ras.xml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/draw.io/ras.xml rename to atf-20240117-bacca82a8/docs/resources/diagrams/draw.io/ras.xml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/ff-a-lsp-at-el3.png b/atf-20240117-bacca82a8/docs/resources/diagrams/ff-a-lsp-at-el3.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/ff-a-lsp-at-el3.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/ff-a-lsp-at-el3.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/ff-a-spm-at-el3.png b/atf-20240117-bacca82a8/docs/resources/diagrams/ff-a-spm-at-el3.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/ff-a-spm-at-el3.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/ff-a-spm-at-el3.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/ff-a-spm-sel2.png b/atf-20240117-bacca82a8/docs/resources/diagrams/ff-a-spm-sel2.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/ff-a-spm-sel2.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/ff-a-spm-sel2.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-secure-interrupt-handling-nwd.png b/atf-20240117-bacca82a8/docs/resources/diagrams/ffa-secure-interrupt-handling-nwd.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-secure-interrupt-handling-nwd.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/ffa-secure-interrupt-handling-nwd.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-secure-interrupt-handling-swd.png b/atf-20240117-bacca82a8/docs/resources/diagrams/ffa-secure-interrupt-handling-swd.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/ffa-secure-interrupt-handling-swd.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/ffa-secure-interrupt-handling-swd.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/fwu_flow.png b/atf-20240117-bacca82a8/docs/resources/diagrams/fwu_flow.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/fwu_flow.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/fwu_flow.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/fwu_states.png b/atf-20240117-bacca82a8/docs/resources/diagrams/fwu_states.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/fwu_states.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/fwu_states.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/int_handling.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/int_handling.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/int_handling.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/int_handling.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/measured_boot_design.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/measured_boot_design.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/measured_boot_design.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/measured_boot_design.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/measured_boot_design.png b/atf-20240117-bacca82a8/docs/resources/diagrams/measured_boot_design.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/measured_boot_design.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/measured_boot_design.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/non-sec-int-handling.png b/atf-20240117-bacca82a8/docs/resources/diagrams/non-sec-int-handling.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/non-sec-int-handling.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/non-sec-int-handling.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/partition-package.png b/atf-20240117-bacca82a8/docs/resources/diagrams/partition-package.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/partition-package.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/partition-package.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/bl2-loading-sp.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/bl2-loading-sp.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/bl2-loading-sp.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/bl2-loading-sp.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/el3_spm_dfd.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/el3_spm_dfd.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/el3_spm_dfd.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/el3_spm_dfd.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/fconf_bl1_load_config.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/fconf_bl1_load_config.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/fconf_bl1_load_config.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/fconf_bl1_load_config.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/fconf_bl2_populate.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/fconf_bl2_populate.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/fconf_bl2_populate.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/fconf_bl2_populate.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/fip-secure-partitions.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/fip-secure-partitions.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/fip-secure-partitions.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/fip-secure-partitions.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_arm_class_diagram.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_arm_class_diagram.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_arm_class_diagram.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_arm_class_diagram.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_dev_init_and_check.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_dev_init_and_check.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_dev_init_and_check.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_dev_init_and_check.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_dev_registration.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_dev_registration.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_dev_registration.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_dev_registration.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_framework_usage_overview.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_framework_usage_overview.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/io_framework_usage_overview.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/io_framework_usage_overview.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/rss_attestation_flow.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/rss_attestation_flow.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/rss_attestation_flow.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/rss_attestation_flow.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/rss_measured_boot_flow.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/rss_measured_boot_flow.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/rss_measured_boot_flow.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/rss_measured_boot_flow.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/sdei_explicit_dispatch.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/sdei_explicit_dispatch.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/sdei_explicit_dispatch.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/sdei_explicit_dispatch.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/sdei_general.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/sdei_general.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/sdei_general.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/sdei_general.puml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/spm_dfd.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/spm_dfd.puml similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/spm_dfd.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/spm_dfd.puml diff --git a/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_arm_cca_dfd.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_arm_cca_dfd.puml new file mode 100644 index 000000000..493f07884 --- /dev/null +++ b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_arm_cca_dfd.puml @@ -0,0 +1,82 @@ +/' + ' Copyright (c) 2023, Arm Limited. All rights reserved. + ' + ' SPDX-License-Identifier: BSD-3-Clause + '/ + +/' +TF-A with Arm CCA Data Flow Diagram +'/ + +@startuml +digraph tfa_dfd { + + # Arrange nodes from left to right + rankdir="LR" + + # Allow arrows to end on cluster boundaries + compound=true + + # Default settings for edges and nodes + edge [minlen=2 color="#8c1b07"] + node [fillcolor="#ffb866" style=filled shape=box fixedsize=true width=1.6 height=0.7] + + # Nodes outside of the trust boundary + realm [label="Realm\nClients"] + nsec [label="Non-secure\nClients"] + sec [label="Secure\nClients"] + dbg [label="Debug & Trace"] + uart [label="UART"] + nvm [label="Non-volatile\nMemory"] + + # Trust boundary cluster + subgraph cluster_trusted{ + graph [style=dashed color="#f22430"] + + # HW IPs cluster + subgraph cluster_ip{ + label ="Hardware IPs"; + graph [style=filled color="#000000" fillcolor="#ffd29e"] + + rank="same" + gic [label="GIC" width=1.2 height=0.5] + mmu [label="MMU" width=1.2 height=0.5] + etc [label="..." shape=none style=none height=0.5] + } + + # TF-A cluster + subgraph cluster_tfa{ + label ="TF-A"; + graph [style=filled color="#000000" fillcolor="#faf9cd"] + + bl1 [label="Boot ROM\n(BL1)" fillcolor="#ddffb3"]; + bl2 [label="Trusted Boot\nFirmware\n(BL2)" fillcolor="#ddffb3" height=1] + bl31 [label="TF-A Runtime\n(BL31)" fillcolor="#ddffb3"] + } + + # HES cluster + subgraph cluster_hes{ + label ="Arm CCA HES"; + graph [style=filled color="#000000" fillcolor="#ffd29e"] + + hes [label="Hardware\nEnforced Security"] + } + } + + # Interactions between nodes + + # -- The following lines are copied from tfa_dfd.puml and must not be + # changed, at the risk of invalidating DF* references. + nvm -> bl31 [lhead=cluster_tfa label="DF1"] + uart -> bl31 [dir="both" lhead=cluster_tfa label="DF2"] + dbg -> bl2 [dir="both" lhead=cluster_tfa label="DF3"] + sec -> bl2 [dir="both" lhead=cluster_tfa label="DF4"] + nsec -> bl1 [dir="both" lhead=cluster_tfa, label="DF5"] + bl2 -> mmu [dir="both" ltail=cluster_tfa lhead=cluster_ip label="DF6"] + + # -- The following lines are new for Arm CCA DFD. + bl2 -> hes [dir="both" ltail=cluster_tfa lhead=cluster_hes label="DF7"] + realm -> bl2 [dir="both" lhead=cluster_tfa label="DF8"] +} + +@enduml diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/tfa_dfd.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_dfd.puml similarity index 95% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/tfa_dfd.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_dfd.puml index 000791105..9d3dcba42 100644 --- a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/tfa_dfd.puml +++ b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_dfd.puml @@ -25,7 +25,7 @@ digraph tfa_dfd { nsec [label="Non-secure\nClients"] sec [label="Secure\nClients"] dbg [label="Debug & Trace"] - logs [label="Logs\n(UART)"] + uart [label="UART"] nvm [label="Non-volatile\nMemory"] # Trust boundary cluster @@ -56,7 +56,7 @@ digraph tfa_dfd { # Interactions between nodes nvm -> bl31 [lhead=cluster_tfa label="DF1"] - logs -> bl31 [dir="back" lhead=cluster_tfa label="DF2"] + uart -> bl31 [dir="both" lhead=cluster_tfa label="DF2"] dbg -> bl2 [dir="both" lhead=cluster_tfa label="DF3"] sec -> bl2 [dir="both" lhead=cluster_tfa label="DF4"] nsec -> bl1 [dir="both" lhead=cluster_tfa, label="DF5"] diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/tfa_rss_dfd.puml b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_rss_dfd.puml similarity index 96% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/tfa_rss_dfd.puml rename to atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_rss_dfd.puml index 23f5b174e..a7e0ce576 100644 --- a/atf-20231013-0ea67d76a/docs/resources/diagrams/plantuml/tfa_rss_dfd.puml +++ b/atf-20240117-bacca82a8/docs/resources/diagrams/plantuml/tfa_rss_dfd.puml @@ -25,7 +25,7 @@ digraph tfa_dfd { nsec [label="Non-secure\nClients"] sec [label="Secure\nClients"] dbg [label="Debug & Trace"] - logs [label="Logs\n(UART)"] + uart [label="UART"] nvm [label="Non-volatile\nMemory"] @@ -65,7 +65,7 @@ digraph tfa_dfd { # Interactions between nodes nvm -> bl31 [lhead=cluster_tfa label="DF1"] - logs -> bl31 [dir="back" lhead=cluster_tfa label="DF2"] + uart -> bl31 [dir="both" lhead=cluster_tfa label="DF2"] dbg -> bl2 [dir="both" lhead=cluster_tfa label="DF3"] sec -> bl2 [dir="both" lhead=cluster_tfa label="DF4"] nsec -> bl1 [dir="both" lhead=cluster_tfa, label="DF5"] diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/psci-flattened-vs-hierarchical-idle-states.png b/atf-20240117-bacca82a8/docs/resources/diagrams/psci-flattened-vs-hierarchical-idle-states.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/psci-flattened-vs-hierarchical-idle-states.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/psci-flattened-vs-hierarchical-idle-states.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/psci-osi-mode.png b/atf-20240117-bacca82a8/docs/resources/diagrams/psci-osi-mode.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/psci-osi-mode.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/psci-osi-mode.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/psci-pc-mode-vs-osi-mode.png b/atf-20240117-bacca82a8/docs/resources/diagrams/psci-pc-mode-vs-osi-mode.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/psci-pc-mode-vs-osi-mode.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/psci-pc-mode-vs-osi-mode.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/psci-suspend-sequence.png b/atf-20240117-bacca82a8/docs/resources/diagrams/psci-suspend-sequence.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/psci-suspend-sequence.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/psci-suspend-sequence.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_flow.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_flow.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_flow.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_flow.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_no_boot_type_check.png b/atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_no_boot_type_check.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_no_boot_type_check.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_no_boot_type_check.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_no_checks.png b/atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_no_checks.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_no_checks.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_no_checks.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_no_cpu_check.png b/atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_no_cpu_check.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/reset_code_no_cpu_check.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/reset_code_no_cpu_check.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/rmm_cold_boot_generic.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/rmm_cold_boot_generic.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/rmm_cold_boot_generic.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/rmm_cold_boot_generic.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/rmm_cold_boot_generic.png b/atf-20240117-bacca82a8/docs/resources/diagrams/rmm_cold_boot_generic.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/rmm_cold_boot_generic.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/rmm_cold_boot_generic.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_design.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/romlib_design.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_design.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/romlib_design.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_design.png b/atf-20240117-bacca82a8/docs/resources/diagrams/romlib_design.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_design.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/romlib_design.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_wrapper.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/romlib_wrapper.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_wrapper.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/romlib_wrapper.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_wrapper.png b/atf-20240117-bacca82a8/docs/resources/diagrams/romlib_wrapper.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/romlib_wrapper.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/romlib_wrapper.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/rss_attestation_flow.svg b/atf-20240117-bacca82a8/docs/resources/diagrams/rss_attestation_flow.svg similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/rss_attestation_flow.svg rename to atf-20240117-bacca82a8/docs/resources/diagrams/rss_attestation_flow.svg diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/rss_measured_boot_flow.svg b/atf-20240117-bacca82a8/docs/resources/diagrams/rss_measured_boot_flow.svg similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/rss_measured_boot_flow.svg rename to atf-20240117-bacca82a8/docs/resources/diagrams/rss_measured_boot_flow.svg diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/rt-svc-descs-layout.png b/atf-20240117-bacca82a8/docs/resources/diagrams/rt-svc-descs-layout.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/rt-svc-descs-layout.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/rt-svc-descs-layout.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/sec-int-handling.png b/atf-20240117-bacca82a8/docs/resources/diagrams/sec-int-handling.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/sec-int-handling.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/sec-int-handling.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/secure_sw_stack_sp.png b/atf-20240117-bacca82a8/docs/resources/diagrams/secure_sw_stack_sp.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/secure_sw_stack_sp.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/secure_sw_stack_sp.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/secure_sw_stack_tos.png b/atf-20240117-bacca82a8/docs/resources/diagrams/secure_sw_stack_tos.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/secure_sw_stack_tos.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/secure_sw_stack_tos.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/spm-threat-model-trust-boundaries.png b/atf-20240117-bacca82a8/docs/resources/diagrams/spm-threat-model-trust-boundaries.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/spm-threat-model-trust-boundaries.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/spm-threat-model-trust-boundaries.png diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/xlat_align.dia b/atf-20240117-bacca82a8/docs/resources/diagrams/xlat_align.dia similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/xlat_align.dia rename to atf-20240117-bacca82a8/docs/resources/diagrams/xlat_align.dia diff --git a/atf-20231013-0ea67d76a/docs/resources/diagrams/xlat_align.png b/atf-20240117-bacca82a8/docs/resources/diagrams/xlat_align.png similarity index 100% rename from atf-20231013-0ea67d76a/docs/resources/diagrams/xlat_align.png rename to atf-20240117-bacca82a8/docs/resources/diagrams/xlat_align.png diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/index.rst b/atf-20240117-bacca82a8/docs/security_advisories/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/index.rst rename to atf-20240117-bacca82a8/docs/security_advisories/index.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-1.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-1.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-1.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-1.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-10.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-10.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-10.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-10.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-2.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-2.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-2.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-2.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-3.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-3.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-3.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-3.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-4.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-4.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-4.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-4.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-5.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-5.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-5.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-5.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-6.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-6.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-6.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-6.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-7.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-7.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-7.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-7.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-8.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-8.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-8.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-8.rst diff --git a/atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-9.rst b/atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-9.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/security_advisories/security-advisory-tfv-9.rst rename to atf-20240117-bacca82a8/docs/security_advisories/security-advisory-tfv-9.rst diff --git a/atf-20231013-0ea67d76a/docs/threat_model/index.rst b/atf-20240117-bacca82a8/docs/threat_model/index.rst similarity index 98% rename from atf-20231013-0ea67d76a/docs/threat_model/index.rst rename to atf-20240117-bacca82a8/docs/threat_model/index.rst index b22fb1813..e22378b0b 100644 --- a/atf-20231013-0ea67d76a/docs/threat_model/index.rst +++ b/atf-20240117-bacca82a8/docs/threat_model/index.rst @@ -31,10 +31,10 @@ data flow diagram, as well as a list of threats we have identified using the :caption: Contents threat_model - threat_model_spm threat_model_el3_spm threat_model_fvp_r threat_model_rss_interface + threat_model_arm_cca -------------- diff --git a/atf-20231013-0ea67d76a/docs/threat_model/threat_model.rst b/atf-20240117-bacca82a8/docs/threat_model/threat_model.rst similarity index 94% rename from atf-20231013-0ea67d76a/docs/threat_model/threat_model.rst rename to atf-20240117-bacca82a8/docs/threat_model/threat_model.rst index 57a5e1b81..0da255854 100644 --- a/atf-20231013-0ea67d76a/docs/threat_model/threat_model.rst +++ b/atf-20240117-bacca82a8/docs/threat_model/threat_model.rst @@ -36,6 +36,9 @@ assumptions: - There are no Root and Realm worlds. These are introduced by :ref:`Realm Management Extension (RME)`. + The :ref:`Threat Model for TF-A with Arm CCA support` covers these types of + configurations. + - No experimental features are enabled. We do not consider threats that may come from them. @@ -63,8 +66,10 @@ are considered untrusted by TF-A. | | images include TF-A BL2 and BL31 images, as well as | | | other secure and non-secure images. | +-----------------+--------------------------------------------------------+ - | DF2 | | TF-A log system framework outputs debug messages | - | | over a UART interface. | + | DF2 | | TF-A log system framework outputs debug or | + | | informative messages over a UART interface. | + | | | + | | | Also, characters can be read from a UART interface. | +-----------------+--------------------------------------------------------+ | DF3 | | Debug and trace IP on a platform can allow access | | | to registers and memory of TF-A. | @@ -272,6 +277,8 @@ some threats are confined in specific images, while others apply to each of them. To help developers implement mitigations in the right place, threats below are categorized based on the firmware image that should mitigate them. +.. _General Threats: + General Threats for All Firmware Images --------------------------------------- @@ -552,9 +559,62 @@ General Threats for All Firmware Images | | soon as they are not needed anymore. | +------------------------+-----------------------------------------------------+ | Mitigations | | Yes / Platform specific | +| implemented? | | +------------------------+-----------------------------------------------------+ ++------------------------+-----------------------------------------------------+ +| ID | 15 | ++========================+=====================================================+ +| Threat | | **Improper handling of input data received over | +| | a UART interface may allow an attacker to tamper | +| | with TF-A execution environment.** | +| | | +| | | The consequences of the attack depend on the | +| | the exact usage of input data received over UART. | +| | Examples are injection of arbitrary data, | +| | sensitive data tampering, influencing the | +| | execution path, denial of service (if using | +| | blocking I/O). This list may not be exhaustive. | ++------------------------+-----------------------------------------------------+ +| Diagram Elements | DF2, DF4, DF5 | ++------------------------+-----------------------------------------------------+ +| Affected TF-A | BL1, BL2, BL31 | +| Components | | ++------------------------+-----------------------------------------------------+ +| Assets | Sensitive Data, Code Execution, Availability | ++------------------------+-----------------------------------------------------+ +| Threat Agent | NSCode, SecCode | ++------------------------+-----------------------------------------------------+ +| Threat Type | Tampering, Information Disclosure, Denial of | +| | service, Elevation of privilege. | ++------------------------+-------------------+----------------+----------------+ +| Application | Server | IoT | Mobile | ++------------------------+-------------------+----------------+----------------+ +| Impact | Critical (5) | Critical (5) | Critical (5) | ++------------------------+-------------------+----------------+----------------+ +| Likelihood | Critical (5) | Critical (5) | Critical (5) | ++------------------------+-------------------+----------------+----------------+ +| Total Risk Rating | Critical (25) | Critical (25) | Critical (25) | ++------------------------+-------------------+----------------+----------------+ +| Mitigations | | By default, the code to read input data from UART | +| | interfaces is disabled (see `ENABLE_CONSOLE_GETC` | +| | build option). It should only be enabled on a | +| | need basis. | +| | | +| | | Data received over UART interfaces should be | +| | treated as untrusted data. As such, it should be | +| | properly sanitized and handled with caution. | ++------------------------+-----------------------------------------------------+ +| Mitigations | | Platform specific. | +| implemented? | | +| | | Generic code does not read any input data from | +| | UART interface(s). | ++------------------------+-----------------------------------------------------+ + + +.. _Boot Firmware Threats: + Threats to be Mitigated by the Boot Firmware -------------------------------------------- @@ -789,6 +849,8 @@ nonetheless once execution has reached the runtime EL3 firmware. since the |SRTM| includes all secure world components. +.. _Runtime Firmware Threats: + Threats to be Mitigated by the Runtime EL3 Firmware --------------------------------------------------- diff --git a/atf-20240117-bacca82a8/docs/threat_model/threat_model_arm_cca.rst b/atf-20240117-bacca82a8/docs/threat_model/threat_model_arm_cca.rst new file mode 100644 index 000000000..fbf3327b7 --- /dev/null +++ b/atf-20240117-bacca82a8/docs/threat_model/threat_model_arm_cca.rst @@ -0,0 +1,225 @@ +Threat Model for TF-A with Arm CCA support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Introduction +************ + +This document provides a threat model of TF-A firmware for platforms with Arm +Realm Management Extension (RME) support which implement Arm Confidential +Compute Architecture (Arm CCA). + +Although it is a separate document, it references the :ref:`Generic Threat +Model` in a number of places, as some of the contents is commonly applicable to +TF-A with or without Arm CCA support. + +Target of Evaluation +******************** + +In this threat model, the target of evaluation is the Trusted Firmware for +A-class Processors (TF-A) with RME support and Arm CCA support. This includes +the boot ROM (BL1), the trusted boot firmware (BL2) and the runtime EL3 firmware +(BL31). + +Assumptions +=========== + +We make the following assumptions: + +- :ref:`Realm Management Extension (RME)` is enabled on the platform. + +- Arm CCA Hardware Enforced Security (HES) is available on the platform, as + recommended by `Arm CCA security model`_: + + *[R0004] Arm strongly recommends that all implementations of CCA utilize* + *hardware enforced security (CCA HES).* + +- All TF-A images run from on-chip memory. Data used by these images also live + in on-chip memory. This means TF-A is not vulnerable to an attacker that can + probe or tamper with off-chip memory. + + These are requirements of the `Arm CCA security model`_: + + *[R0147] Monitor code executes entirely from on-chip memory.* + + *[R0149] Any monitor data that may affect the CCA security guarantee, other* + *than GPT, is either held in on-chip memory, or in external memory but with* + *additional integrity protection.* + + Note that this threat model hardens *[R0149]* requirement by forbidding to + hold data in external memory, even if it is integrity-protected - except for + GPT data. + +- TF-A BL1 image is immutable and thus implicitly trusted. It runs from + read-only memory or write-protected memory. This could be on-chip ROM, on-chip + OTP, locked on-chip flash, or write-protected on-chip RAM for example. + + This is a requirement of the `Arm CCA security model`_: + + *[R0158] Arm recommends that all initial boot code is immutable on a* + *secured system.* + + *[R0050] If all or part of initial boot code is instantiated in on-chip* + *memory then other trusted subsystems or application PE cannot modify that* + *code before it has been executed.* + +- Trusted boot and measured boot are enabled. This means an attacker can't boot + arbitrary images that are not approved by platform providers. + + These are requirements of the `Arm CCA security model`_: + + *[R0048] A secured system can only load authorized CCA firmware.* + + *[R0079] All Monitor firmware loaded by PE initial boot is measured and* + *verified as outlined in Verified boot.* + +- No experimental features are enabled. These are typically incomplete features, + which need more time to stabilize. Thus, we do not consider threats that may + come from them. It is not recommended to use these features in production + builds. + +Data Flow Diagram +================= + +Figure 1 shows a high-level data flow diagram for TF-A. The diagram shows a +model of the different components of a TF-A-based system and their interactions +with TF-A. A description of each diagram element is given on Table 1. On the +diagram, the red broken lines indicate trust boundaries. Components outside of +the broken lines are considered untrusted by TF-A. + +.. uml:: ../resources/diagrams/plantuml/tfa_arm_cca_dfd.puml + :caption: Figure 1: Data Flow Diagram + +.. table:: Table 1: Data Flow Diagram Description + + +-----------------+--------------------------------------------------------+ + | Diagram Element | Description | + +=================+========================================================+ + | DF1 | | Refer to DF1 description in the | + | | :ref:`Generic Threat Model`. Additionally TF-A | + | | loads realm images. | + +-----------------+--------------------------------------------------------+ + | DF2-DF6 | | Refer to DF2-DF6 descriptions in the | + | | :ref:`Generic Threat Model`. | + +-----------------+--------------------------------------------------------+ + | DF7 | | Boot images interact with Arm CCA HES to record boot | + | | measurements and retrieve data used for AP images | + | | authentication. | + | | | + | | | The runtime firmware interacts with Arm CCA HES to | + | | obtain sensitive attestation data for the realm | + | | world. | + +-----------------+--------------------------------------------------------+ + | DF8 | | Realm world software (e.g. TF-RMM) interact with | + | | TF-A through SMC call interface and/or shared | + | | memory. | + +-----------------+--------------------------------------------------------+ + +Threat Analysis +*************** + +In this threat model, we use the same method to analyse threats as in the +:ref:`Generic Threat Model`. This section only points out differences where +applicable. + +- There is an additional threat agent: *RealmCode*. It takes the form of + malicious or faulty code running in the realm world, including R-EL2, R-EL1 + and R-EL0 levels. + +- At this time we only consider the ``Server`` target environment. New threats + identified in this threat model will only be given a risk rating for this + environment. Other environments may be added in a future revision + +Threat Assessment +================= + +General Threats for All Firmware Images +--------------------------------------- + +The following table analyses the :ref:`General Threats` in the context of this +threat model. Only deltas are pointed out. + + +----+-------------+-------------------------------------------------------+ + | ID | Applicable? | Comments | + +====+=============+=======================================================+ + | 05 | Yes | | + +----+-------------+-------------------------------------------------------+ + | 06 | Yes | | + +----+-------------+-------------------------------------------------------+ + | 08 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 11 | Yes | | Misconfiguration of the Memory Management Unit | + | | | (MMU) may allow a **normal/secure/realm** world | + | | | software to access sensitive data, execute arbitrary| + | | | code or access otherwise restricted HW interface. | + | | | | + | | | | **Note that on RME systems, MMU configuration also | + | | | includes Granule Protection Tables (GPT) setup.** | + | | | | + | | | | Additional diagram elements: DF4, DF7, DF8. | + | | | | + | | | | Additional threat agents: SecCode, RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 13 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 15 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + +Threats to be Mitigated by the Boot Firmware +-------------------------------------------- + +The following table analyses the :ref:`Boot Firmware Threats` in the context of +this threat model. Only deltas are pointed out. + + +----+-------------+-------------------------------------------------------+ + | ID | Applicable? | Comments | + +====+=============+=======================================================+ + | 01 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 02 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 03 | Yes | | + +----+-------------+-------------------------------------------------------+ + | 04 | Yes | | + +----+-------------+-------------------------------------------------------+ + +Threats to be Mitigated by the Runtime EL3 Firmware +--------------------------------------------------- + +The following table analyses the :ref:`Runtime Firmware Threats` in the context +of this threat model. Only deltas are pointed out. + + +----+-------------+-------------------------------------------------------+ + | ID | Applicable? | Comments | + +====+=============+=======================================================+ + | 07 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 09 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 10 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 12 | Yes | Additional diagram element: DF8. | + | | | | + | | | Additional threat agent: RealmCode. | + +----+-------------+-------------------------------------------------------+ + | 14 | Yes | | + +----+-------------+-------------------------------------------------------+ + +*Copyright (c) 2023, Arm Limited. All rights reserved.* + +.. _Arm CCA Security Model: https://developer.arm.com/documentation/DEN0096/A_a diff --git a/atf-20231013-0ea67d76a/docs/threat_model/threat_model_el3_spm.rst b/atf-20240117-bacca82a8/docs/threat_model/threat_model_el3_spm.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/threat_model/threat_model_el3_spm.rst rename to atf-20240117-bacca82a8/docs/threat_model/threat_model_el3_spm.rst diff --git a/atf-20231013-0ea67d76a/docs/threat_model/threat_model_fvp_r.rst b/atf-20240117-bacca82a8/docs/threat_model/threat_model_fvp_r.rst similarity index 94% rename from atf-20231013-0ea67d76a/docs/threat_model/threat_model_fvp_r.rst rename to atf-20240117-bacca82a8/docs/threat_model/threat_model_fvp_r.rst index c1462bb51..725eeed92 100644 --- a/atf-20231013-0ea67d76a/docs/threat_model/threat_model_fvp_r.rst +++ b/atf-20240117-bacca82a8/docs/threat_model/threat_model_fvp_r.rst @@ -90,8 +90,10 @@ implementation: and since the MPU configuration is equivalent with that for the fvp platform and others, this is not expected to be a concern. + - ID 15: Improper handling of input data received over a UART interface may + allow an attacker to tamper with TF-A execution environment. -------------- -*Copyright (c) 2021, Arm Limited. All rights reserved.* +*Copyright (c) 2021-2023, Arm Limited. All rights reserved.* diff --git a/atf-20231013-0ea67d76a/docs/threat_model/threat_model_rss_interface.rst b/atf-20240117-bacca82a8/docs/threat_model/threat_model_rss_interface.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/threat_model/threat_model_rss_interface.rst rename to atf-20240117-bacca82a8/docs/threat_model/threat_model_rss_interface.rst diff --git a/atf-20231013-0ea67d76a/docs/tools/index.rst b/atf-20240117-bacca82a8/docs/tools/index.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/tools/index.rst rename to atf-20240117-bacca82a8/docs/tools/index.rst diff --git a/atf-20231013-0ea67d76a/docs/tools/memory-layout-tool.rst b/atf-20240117-bacca82a8/docs/tools/memory-layout-tool.rst similarity index 100% rename from atf-20231013-0ea67d76a/docs/tools/memory-layout-tool.rst rename to atf-20240117-bacca82a8/docs/tools/memory-layout-tool.rst diff --git a/atf-20231013-0ea67d76a/drivers/allwinner/axp/axp803.c b/atf-20240117-bacca82a8/drivers/allwinner/axp/axp803.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/allwinner/axp/axp803.c rename to atf-20240117-bacca82a8/drivers/allwinner/axp/axp803.c diff --git a/atf-20231013-0ea67d76a/drivers/allwinner/axp/axp805.c b/atf-20240117-bacca82a8/drivers/allwinner/axp/axp805.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/allwinner/axp/axp805.c rename to atf-20240117-bacca82a8/drivers/allwinner/axp/axp805.c diff --git a/atf-20231013-0ea67d76a/drivers/allwinner/axp/common.c b/atf-20240117-bacca82a8/drivers/allwinner/axp/common.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/allwinner/axp/common.c rename to atf-20240117-bacca82a8/drivers/allwinner/axp/common.c diff --git a/atf-20231013-0ea67d76a/drivers/allwinner/sunxi_msgbox.c b/atf-20240117-bacca82a8/drivers/allwinner/sunxi_msgbox.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/allwinner/sunxi_msgbox.c rename to atf-20240117-bacca82a8/drivers/allwinner/sunxi_msgbox.c diff --git a/atf-20231013-0ea67d76a/drivers/allwinner/sunxi_rsb.c b/atf-20240117-bacca82a8/drivers/allwinner/sunxi_rsb.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/allwinner/sunxi_rsb.c rename to atf-20240117-bacca82a8/drivers/allwinner/sunxi_rsb.c diff --git a/atf-20231013-0ea67d76a/drivers/amlogic/console/aarch64/meson_console.S b/atf-20240117-bacca82a8/drivers/amlogic/console/aarch64/meson_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/amlogic/console/aarch64/meson_console.S rename to atf-20240117-bacca82a8/drivers/amlogic/console/aarch64/meson_console.S diff --git a/atf-20231013-0ea67d76a/drivers/amlogic/crypto/sha_dma.c b/atf-20240117-bacca82a8/drivers/amlogic/crypto/sha_dma.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/amlogic/crypto/sha_dma.c rename to atf-20240117-bacca82a8/drivers/amlogic/crypto/sha_dma.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/cci/cci.c b/atf-20240117-bacca82a8/drivers/arm/cci/cci.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/cci/cci.c rename to atf-20240117-bacca82a8/drivers/arm/cci/cci.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/ccn/ccn.c b/atf-20240117-bacca82a8/drivers/arm/ccn/ccn.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/ccn/ccn.c rename to atf-20240117-bacca82a8/drivers/arm/ccn/ccn.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/ccn/ccn_private.h b/atf-20240117-bacca82a8/drivers/arm/ccn/ccn_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/ccn/ccn_private.h rename to atf-20240117-bacca82a8/drivers/arm/ccn/ccn_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/mhu/css_mhu.c b/atf-20240117-bacca82a8/drivers/arm/css/mhu/css_mhu.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/mhu/css_mhu.c rename to atf-20240117-bacca82a8/drivers/arm/css/mhu/css_mhu.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/mhu/css_mhu_doorbell.c b/atf-20240117-bacca82a8/drivers/arm/css/mhu/css_mhu_doorbell.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/mhu/css_mhu_doorbell.c rename to atf-20240117-bacca82a8/drivers/arm/css/mhu/css_mhu_doorbell.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_ap_core_proto.c b/atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_ap_core_proto.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_ap_core_proto.c rename to atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_ap_core_proto.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_common.c b/atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_common.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_common.c rename to atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_common.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_private.h b/atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_private.h rename to atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c b/atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c rename to atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_pwr_dmn_proto.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_sys_pwr_proto.c b/atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_sys_pwr_proto.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scmi/scmi_sys_pwr_proto.c rename to atf-20240117-bacca82a8/drivers/arm/css/scmi/scmi_sys_pwr_proto.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scmi/vendor/scmi_sq.c b/atf-20240117-bacca82a8/drivers/arm/css/scmi/vendor/scmi_sq.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scmi/vendor/scmi_sq.c rename to atf-20240117-bacca82a8/drivers/arm/css/scmi/vendor/scmi_sq.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scmi/vendor/scmi_sq.h b/atf-20240117-bacca82a8/drivers/arm/css/scmi/vendor/scmi_sq.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scmi/vendor/scmi_sq.h rename to atf-20240117-bacca82a8/drivers/arm/css/scmi/vendor/scmi_sq.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scp/css_bom_bootloader.c b/atf-20240117-bacca82a8/drivers/arm/css/scp/css_bom_bootloader.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scp/css_bom_bootloader.c rename to atf-20240117-bacca82a8/drivers/arm/css/scp/css_bom_bootloader.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scp/css_pm_scmi.c b/atf-20240117-bacca82a8/drivers/arm/css/scp/css_pm_scmi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scp/css_pm_scmi.c rename to atf-20240117-bacca82a8/drivers/arm/css/scp/css_pm_scmi.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scp/css_pm_scpi.c b/atf-20240117-bacca82a8/drivers/arm/css/scp/css_pm_scpi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scp/css_pm_scpi.c rename to atf-20240117-bacca82a8/drivers/arm/css/scp/css_pm_scpi.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scp/css_sds.c b/atf-20240117-bacca82a8/drivers/arm/css/scp/css_sds.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scp/css_sds.c rename to atf-20240117-bacca82a8/drivers/arm/css/scp/css_sds.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/scpi/css_scpi.c b/atf-20240117-bacca82a8/drivers/arm/css/scpi/css_scpi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/scpi/css_scpi.c rename to atf-20240117-bacca82a8/drivers/arm/css/scpi/css_scpi.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/sds/aarch32/sds_helpers.S b/atf-20240117-bacca82a8/drivers/arm/css/sds/aarch32/sds_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/sds/aarch32/sds_helpers.S rename to atf-20240117-bacca82a8/drivers/arm/css/sds/aarch32/sds_helpers.S diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/sds/aarch64/sds_helpers.S b/atf-20240117-bacca82a8/drivers/arm/css/sds/aarch64/sds_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/sds/aarch64/sds_helpers.S rename to atf-20240117-bacca82a8/drivers/arm/css/sds/aarch64/sds_helpers.S diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/sds/sds.c b/atf-20240117-bacca82a8/drivers/arm/css/sds/sds.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/sds/sds.c rename to atf-20240117-bacca82a8/drivers/arm/css/sds/sds.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/css/sds/sds_private.h b/atf-20240117-bacca82a8/drivers/arm/css/sds/sds_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/css/sds/sds_private.h rename to atf-20240117-bacca82a8/drivers/arm/css/sds/sds_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/dcc/dcc_console.c b/atf-20240117-bacca82a8/drivers/arm/dcc/dcc_console.c similarity index 98% rename from atf-20231013-0ea67d76a/drivers/arm/dcc/dcc_console.c rename to atf-20240117-bacca82a8/drivers/arm/dcc/dcc_console.c index d8f9462ae..19c3450b3 100644 --- a/atf-20231013-0ea67d76a/drivers/arm/dcc/dcc_console.c +++ b/atf-20240117-bacca82a8/drivers/arm/dcc/dcc_console.c @@ -137,7 +137,8 @@ static void dcc_console_flush(struct console *console) static struct dcc_console dcc_console = { .console = { .flags = CONSOLE_FLAG_BOOT | - CONSOLE_FLAG_RUNTIME, + CONSOLE_FLAG_RUNTIME | + CONSOLE_FLAG_CRASH, .putc = dcc_console_putc, #if ENABLE_CONSOLE_GETC .getc = dcc_console_getc, diff --git a/atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_big_fw.c b/atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_big_fw.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_big_fw.c rename to atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_big_fw.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_big_fw.h b/atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_big_fw.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_big_fw.h rename to atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_big_fw.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_npu.mk b/atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_npu.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_npu.mk rename to atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_npu.mk diff --git a/atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_smc.c b/atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_smc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/ethosn/ethosn_smc.c rename to atf-20240117-bacca82a8/drivers/arm/ethosn/ethosn_smc.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/fvp/fvp_pwrc.c b/atf-20240117-bacca82a8/drivers/arm/fvp/fvp_pwrc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/fvp/fvp_pwrc.c rename to atf-20240117-bacca82a8/drivers/arm/fvp/fvp_pwrc.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/common/gic_common.c b/atf-20240117-bacca82a8/drivers/arm/gic/common/gic_common.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/common/gic_common.c rename to atf-20240117-bacca82a8/drivers/arm/gic/common/gic_common.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/common/gic_common_private.h b/atf-20240117-bacca82a8/drivers/arm/gic/common/gic_common_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/common/gic_common_private.h rename to atf-20240117-bacca82a8/drivers/arm/gic/common/gic_common_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicdv2_helpers.c b/atf-20240117-bacca82a8/drivers/arm/gic/v2/gicdv2_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicdv2_helpers.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v2/gicdv2_helpers.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2.mk b/atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2.mk rename to atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2.mk diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2_helpers.c b/atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2_helpers.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2_helpers.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2_main.c b/atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2_main.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2_main.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2_main.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2_private.h b/atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v2/gicv2_private.h rename to atf-20240117-bacca82a8/drivers/arm/gic/v2/gicv2_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/arm_gicv3_common.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/arm_gicv3_common.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/arm_gicv3_common.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/arm_gicv3_common.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic-x00.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gic-x00.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic-x00.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gic-x00.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600_multichip.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600_multichip.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600_multichip.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600_multichip.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600_multichip_private.h b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600_multichip_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600_multichip_private.h rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600_multichip_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600ae_fmu.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600ae_fmu.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600ae_fmu.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600ae_fmu.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600ae_fmu_helpers.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600ae_fmu_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gic600ae_fmu_helpers.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gic600ae_fmu_helpers.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicdv3_helpers.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gicdv3_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicdv3_helpers.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gicdv3_helpers.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicrv3_helpers.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gicrv3_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicrv3_helpers.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gicrv3_helpers.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3.mk b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3.mk rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3.mk diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3_helpers.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3_helpers.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3_helpers.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3_main.c b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3_main.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3_main.c rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3_main.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3_private.h b/atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/gic/v3/gicv3_private.h rename to atf-20240117-bacca82a8/drivers/arm/gic/v3/gicv3_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/mhu/mhu_v2_x.c b/atf-20240117-bacca82a8/drivers/arm/mhu/mhu_v2_x.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/mhu/mhu_v2_x.c rename to atf-20240117-bacca82a8/drivers/arm/mhu/mhu_v2_x.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/mhu/mhu_v2_x.h b/atf-20240117-bacca82a8/drivers/arm/mhu/mhu_v2_x.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/mhu/mhu_v2_x.h rename to atf-20240117-bacca82a8/drivers/arm/mhu/mhu_v2_x.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/mhu/mhu_wrapper_v2_x.c b/atf-20240117-bacca82a8/drivers/arm/mhu/mhu_wrapper_v2_x.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/mhu/mhu_wrapper_v2_x.c rename to atf-20240117-bacca82a8/drivers/arm/mhu/mhu_wrapper_v2_x.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/pl011/aarch32/pl011_console.S b/atf-20240117-bacca82a8/drivers/arm/pl011/aarch32/pl011_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/pl011/aarch32/pl011_console.S rename to atf-20240117-bacca82a8/drivers/arm/pl011/aarch32/pl011_console.S diff --git a/atf-20231013-0ea67d76a/drivers/arm/pl011/aarch64/pl011_console.S b/atf-20240117-bacca82a8/drivers/arm/pl011/aarch64/pl011_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/pl011/aarch64/pl011_console.S rename to atf-20240117-bacca82a8/drivers/arm/pl011/aarch64/pl011_console.S diff --git a/atf-20231013-0ea67d76a/drivers/arm/pl061/pl061_gpio.c b/atf-20240117-bacca82a8/drivers/arm/pl061/pl061_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/pl061/pl061_gpio.c rename to atf-20240117-bacca82a8/drivers/arm/pl061/pl061_gpio.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms.c b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms.c rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms.mk b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms.mk rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms.mk diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol.c b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol.c rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol.h b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol.h rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_embed.c b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_embed.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_embed.c rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_embed.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_embed.h b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_embed.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_embed.h rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_embed.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_pointer_access.c b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_pointer_access.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_pointer_access.c rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_pointer_access.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_pointer_access.h b/atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_pointer_access.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/rss/rss_comms_protocol_pointer_access.h rename to atf-20240117-bacca82a8/drivers/arm/rss/rss_comms_protocol_pointer_access.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/sbsa/sbsa.c b/atf-20240117-bacca82a8/drivers/arm/sbsa/sbsa.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/sbsa/sbsa.c rename to atf-20240117-bacca82a8/drivers/arm/sbsa/sbsa.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/scu/scu.c b/atf-20240117-bacca82a8/drivers/arm/scu/scu.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/scu/scu.c rename to atf-20240117-bacca82a8/drivers/arm/scu/scu.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/smmu/smmu_v3.c b/atf-20240117-bacca82a8/drivers/arm/smmu/smmu_v3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/smmu/smmu_v3.c rename to atf-20240117-bacca82a8/drivers/arm/smmu/smmu_v3.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/sp804/sp804_delay_timer.c b/atf-20240117-bacca82a8/drivers/arm/sp804/sp804_delay_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/sp804/sp804_delay_timer.c rename to atf-20240117-bacca82a8/drivers/arm/sp804/sp804_delay_timer.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/sp805/sp805.c b/atf-20240117-bacca82a8/drivers/arm/sp805/sp805.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/sp805/sp805.c rename to atf-20240117-bacca82a8/drivers/arm/sp805/sp805.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/tzc/tzc380.c b/atf-20240117-bacca82a8/drivers/arm/tzc/tzc380.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/tzc/tzc380.c rename to atf-20240117-bacca82a8/drivers/arm/tzc/tzc380.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/tzc/tzc400.c b/atf-20240117-bacca82a8/drivers/arm/tzc/tzc400.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/tzc/tzc400.c rename to atf-20240117-bacca82a8/drivers/arm/tzc/tzc400.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/tzc/tzc_common_private.h b/atf-20240117-bacca82a8/drivers/arm/tzc/tzc_common_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/tzc/tzc_common_private.h rename to atf-20240117-bacca82a8/drivers/arm/tzc/tzc_common_private.h diff --git a/atf-20231013-0ea67d76a/drivers/arm/tzc/tzc_dmc500.c b/atf-20240117-bacca82a8/drivers/arm/tzc/tzc_dmc500.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/tzc/tzc_dmc500.c rename to atf-20240117-bacca82a8/drivers/arm/tzc/tzc_dmc500.c diff --git a/atf-20231013-0ea67d76a/drivers/arm/tzc/tzc_dmc620.c b/atf-20240117-bacca82a8/drivers/arm/tzc/tzc_dmc620.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/arm/tzc/tzc_dmc620.c rename to atf-20240117-bacca82a8/drivers/arm/tzc/tzc_dmc620.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/auth_mod.c b/atf-20240117-bacca82a8/drivers/auth/auth_mod.c similarity index 84% rename from atf-20231013-0ea67d76a/drivers/auth/auth_mod.c rename to atf-20240117-bacca82a8/drivers/auth/auth_mod.c index 1df334c8a..5d50441f2 100644 --- a/atf-20231013-0ea67d76a/drivers/auth/auth_mod.c +++ b/atf-20240117-bacca82a8/drivers/auth/auth_mod.c @@ -25,13 +25,6 @@ /* ASN.1 tags */ #define ASN1_INTEGER 0x02 -#define return_if_error(rc) \ - do { \ - if (rc != 0) { \ - return rc; \ - } \ - } while (0) - #pragma weak plat_set_nv_ctr2 __attribute__((weak)) int mtk_ar_check_consis(uint32_t nv_ctr) @@ -104,24 +97,37 @@ static int auth_hash(const auth_method_param_hash_t *param, { void *data_ptr, *hash_der_ptr; unsigned int data_len, hash_der_len; - int rc = 0; + int rc; /* Get the hash from the parent image. This hash will be DER encoded * and contain the hash algorithm */ rc = auth_get_param(param->hash, img_desc->parent, &hash_der_ptr, &hash_der_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Get the data to be hashed from the current image */ rc = img_parser_get_auth_param(img_desc->img_type, param->data, img, img_len, &data_ptr, &data_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Ask the crypto module to verify this hash */ rc = crypto_mod_verify_hash(data_ptr, data_len, hash_der_ptr, hash_der_len); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } - return rc; + return 0; } /* @@ -158,22 +164,34 @@ static int auth_signature(const auth_method_param_sig_t *param, void *data_ptr, *pk_ptr, *cnv_pk_ptr, *pk_plat_ptr, *sig_ptr, *sig_alg_ptr, *pk_oid; unsigned int data_len, pk_len, cnv_pk_len, pk_plat_len, sig_len, sig_alg_len; unsigned int flags = 0; - int rc = 0; + int rc; /* Get the data to be signed from current image */ rc = img_parser_get_auth_param(img_desc->img_type, param->data, img, img_len, &data_ptr, &data_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Get the signature from current image */ rc = img_parser_get_auth_param(img_desc->img_type, param->sig, img, img_len, &sig_ptr, &sig_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Get the signature algorithm from current image */ rc = img_parser_get_auth_param(img_desc->img_type, param->alg, img, img_len, &sig_alg_ptr, &sig_alg_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Get the public key from the parent. If there is no parent (NULL), * the certificate has been signed with the ROTPK, so we have to get @@ -181,7 +199,11 @@ static int auth_signature(const auth_method_param_sig_t *param, if (img_desc->parent != NULL) { rc = auth_get_param(param->pk, img_desc->parent, &pk_ptr, &pk_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } } else { /* * Root certificates are signed with the ROTPK, so we have to @@ -189,7 +211,11 @@ static int auth_signature(const auth_method_param_sig_t *param, */ rc = plat_get_rotpk_info(param->pk->cookie, &pk_plat_ptr, &pk_plat_len, &flags); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } assert(is_rotpk_flags_valid(flags)); @@ -197,7 +223,11 @@ static int auth_signature(const auth_method_param_sig_t *param, rc = img_parser_get_auth_param(img_desc->img_type, param->pk, img, img_len, &pk_ptr, &pk_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* * Validate the certificate's key against the platform ROTPK. @@ -216,7 +246,11 @@ static int auth_signature(const auth_method_param_sig_t *param, * suffixed or modified pk */ rc = crypto_mod_convert_pk(pk_ptr, pk_len, &cnv_pk_ptr, &cnv_pk_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* * The hash of the certificate's public key must match @@ -224,7 +258,11 @@ static int auth_signature(const auth_method_param_sig_t *param, */ rc = crypto_mod_verify_hash(cnv_pk_ptr, cnv_pk_len, pk_plat_ptr, pk_plat_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } } else { /* Platform supports full ROTPK */ if ((pk_len != pk_plat_len) || @@ -250,7 +288,8 @@ static int auth_signature(const auth_method_param_sig_t *param, */ rc = plat_mboot_measure_key(pk_oid, pk_ptr, pk_len); if (rc != 0) { - WARN("Public Key measurement failure = %d\n", rc); + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); } } @@ -259,8 +298,13 @@ static int auth_signature(const auth_method_param_sig_t *param, sig_ptr, sig_len, sig_alg_ptr, sig_alg_len, pk_ptr, pk_len); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } - return rc; + return 0; } /* @@ -288,14 +332,18 @@ static int auth_nvctr(const auth_method_param_nv_ctr_t *param, void *data_ptr = NULL; unsigned int data_len, len, i; unsigned int plat_nv_ctr; - int rc = 0; + int rc; bool is_trial_run = false; /* Get the counter value from current image. The AM expects the IPM * to return the counter value as a DER encoded integer */ rc = img_parser_get_auth_param(img_desc->img_type, param->cert_nv_ctr, img, img_len, &data_ptr, &data_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Parse the DER encoded integer */ assert(data_ptr); @@ -334,11 +382,19 @@ static int auth_nvctr(const auth_method_param_nv_ctr_t *param, /* Get the counter from the platform */ rc = plat_get_nv_ctr(param->plat_nv_ctr->cookie, &plat_nv_ctr); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Check boot loader anti-rollback version if consistent */ rc = mtk_ar_check_consis(*cert_nv_ctr); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } if (*cert_nv_ctr < plat_nv_ctr) { /* Invalid NV-counter */ @@ -430,7 +486,11 @@ int auth_mod_verify_img(unsigned int img_id, /* Ask the parser to check the image integrity */ rc = img_parser_check_integrity(img_desc->img_type, img_ptr, img_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Authenticate the image using the methods indicated in the image * descriptor. */ @@ -462,7 +522,11 @@ int auth_mod_verify_img(unsigned int img_id, rc = 1; break; } - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } } /* @@ -472,7 +536,11 @@ int auth_mod_verify_img(unsigned int img_id, if (need_nv_ctr_upgrade && sig_auth_done) { rc = plat_set_nv_ctr2(nv_ctr_param->plat_nv_ctr->cookie, img_desc, cert_nv_ctr); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } } /* Extract the parameters indicated in the image descriptor to @@ -487,7 +555,11 @@ int auth_mod_verify_img(unsigned int img_id, rc = img_parser_get_auth_param(img_desc->img_type, img_desc->authenticated_data[i].type_desc, img_ptr, img_len, ¶m_ptr, ¶m_len); - return_if_error(rc); + if (rc != 0) { + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); + return rc; + } /* Check parameter size */ if (param_len > img_desc->authenticated_data[i].data.len) { @@ -508,8 +580,8 @@ int auth_mod_verify_img(unsigned int img_id, param_ptr, param_len); if (rc != 0) { - WARN("Public Key measurement " - "failure = %d\n", rc); + VERBOSE("[TBB] %s():%d failed with error code %d.\n", + __func__, __LINE__, rc); } } } diff --git a/atf-20231013-0ea67d76a/drivers/auth/cca/cot.c b/atf-20240117-bacca82a8/drivers/auth/cca/cot.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/cca/cot.c rename to atf-20240117-bacca82a8/drivers/auth/cca/cot.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/crypto_mod.c b/atf-20240117-bacca82a8/drivers/auth/crypto_mod.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/crypto_mod.c rename to atf-20240117-bacca82a8/drivers/auth/crypto_mod.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/dualroot/cot.c b/atf-20240117-bacca82a8/drivers/auth/dualroot/cot.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/dualroot/cot.c rename to atf-20240117-bacca82a8/drivers/auth/dualroot/cot.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/img_parser_mod.c b/atf-20240117-bacca82a8/drivers/auth/img_parser_mod.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/img_parser_mod.c rename to atf-20240117-bacca82a8/drivers/auth/img_parser_mod.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_common.c b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_common.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_common.c rename to atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_common.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_common.mk b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_common.mk similarity index 86% rename from atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_common.mk rename to atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_common.mk index 9cb52a3b3..d57c85246 100644 --- a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_common.mk +++ b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_common.mk @@ -21,7 +21,8 @@ $(info MBEDTLS_VERSION_MAJOR is [${MBEDTLS_MAJOR}] MBEDTLS_VERSION_MINOR is [${M # Specify mbed TLS configuration file ifeq (${MBEDTLS_MAJOR}, 2) - MBEDTLS_CONFIG_FILE ?= "" + $(info Deprecation Notice: Please migrate to Mbedtls version 3.x (refer to TF-A documentation for the exact version number)) + MBEDTLS_CONFIG_FILE ?= "" else ifeq (${MBEDTLS_MAJOR}, 3) ifeq (${PSA_CRYPTO},1) MBEDTLS_CONFIG_FILE ?= "" @@ -120,11 +121,21 @@ endif ifeq (${TF_MBEDTLS_KEY_SIZE},) ifneq ($(findstring rsa,${TF_MBEDTLS_KEY_ALG}),) - ifeq (${KEY_SIZE},) + ifeq (${KEY_SIZE},) TF_MBEDTLS_KEY_SIZE := 2048 - else + else ifneq ($(filter $(KEY_SIZE), 1024 2048 3072 4096),) TF_MBEDTLS_KEY_SIZE := ${KEY_SIZE} - endif + else + $(error "Invalid value for KEY_SIZE: ${KEY_SIZE}") + endif + else ifneq ($(findstring ecdsa,${TF_MBEDTLS_KEY_ALG}),) + ifeq (${KEY_SIZE},) + TF_MBEDTLS_KEY_SIZE := 256 + else ifneq ($(filter $(KEY_SIZE), 256 384),) + TF_MBEDTLS_KEY_SIZE := ${KEY_SIZE} + else + $(error "Invalid value for KEY_SIZE: ${KEY_SIZE}") + endif endif endif diff --git a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_crypto.c b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_crypto.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_crypto.c rename to atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_crypto.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_crypto.mk b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_crypto.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_crypto.mk rename to atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_crypto.mk diff --git a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_psa_crypto.c b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_psa_crypto.c similarity index 70% rename from atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_psa_crypto.c rename to atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_psa_crypto.c index 2fa8e63ee..5891acf37 100644 --- a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_psa_crypto.c +++ b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_psa_crypto.c @@ -28,6 +28,13 @@ #define LIB_NAME "mbed TLS PSA" +/* Maximum length of R_S pair in the ECDSA signature in bytes */ +#define MAX_ECDSA_R_S_PAIR_LEN 64U + +/* Size of ASN.1 length and tag in bytes*/ +#define SIZE_OF_ASN1_LEN 1U +#define SIZE_OF_ASN1_TAG 1U + #if CRYPTO_SUPPORT == CRYPTO_HASH_CALC_ONLY || \ CRYPTO_SUPPORT == CRYPTO_AUTH_VERIFY_AND_HASH_CALC /* @@ -108,6 +115,7 @@ CRYPTO_SUPPORT == CRYPTO_AUTH_VERIFY_AND_HASH_CALC static void construct_psa_key_alg_and_type(mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, + psa_ecc_family_t psa_ecc_family, psa_algorithm_t *psa_alg, psa_key_type_t *psa_key_type) { @@ -118,6 +126,10 @@ static void construct_psa_key_alg_and_type(mbedtls_pk_type_t pk_alg, *psa_alg = PSA_ALG_RSA_PSS(psa_md_alg); *psa_key_type = PSA_KEY_TYPE_RSA_PUBLIC_KEY; break; + case MBEDTLS_PK_ECDSA: + *psa_alg = PSA_ALG_ECDSA(psa_md_alg); + *psa_key_type = PSA_KEY_TYPE_ECC_PUBLIC_KEY(psa_ecc_family); + break; default: *psa_alg = PSA_ALG_NONE; *psa_key_type = PSA_KEY_TYPE_NONE; @@ -125,6 +137,161 @@ static void construct_psa_key_alg_and_type(mbedtls_pk_type_t pk_alg, } } + +#if TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA || \ +TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA + +/* + * This is a helper function to detect padding byte (if the MSB bit of the + * first data byte is set to 1, for example 0x80) and on detection, ignore the + * padded byte(0x00) and increase the buffer pointer beyond padded byte and + * decrease the length of the buffer by 1. + * + * On Success returns 0, error otherwise. + **/ +static inline int ignore_asn1_int_padding_byte(unsigned char **buf_start, + size_t *buf_len) +{ + unsigned char *local_buf = *buf_start; + + /* Check for negative number */ + if ((local_buf[0] & 0x80U) != 0U) { + return -1; + } + + if ((local_buf[0] == 0U) && (local_buf[1] > 0x7FU) && + (*buf_len > 1U)) { + *buf_start = &local_buf[1]; + (*buf_len)--; + } + + return 0; +} + +/* + * This is a helper function that gets a pointer to the encoded ECDSA publicKey + * and its length (as per RFC5280) and returns corresponding decoded publicKey + * and its length. As well, it retrieves the family of ECC key in the PSA + * format. + * + * This function returns error(CRYPTO_ERR_SIGNATURE) on ASN.1 parsing failure, + * otherwise success(0). + **/ +static int get_ecdsa_pkinfo_from_asn1(unsigned char **pk_start, + unsigned int *pk_len, + psa_ecc_family_t *psa_ecc_family) +{ + mbedtls_asn1_buf alg_oid, alg_params; + mbedtls_ecp_group_id grp_id; + int rc; + unsigned char *pk_end; + size_t len; + size_t curve_bits; + unsigned char *pk_ptr = *pk_start; + + pk_end = pk_ptr + *pk_len; + rc = mbedtls_asn1_get_tag(&pk_ptr, pk_end, &len, + MBEDTLS_ASN1_CONSTRUCTED | + MBEDTLS_ASN1_SEQUENCE); + if (rc != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + pk_end = pk_ptr + len; + rc = mbedtls_asn1_get_alg(&pk_ptr, pk_end, &alg_oid, &alg_params); + if (rc != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + if (alg_params.tag == MBEDTLS_ASN1_OID) { + if (mbedtls_oid_get_ec_grp(&alg_params, &grp_id) != 0) { + return CRYPTO_ERR_SIGNATURE; + } + *psa_ecc_family = mbedtls_ecc_group_to_psa(grp_id, + &curve_bits); + } else { + return CRYPTO_ERR_SIGNATURE; + } + + pk_end = pk_ptr + len - (alg_oid.len + alg_params.len + + 2 * (SIZE_OF_ASN1_LEN + SIZE_OF_ASN1_TAG)); + rc = mbedtls_asn1_get_bitstring_null(&pk_ptr, pk_end, &len); + if (rc != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + *pk_start = pk_ptr; + *pk_len = len; + + return rc; +} + +/* + * Ecdsa-Sig-Value ::= SEQUENCE { + * r INTEGER, + * s INTEGER + * } + * + * This helper function that gets a pointer to the encoded ECDSA signature and + * its length (as per RFC5280) and returns corresponding decoded signature + * (R_S pair) and its size. + * + * This function returns error(CRYPTO_ERR_SIGNATURE) on ASN.1 parsing failure, + * otherwise success(0). + **/ +static int get_ecdsa_signature_from_asn1(unsigned char *sig_ptr, + size_t *sig_len, + unsigned char *r_s_pair) +{ + int rc; + unsigned char *sig_end; + size_t len, r_len, s_len; + + sig_end = sig_ptr + *sig_len; + rc = mbedtls_asn1_get_tag(&sig_ptr, sig_end, &len, + MBEDTLS_ASN1_CONSTRUCTED | + MBEDTLS_ASN1_SEQUENCE); + if (rc != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + sig_end = sig_ptr + len; + rc = mbedtls_asn1_get_tag(&sig_ptr, sig_end, &r_len, + MBEDTLS_ASN1_INTEGER); + if (rc != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + if (ignore_asn1_int_padding_byte(&sig_ptr, &r_len) != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + (void)memcpy((void *)&r_s_pair[0], (const void *)sig_ptr, r_len); + + sig_ptr = sig_ptr + r_len; + sig_end = sig_ptr + len - (r_len + (SIZE_OF_ASN1_LEN + + SIZE_OF_ASN1_TAG)); + rc = mbedtls_asn1_get_tag(&sig_ptr, sig_end, &s_len, + MBEDTLS_ASN1_INTEGER); + if (rc != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + if (ignore_asn1_int_padding_byte(&sig_ptr, &s_len) != 0) { + return CRYPTO_ERR_SIGNATURE; + } + + (void)memcpy((void *)&r_s_pair[r_len], (const void *)sig_ptr, s_len); + + *sig_len = s_len + r_len; + + return 0; +} +#endif /* + * TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA || \ + * TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA + **/ + /* * Verify a signature. * @@ -143,6 +310,10 @@ static int verify_signature(void *data_ptr, unsigned int data_len, int rc; void *sig_opts = NULL; unsigned char *p, *end; + unsigned char *local_sig_ptr; + size_t local_sig_len; + psa_ecc_family_t psa_ecc_family = 0U; + __unused unsigned char reformatted_sig[MAX_ECDSA_R_S_PAIR_LEN] = {0}; /* construct PSA key algo and type */ psa_status_t status = PSA_SUCCESS; @@ -174,10 +345,36 @@ static int verify_signature(void *data_ptr, unsigned int data_len, rc = CRYPTO_ERR_SIGNATURE; goto end2; } - signature.p = p; + + local_sig_ptr = p; + local_sig_len = signature.len; + +#if TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA || \ +TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA + if (pk_alg == MBEDTLS_PK_ECDSA) { + rc = get_ecdsa_signature_from_asn1(local_sig_ptr, + &local_sig_len, + reformatted_sig); + if (rc != 0) { + goto end2; + } + + local_sig_ptr = reformatted_sig; + + rc = get_ecdsa_pkinfo_from_asn1((unsigned char **)&pk_ptr, + &pk_len, + &psa_ecc_family); + if (rc != 0) { + goto end2; + } + } +#endif /* + * TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA || \ + * TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA + **/ /* Convert this pk_alg and md_alg to PSA key type and key algorithm */ - construct_psa_key_alg_and_type(pk_alg, md_alg, + construct_psa_key_alg_and_type(pk_alg, md_alg, psa_ecc_family, &psa_alg, &psa_key_type); @@ -208,7 +405,7 @@ static int verify_signature(void *data_ptr, unsigned int data_len, */ status = psa_verify_message(psa_key_id, psa_alg, data_ptr, data_len, - signature.p, signature.len); + local_sig_ptr, local_sig_len); if (status != PSA_SUCCESS) { rc = CRYPTO_ERR_SIGNATURE; diff --git a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_x509.mk b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_x509.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_x509.mk rename to atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_x509.mk diff --git a/atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_x509_parser.c b/atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_x509_parser.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/mbedtls/mbedtls_x509_parser.c rename to atf-20240117-bacca82a8/drivers/auth/mbedtls/mbedtls_x509_parser.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_bl1.c b/atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_bl1.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_bl1.c rename to atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_bl1.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_bl1_r64.c b/atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_bl1_r64.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_bl1_r64.c rename to atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_bl1_r64.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_bl2.c b/atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_bl2.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_bl2.c rename to atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_bl2.c diff --git a/atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_common.c b/atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_common.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/auth/tbbr/tbbr_cot_common.c rename to atf-20240117-bacca82a8/drivers/auth/tbbr/tbbr_cot_common.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/chimp.c b/atf-20240117-bacca82a8/drivers/brcm/chimp.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/chimp.c rename to atf-20240117-bacca82a8/drivers/brcm/chimp.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_chal_sd.c b/atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_chal_sd.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_chal_sd.c rename to atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_chal_sd.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_csl_sdcard.c b/atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_csl_sdcard.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_csl_sdcard.c rename to atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_csl_sdcard.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_csl_sdcmd.c b/atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_csl_sdcmd.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_csl_sdcmd.c rename to atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_csl_sdcmd.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.c b/atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.c rename to atf-20240117-bacca82a8/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/i2c/i2c.c b/atf-20240117-bacca82a8/drivers/brcm/i2c/i2c.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/i2c/i2c.c rename to atf-20240117-bacca82a8/drivers/brcm/i2c/i2c.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/iproc_gpio.c b/atf-20240117-bacca82a8/drivers/brcm/iproc_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/iproc_gpio.c rename to atf-20240117-bacca82a8/drivers/brcm/iproc_gpio.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/mdio/mdio.c b/atf-20240117-bacca82a8/drivers/brcm/mdio/mdio.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/mdio/mdio.c rename to atf-20240117-bacca82a8/drivers/brcm/mdio/mdio.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/ocotp.c b/atf-20240117-bacca82a8/drivers/brcm/ocotp.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/ocotp.c rename to atf-20240117-bacca82a8/drivers/brcm/ocotp.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/rng.c b/atf-20240117-bacca82a8/drivers/brcm/rng.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/rng.c rename to atf-20240117-bacca82a8/drivers/brcm/rng.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/scp.c b/atf-20240117-bacca82a8/drivers/brcm/scp.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/scp.c rename to atf-20240117-bacca82a8/drivers/brcm/scp.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/sotp.c b/atf-20240117-bacca82a8/drivers/brcm/sotp.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/sotp.c rename to atf-20240117-bacca82a8/drivers/brcm/sotp.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/spi/iproc_qspi.c b/atf-20240117-bacca82a8/drivers/brcm/spi/iproc_qspi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/spi/iproc_qspi.c rename to atf-20240117-bacca82a8/drivers/brcm/spi/iproc_qspi.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/spi/iproc_qspi.h b/atf-20240117-bacca82a8/drivers/brcm/spi/iproc_qspi.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/spi/iproc_qspi.h rename to atf-20240117-bacca82a8/drivers/brcm/spi/iproc_qspi.h diff --git a/atf-20231013-0ea67d76a/drivers/brcm/spi/iproc_spi.c b/atf-20240117-bacca82a8/drivers/brcm/spi/iproc_spi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/spi/iproc_spi.c rename to atf-20240117-bacca82a8/drivers/brcm/spi/iproc_spi.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/spi_flash.c b/atf-20240117-bacca82a8/drivers/brcm/spi_flash.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/spi_flash.c rename to atf-20240117-bacca82a8/drivers/brcm/spi_flash.c diff --git a/atf-20231013-0ea67d76a/drivers/brcm/spi_sf.c b/atf-20240117-bacca82a8/drivers/brcm/spi_sf.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/brcm/spi_sf.c rename to atf-20240117-bacca82a8/drivers/brcm/spi_sf.c diff --git a/atf-20231013-0ea67d76a/drivers/cadence/combo_phy/cdns_combo_phy.c b/atf-20240117-bacca82a8/drivers/cadence/combo_phy/cdns_combo_phy.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/cadence/combo_phy/cdns_combo_phy.c rename to atf-20240117-bacca82a8/drivers/cadence/combo_phy/cdns_combo_phy.c diff --git a/atf-20231013-0ea67d76a/drivers/cadence/emmc/cdns_sdmmc.c b/atf-20240117-bacca82a8/drivers/cadence/emmc/cdns_sdmmc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/cadence/emmc/cdns_sdmmc.c rename to atf-20240117-bacca82a8/drivers/cadence/emmc/cdns_sdmmc.c diff --git a/atf-20231013-0ea67d76a/drivers/cadence/nand/cdns_nand.c b/atf-20240117-bacca82a8/drivers/cadence/nand/cdns_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/cadence/nand/cdns_nand.c rename to atf-20240117-bacca82a8/drivers/cadence/nand/cdns_nand.c diff --git a/atf-20231013-0ea67d76a/drivers/cadence/uart/aarch64/cdns_console.S b/atf-20240117-bacca82a8/drivers/cadence/uart/aarch64/cdns_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/cadence/uart/aarch64/cdns_console.S rename to atf-20240117-bacca82a8/drivers/cadence/uart/aarch64/cdns_console.S diff --git a/atf-20231013-0ea67d76a/drivers/cfi/v2m/v2m_flash.c b/atf-20240117-bacca82a8/drivers/cfi/v2m/v2m_flash.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/cfi/v2m/v2m_flash.c rename to atf-20240117-bacca82a8/drivers/cfi/v2m/v2m_flash.c diff --git a/atf-20231013-0ea67d76a/drivers/clk/clk.c b/atf-20240117-bacca82a8/drivers/clk/clk.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/clk/clk.c rename to atf-20240117-bacca82a8/drivers/clk/clk.c diff --git a/atf-20231013-0ea67d76a/drivers/console/aarch32/skeleton_console.S b/atf-20240117-bacca82a8/drivers/console/aarch32/skeleton_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/console/aarch32/skeleton_console.S rename to atf-20240117-bacca82a8/drivers/console/aarch32/skeleton_console.S diff --git a/atf-20231013-0ea67d76a/drivers/console/aarch64/skeleton_console.S b/atf-20240117-bacca82a8/drivers/console/aarch64/skeleton_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/console/aarch64/skeleton_console.S rename to atf-20240117-bacca82a8/drivers/console/aarch64/skeleton_console.S diff --git a/atf-20231013-0ea67d76a/drivers/console/multi_console.c b/atf-20240117-bacca82a8/drivers/console/multi_console.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/console/multi_console.c rename to atf-20240117-bacca82a8/drivers/console/multi_console.c diff --git a/atf-20231013-0ea67d76a/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S b/atf-20240117-bacca82a8/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S rename to atf-20240117-bacca82a8/drivers/coreboot/cbmem_console/aarch64/cbmem_console.S diff --git a/atf-20231013-0ea67d76a/drivers/delay_timer/delay_timer.c b/atf-20240117-bacca82a8/drivers/delay_timer/delay_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/delay_timer/delay_timer.c rename to atf-20240117-bacca82a8/drivers/delay_timer/delay_timer.c diff --git a/atf-20231013-0ea67d76a/drivers/delay_timer/generic_delay_timer.c b/atf-20240117-bacca82a8/drivers/delay_timer/generic_delay_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/delay_timer/generic_delay_timer.c rename to atf-20240117-bacca82a8/drivers/delay_timer/generic_delay_timer.c diff --git a/atf-20231013-0ea67d76a/drivers/fwu/fwu.c b/atf-20240117-bacca82a8/drivers/fwu/fwu.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/fwu/fwu.c rename to atf-20240117-bacca82a8/drivers/fwu/fwu.c diff --git a/atf-20231013-0ea67d76a/drivers/fwu/fwu.mk b/atf-20240117-bacca82a8/drivers/fwu/fwu.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/fwu/fwu.mk rename to atf-20240117-bacca82a8/drivers/fwu/fwu.mk diff --git a/atf-20231013-0ea67d76a/drivers/gpio/gpio.c b/atf-20240117-bacca82a8/drivers/gpio/gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/gpio/gpio.c rename to atf-20240117-bacca82a8/drivers/gpio/gpio.c diff --git a/atf-20231013-0ea67d76a/drivers/imx/timer/imx_gpt.c b/atf-20240117-bacca82a8/drivers/imx/timer/imx_gpt.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/imx/timer/imx_gpt.c rename to atf-20240117-bacca82a8/drivers/imx/timer/imx_gpt.c diff --git a/atf-20231013-0ea67d76a/drivers/imx/timer/imx_gpt.h b/atf-20240117-bacca82a8/drivers/imx/timer/imx_gpt.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/imx/timer/imx_gpt.h rename to atf-20240117-bacca82a8/drivers/imx/timer/imx_gpt.h diff --git a/atf-20231013-0ea67d76a/drivers/imx/uart/imx_crash_uart.S b/atf-20240117-bacca82a8/drivers/imx/uart/imx_crash_uart.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/imx/uart/imx_crash_uart.S rename to atf-20240117-bacca82a8/drivers/imx/uart/imx_crash_uart.S diff --git a/atf-20231013-0ea67d76a/drivers/imx/uart/imx_uart.c b/atf-20240117-bacca82a8/drivers/imx/uart/imx_uart.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/imx/uart/imx_uart.c rename to atf-20240117-bacca82a8/drivers/imx/uart/imx_uart.c diff --git a/atf-20231013-0ea67d76a/drivers/imx/uart/imx_uart.h b/atf-20240117-bacca82a8/drivers/imx/uart/imx_uart.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/imx/uart/imx_uart.h rename to atf-20240117-bacca82a8/drivers/imx/uart/imx_uart.h diff --git a/atf-20231013-0ea67d76a/drivers/imx/usdhc/imx_usdhc.c b/atf-20240117-bacca82a8/drivers/imx/usdhc/imx_usdhc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/imx/usdhc/imx_usdhc.c rename to atf-20240117-bacca82a8/drivers/imx/usdhc/imx_usdhc.c diff --git a/atf-20231013-0ea67d76a/drivers/imx/usdhc/imx_usdhc.h b/atf-20240117-bacca82a8/drivers/imx/usdhc/imx_usdhc.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/imx/usdhc/imx_usdhc.h rename to atf-20240117-bacca82a8/drivers/imx/usdhc/imx_usdhc.h diff --git a/atf-20231013-0ea67d76a/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c b/atf-20240117-bacca82a8/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c rename to atf-20240117-bacca82a8/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c diff --git a/atf-20231013-0ea67d76a/drivers/io/io_block.c b/atf-20240117-bacca82a8/drivers/io/io_block.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/io_block.c rename to atf-20240117-bacca82a8/drivers/io/io_block.c diff --git a/atf-20231013-0ea67d76a/drivers/io/io_encrypted.c b/atf-20240117-bacca82a8/drivers/io/io_encrypted.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/io_encrypted.c rename to atf-20240117-bacca82a8/drivers/io/io_encrypted.c diff --git a/atf-20231013-0ea67d76a/drivers/io/io_fip.c b/atf-20240117-bacca82a8/drivers/io/io_fip.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/io_fip.c rename to atf-20240117-bacca82a8/drivers/io/io_fip.c diff --git a/atf-20231013-0ea67d76a/drivers/io/io_memmap.c b/atf-20240117-bacca82a8/drivers/io/io_memmap.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/io_memmap.c rename to atf-20240117-bacca82a8/drivers/io/io_memmap.c diff --git a/atf-20231013-0ea67d76a/drivers/io/io_mtd.c b/atf-20240117-bacca82a8/drivers/io/io_mtd.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/io_mtd.c rename to atf-20240117-bacca82a8/drivers/io/io_mtd.c diff --git a/atf-20231013-0ea67d76a/drivers/io/io_semihosting.c b/atf-20240117-bacca82a8/drivers/io/io_semihosting.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/io_semihosting.c rename to atf-20240117-bacca82a8/drivers/io/io_semihosting.c diff --git a/atf-20231013-0ea67d76a/drivers/io/io_storage.c b/atf-20240117-bacca82a8/drivers/io/io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/io_storage.c rename to atf-20240117-bacca82a8/drivers/io/io_storage.c diff --git a/atf-20231013-0ea67d76a/drivers/io/ubi/compat.h b/atf-20240117-bacca82a8/drivers/io/ubi/compat.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/ubi/compat.h rename to atf-20240117-bacca82a8/drivers/io/ubi/compat.h diff --git a/atf-20231013-0ea67d76a/drivers/io/ubi/crc32.c b/atf-20240117-bacca82a8/drivers/io/ubi/crc32.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/ubi/crc32.c rename to atf-20240117-bacca82a8/drivers/io/ubi/crc32.c diff --git a/atf-20231013-0ea67d76a/drivers/io/ubi/io_ubi.c b/atf-20240117-bacca82a8/drivers/io/ubi/io_ubi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/ubi/io_ubi.c rename to atf-20240117-bacca82a8/drivers/io/ubi/io_ubi.c diff --git a/atf-20231013-0ea67d76a/drivers/io/ubi/ubi-media.h b/atf-20240117-bacca82a8/drivers/io/ubi/ubi-media.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/ubi/ubi-media.h rename to atf-20240117-bacca82a8/drivers/io/ubi/ubi-media.h diff --git a/atf-20231013-0ea67d76a/drivers/io/ubi/ubi-wrapper.h b/atf-20240117-bacca82a8/drivers/io/ubi/ubi-wrapper.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/ubi/ubi-wrapper.h rename to atf-20240117-bacca82a8/drivers/io/ubi/ubi-wrapper.h diff --git a/atf-20231013-0ea67d76a/drivers/io/ubi/ubispl.c b/atf-20240117-bacca82a8/drivers/io/ubi/ubispl.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/ubi/ubispl.c rename to atf-20240117-bacca82a8/drivers/io/ubi/ubispl.c diff --git a/atf-20231013-0ea67d76a/drivers/io/ubi/ubispl.h b/atf-20240117-bacca82a8/drivers/io/ubi/ubispl.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/io/ubi/ubispl.h rename to atf-20240117-bacca82a8/drivers/io/ubi/ubispl.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/amb_adec.c b/atf-20240117-bacca82a8/drivers/marvell/amb_adec.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/amb_adec.c rename to atf-20240117-bacca82a8/drivers/marvell/amb_adec.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/ap807_clocks_init.c b/atf-20240117-bacca82a8/drivers/marvell/ap807_clocks_init.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/ap807_clocks_init.c rename to atf-20240117-bacca82a8/drivers/marvell/ap807_clocks_init.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/cache_llc.c b/atf-20240117-bacca82a8/drivers/marvell/cache_llc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/cache_llc.c rename to atf-20240117-bacca82a8/drivers/marvell/cache_llc.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/ccu.c b/atf-20240117-bacca82a8/drivers/marvell/ccu.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/ccu.c rename to atf-20240117-bacca82a8/drivers/marvell/ccu.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy.h b/atf-20240117-bacca82a8/drivers/marvell/comphy.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy.h rename to atf-20240117-bacca82a8/drivers/marvell/comphy.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy/comphy-cp110.h b/atf-20240117-bacca82a8/drivers/marvell/comphy/comphy-cp110.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy/comphy-cp110.h rename to atf-20240117-bacca82a8/drivers/marvell/comphy/comphy-cp110.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-3700.c b/atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-3700.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-3700.c rename to atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-3700.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-3700.h b/atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-3700.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-3700.h rename to atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-3700.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-common.h b/atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-common.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-common.h rename to atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-common.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-cp110.c b/atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-cp110.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-cp110.c rename to atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-cp110.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-cp110.h b/atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-cp110.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-comphy-cp110.h rename to atf-20240117-bacca82a8/drivers/marvell/comphy/phy-comphy-cp110.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-default-porting-layer.h b/atf-20240117-bacca82a8/drivers/marvell/comphy/phy-default-porting-layer.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/comphy/phy-default-porting-layer.h rename to atf-20240117-bacca82a8/drivers/marvell/comphy/phy-default-porting-layer.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/ddr_phy_access.c b/atf-20240117-bacca82a8/drivers/marvell/ddr_phy_access.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/ddr_phy_access.c rename to atf-20240117-bacca82a8/drivers/marvell/ddr_phy_access.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/ddr_phy_access.h b/atf-20240117-bacca82a8/drivers/marvell/ddr_phy_access.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/ddr_phy_access.h rename to atf-20240117-bacca82a8/drivers/marvell/ddr_phy_access.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/gwin.c b/atf-20240117-bacca82a8/drivers/marvell/gwin.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/gwin.c rename to atf-20240117-bacca82a8/drivers/marvell/gwin.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/io_win.c b/atf-20240117-bacca82a8/drivers/marvell/io_win.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/io_win.c rename to atf-20240117-bacca82a8/drivers/marvell/io_win.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/iob.c b/atf-20240117-bacca82a8/drivers/marvell/iob.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/iob.c rename to atf-20240117-bacca82a8/drivers/marvell/iob.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mc_trustzone/mc_trustzone.c b/atf-20240117-bacca82a8/drivers/marvell/mc_trustzone/mc_trustzone.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mc_trustzone/mc_trustzone.c rename to atf-20240117-bacca82a8/drivers/marvell/mc_trustzone/mc_trustzone.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mc_trustzone/mc_trustzone.h b/atf-20240117-bacca82a8/drivers/marvell/mc_trustzone/mc_trustzone.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mc_trustzone/mc_trustzone.h rename to atf-20240117-bacca82a8/drivers/marvell/mc_trustzone/mc_trustzone.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mci.c b/atf-20240117-bacca82a8/drivers/marvell/mci.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mci.c rename to atf-20240117-bacca82a8/drivers/marvell/mci.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mg_conf_cm3/mg_conf_cm3.c b/atf-20240117-bacca82a8/drivers/marvell/mg_conf_cm3/mg_conf_cm3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mg_conf_cm3/mg_conf_cm3.c rename to atf-20240117-bacca82a8/drivers/marvell/mg_conf_cm3/mg_conf_cm3.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mg_conf_cm3/mg_conf_cm3.h b/atf-20240117-bacca82a8/drivers/marvell/mg_conf_cm3/mg_conf_cm3.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mg_conf_cm3/mg_conf_cm3.h rename to atf-20240117-bacca82a8/drivers/marvell/mg_conf_cm3/mg_conf_cm3.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mochi/ap807_setup.c b/atf-20240117-bacca82a8/drivers/marvell/mochi/ap807_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mochi/ap807_setup.c rename to atf-20240117-bacca82a8/drivers/marvell/mochi/ap807_setup.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mochi/apn806_setup.c b/atf-20240117-bacca82a8/drivers/marvell/mochi/apn806_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mochi/apn806_setup.c rename to atf-20240117-bacca82a8/drivers/marvell/mochi/apn806_setup.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/mochi/cp110_setup.c b/atf-20240117-bacca82a8/drivers/marvell/mochi/cp110_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/mochi/cp110_setup.c rename to atf-20240117-bacca82a8/drivers/marvell/mochi/cp110_setup.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/secure_dfx_access/armada_thermal.c b/atf-20240117-bacca82a8/drivers/marvell/secure_dfx_access/armada_thermal.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/secure_dfx_access/armada_thermal.c rename to atf-20240117-bacca82a8/drivers/marvell/secure_dfx_access/armada_thermal.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/secure_dfx_access/dfx.h b/atf-20240117-bacca82a8/drivers/marvell/secure_dfx_access/dfx.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/secure_dfx_access/dfx.h rename to atf-20240117-bacca82a8/drivers/marvell/secure_dfx_access/dfx.h diff --git a/atf-20231013-0ea67d76a/drivers/marvell/secure_dfx_access/misc_dfx.c b/atf-20240117-bacca82a8/drivers/marvell/secure_dfx_access/misc_dfx.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/secure_dfx_access/misc_dfx.c rename to atf-20240117-bacca82a8/drivers/marvell/secure_dfx_access/misc_dfx.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/thermal.c b/atf-20240117-bacca82a8/drivers/marvell/thermal.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/thermal.c rename to atf-20240117-bacca82a8/drivers/marvell/thermal.c diff --git a/atf-20231013-0ea67d76a/drivers/marvell/uart/a3700_console.S b/atf-20240117-bacca82a8/drivers/marvell/uart/a3700_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/marvell/uart/a3700_console.S rename to atf-20240117-bacca82a8/drivers/marvell/uart/a3700_console.S diff --git a/atf-20231013-0ea67d76a/drivers/measured_boot/event_log/event_log.c b/atf-20240117-bacca82a8/drivers/measured_boot/event_log/event_log.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/measured_boot/event_log/event_log.c rename to atf-20240117-bacca82a8/drivers/measured_boot/event_log/event_log.c diff --git a/atf-20231013-0ea67d76a/drivers/measured_boot/event_log/event_log.mk b/atf-20240117-bacca82a8/drivers/measured_boot/event_log/event_log.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/measured_boot/event_log/event_log.mk rename to atf-20240117-bacca82a8/drivers/measured_boot/event_log/event_log.mk diff --git a/atf-20231013-0ea67d76a/drivers/measured_boot/event_log/event_print.c b/atf-20240117-bacca82a8/drivers/measured_boot/event_log/event_print.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/measured_boot/event_log/event_print.c rename to atf-20240117-bacca82a8/drivers/measured_boot/event_log/event_print.c diff --git a/atf-20231013-0ea67d76a/drivers/measured_boot/rss/rss_measured_boot.c b/atf-20240117-bacca82a8/drivers/measured_boot/rss/rss_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/measured_boot/rss/rss_measured_boot.c rename to atf-20240117-bacca82a8/drivers/measured_boot/rss/rss_measured_boot.c diff --git a/atf-20231013-0ea67d76a/drivers/measured_boot/rss/rss_measured_boot.mk b/atf-20240117-bacca82a8/drivers/measured_boot/rss/rss_measured_boot.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/measured_boot/rss/rss_measured_boot.mk rename to atf-20240117-bacca82a8/drivers/measured_boot/rss/rss_measured_boot.mk diff --git a/atf-20231013-0ea67d76a/drivers/mentor/i2c/mi2cv.c b/atf-20240117-bacca82a8/drivers/mentor/i2c/mi2cv.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/mentor/i2c/mi2cv.c rename to atf-20240117-bacca82a8/drivers/mentor/i2c/mi2cv.c diff --git a/atf-20231013-0ea67d76a/drivers/mmc/mmc.c b/atf-20240117-bacca82a8/drivers/mmc/mmc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/mmc/mmc.c rename to atf-20240117-bacca82a8/drivers/mmc/mmc.c diff --git a/atf-20231013-0ea67d76a/drivers/mtd/nand/core.c b/atf-20240117-bacca82a8/drivers/mtd/nand/core.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/mtd/nand/core.c rename to atf-20240117-bacca82a8/drivers/mtd/nand/core.c diff --git a/atf-20231013-0ea67d76a/drivers/mtd/nand/raw_nand.c b/atf-20240117-bacca82a8/drivers/mtd/nand/raw_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/mtd/nand/raw_nand.c rename to atf-20240117-bacca82a8/drivers/mtd/nand/raw_nand.c diff --git a/atf-20231013-0ea67d76a/drivers/mtd/nand/spi_nand.c b/atf-20240117-bacca82a8/drivers/mtd/nand/spi_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/mtd/nand/spi_nand.c rename to atf-20240117-bacca82a8/drivers/mtd/nand/spi_nand.c diff --git a/atf-20231013-0ea67d76a/drivers/mtd/nor/spi_nor.c b/atf-20240117-bacca82a8/drivers/mtd/nor/spi_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/mtd/nor/spi_nor.c rename to atf-20240117-bacca82a8/drivers/mtd/nor/spi_nor.c diff --git a/atf-20231013-0ea67d76a/drivers/mtd/spi-mem/spi_mem.c b/atf-20240117-bacca82a8/drivers/mtd/spi-mem/spi_mem.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/mtd/spi-mem/spi_mem.c rename to atf-20240117-bacca82a8/drivers/mtd/spi-mem/spi_mem.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/cot.c b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/cot.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/cot.c rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/cot.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/csf_hdr_parser.c b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/csf_hdr_parser.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/csf_hdr_parser.c rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/csf_hdr_parser.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch2 b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch2 similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch2 rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch2 diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3 b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3 similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3 rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3 diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3_2 b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3_2 similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3_2 rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_bl2_ch3_2 diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_blx_ch2 b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_blx_ch2 similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_blx_ch2 rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_blx_ch2 diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_blx_ch3 b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_blx_ch3 similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_blx_ch3 rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_blx_ch3 diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3 b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3 similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3 rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3 diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3_2 b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3_2 similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3_2 rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/input_pbi_ch3_2 diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/plat_img_parser.c b/atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/plat_img_parser.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/csf_hdr_parser/plat_img_parser.c rename to atf-20240117-bacca82a8/drivers/nxp/auth/csf_hdr_parser/plat_img_parser.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/auth/tbbr/tbbr_cot.c b/atf-20240117-bacca82a8/drivers/nxp/auth/tbbr/tbbr_cot.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/auth/tbbr/tbbr_cot.c rename to atf-20240117-bacca82a8/drivers/nxp/auth/tbbr/tbbr_cot.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/console/16550_console.S b/atf-20240117-bacca82a8/drivers/nxp/console/16550_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/console/16550_console.S rename to atf-20240117-bacca82a8/drivers/nxp/console/16550_console.S diff --git a/atf-20231013-0ea67d76a/drivers/nxp/console/console.mk b/atf-20240117-bacca82a8/drivers/nxp/console/console.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/console/console.mk rename to atf-20240117-bacca82a8/drivers/nxp/console/console.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/console/console_16550.c b/atf-20240117-bacca82a8/drivers/nxp/console/console_16550.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/console/console_16550.c rename to atf-20240117-bacca82a8/drivers/nxp/console/console_16550.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/console/console_pl011.c b/atf-20240117-bacca82a8/drivers/nxp/console/console_pl011.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/console/console_pl011.c rename to atf-20240117-bacca82a8/drivers/nxp/console/console_pl011.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/caam.mk b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/caam.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/caam.mk rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/caam.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/auth.mk b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/auth.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/auth.mk rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/auth.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/hash.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/hash.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/hash.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/hash.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/nxp_crypto.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/nxp_crypto.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/nxp_crypto.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/nxp_crypto.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/rsa.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/rsa.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/auth/rsa.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/auth/rsa.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/caam.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/caam.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/caam.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/caam.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/hw_key_blob.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/hw_key_blob.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/hw_key_blob.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/hw_key_blob.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/jobdesc.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/jobdesc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/jobdesc.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/jobdesc.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/rng.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/rng.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/rng.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/rng.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/sec_hw_specific.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/sec_hw_specific.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/sec_hw_specific.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/sec_hw_specific.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/sec_jr_driver.c b/atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/sec_jr_driver.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/crypto/caam/src/sec_jr_driver.c rename to atf-20240117-bacca82a8/drivers/nxp/crypto/caam/src/sec_jr_driver.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/csu/csu.c b/atf-20240117-bacca82a8/drivers/nxp/csu/csu.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/csu/csu.c rename to atf-20240117-bacca82a8/drivers/nxp/csu/csu.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/csu/csu.mk b/atf-20240117-bacca82a8/drivers/nxp/csu/csu.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/csu/csu.mk rename to atf-20240117-bacca82a8/drivers/nxp/csu/csu.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/dcfg/dcfg.c b/atf-20240117-bacca82a8/drivers/nxp/dcfg/dcfg.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/dcfg/dcfg.c rename to atf-20240117-bacca82a8/drivers/nxp/dcfg/dcfg.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/dcfg/dcfg.mk b/atf-20240117-bacca82a8/drivers/nxp/dcfg/dcfg.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/dcfg/dcfg.mk rename to atf-20240117-bacca82a8/drivers/nxp/dcfg/dcfg.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/fsl-mmdc/ddr.mk b/atf-20240117-bacca82a8/drivers/nxp/ddr/fsl-mmdc/ddr.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/fsl-mmdc/ddr.mk rename to atf-20240117-bacca82a8/drivers/nxp/ddr/fsl-mmdc/ddr.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/README.odt b/atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/README.odt similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/README.odt rename to atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/README.odt diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/ddr.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/ddr.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/ddr.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/ddr.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/ddr.mk b/atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/ddr.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/ddr.mk rename to atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/ddr.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/ddrc.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/ddrc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/ddrc.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/ddrc.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/dimm.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/dimm.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/dimm.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/dimm.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/regs.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/regs.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/regs.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/regs.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/utility.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/utility.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/nxp-ddr/utility.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/nxp-ddr/utility.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen1/phy.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen1/phy.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen1/phy.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen1/phy.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/csr.h b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/csr.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/csr.h rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/csr.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/ddr4fw.h b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/ddr4fw.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/ddr4fw.h rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/ddr4fw.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/ddrphy.mk b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/ddrphy.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/ddrphy.mk rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/ddrphy.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/input.h b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/input.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/input.h rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/input.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/messages.h b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/messages.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/messages.h rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/messages.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/phy.c b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/phy.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/phy.c rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/phy.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/phy.h b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/phy.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/phy.h rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/phy.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/pie.h b/atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/pie.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ddr/phy-gen2/pie.h rename to atf-20240117-bacca82a8/drivers/nxp/ddr/phy-gen2/pie.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/drivers.mk b/atf-20240117-bacca82a8/drivers/nxp/drivers.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/drivers.mk rename to atf-20240117-bacca82a8/drivers/nxp/drivers.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/flexspi_nor.c b/atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/flexspi_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/flexspi_nor.c rename to atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/flexspi_nor.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/flexspi_nor.h b/atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/flexspi_nor.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/flexspi_nor.h rename to atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/flexspi_nor.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/flexspi_nor.mk b/atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/flexspi_nor.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/flexspi_nor.mk rename to atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/flexspi_nor.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/fspi.c b/atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/fspi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/fspi.c rename to atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/fspi.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/fspi.h b/atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/fspi.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/fspi.h rename to atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/fspi.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/test_fspi.c b/atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/test_fspi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/flexspi/nor/test_fspi.c rename to atf-20240117-bacca82a8/drivers/nxp/flexspi/nor/test_fspi.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/gic/gic.mk b/atf-20240117-bacca82a8/drivers/nxp/gic/gic.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/gic/gic.mk rename to atf-20240117-bacca82a8/drivers/nxp/gic/gic.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/gic/ls_gicv2.c b/atf-20240117-bacca82a8/drivers/nxp/gic/ls_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/gic/ls_gicv2.c rename to atf-20240117-bacca82a8/drivers/nxp/gic/ls_gicv2.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/gic/ls_gicv3.c b/atf-20240117-bacca82a8/drivers/nxp/gic/ls_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/gic/ls_gicv3.c rename to atf-20240117-bacca82a8/drivers/nxp/gic/ls_gicv3.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/gpio/gpio.mk b/atf-20240117-bacca82a8/drivers/nxp/gpio/gpio.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/gpio/gpio.mk rename to atf-20240117-bacca82a8/drivers/nxp/gpio/gpio.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/gpio/nxp_gpio.c b/atf-20240117-bacca82a8/drivers/nxp/gpio/nxp_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/gpio/nxp_gpio.c rename to atf-20240117-bacca82a8/drivers/nxp/gpio/nxp_gpio.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/i2c/i2c.c b/atf-20240117-bacca82a8/drivers/nxp/i2c/i2c.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/i2c/i2c.c rename to atf-20240117-bacca82a8/drivers/nxp/i2c/i2c.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/i2c/i2c.mk b/atf-20240117-bacca82a8/drivers/nxp/i2c/i2c.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/i2c/i2c.mk rename to atf-20240117-bacca82a8/drivers/nxp/i2c/i2c.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ifc/nand/ifc.h b/atf-20240117-bacca82a8/drivers/nxp/ifc/nand/ifc.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ifc/nand/ifc.h rename to atf-20240117-bacca82a8/drivers/nxp/ifc/nand/ifc.h diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ifc/nand/ifc_nand.c b/atf-20240117-bacca82a8/drivers/nxp/ifc/nand/ifc_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ifc/nand/ifc_nand.c rename to atf-20240117-bacca82a8/drivers/nxp/ifc/nand/ifc_nand.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ifc/nand/ifc_nand.mk b/atf-20240117-bacca82a8/drivers/nxp/ifc/nand/ifc_nand.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ifc/nand/ifc_nand.mk rename to atf-20240117-bacca82a8/drivers/nxp/ifc/nand/ifc_nand.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ifc/nor/ifc_nor.c b/atf-20240117-bacca82a8/drivers/nxp/ifc/nor/ifc_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ifc/nor/ifc_nor.c rename to atf-20240117-bacca82a8/drivers/nxp/ifc/nor/ifc_nor.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/ifc/nor/ifc_nor.mk b/atf-20240117-bacca82a8/drivers/nxp/ifc/nor/ifc_nor.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/ifc/nor/ifc_nor.mk rename to atf-20240117-bacca82a8/drivers/nxp/ifc/nor/ifc_nor.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/interconnect/interconnect.mk b/atf-20240117-bacca82a8/drivers/nxp/interconnect/interconnect.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/interconnect/interconnect.mk rename to atf-20240117-bacca82a8/drivers/nxp/interconnect/interconnect.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/interconnect/ls_cci.c b/atf-20240117-bacca82a8/drivers/nxp/interconnect/ls_cci.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/interconnect/ls_cci.c rename to atf-20240117-bacca82a8/drivers/nxp/interconnect/ls_cci.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/interconnect/ls_ccn.c b/atf-20240117-bacca82a8/drivers/nxp/interconnect/ls_ccn.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/interconnect/ls_ccn.c rename to atf-20240117-bacca82a8/drivers/nxp/interconnect/ls_ccn.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/pmu/pmu.c b/atf-20240117-bacca82a8/drivers/nxp/pmu/pmu.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/pmu/pmu.c rename to atf-20240117-bacca82a8/drivers/nxp/pmu/pmu.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/pmu/pmu.mk b/atf-20240117-bacca82a8/drivers/nxp/pmu/pmu.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/pmu/pmu.mk rename to atf-20240117-bacca82a8/drivers/nxp/pmu/pmu.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/qspi/qspi.c b/atf-20240117-bacca82a8/drivers/nxp/qspi/qspi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/qspi/qspi.c rename to atf-20240117-bacca82a8/drivers/nxp/qspi/qspi.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/qspi/qspi.mk b/atf-20240117-bacca82a8/drivers/nxp/qspi/qspi.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/qspi/qspi.mk rename to atf-20240117-bacca82a8/drivers/nxp/qspi/qspi.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/sd/sd_mmc.c b/atf-20240117-bacca82a8/drivers/nxp/sd/sd_mmc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/sd/sd_mmc.c rename to atf-20240117-bacca82a8/drivers/nxp/sd/sd_mmc.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/sd/sd_mmc.mk b/atf-20240117-bacca82a8/drivers/nxp/sd/sd_mmc.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/sd/sd_mmc.mk rename to atf-20240117-bacca82a8/drivers/nxp/sd/sd_mmc.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/sec_mon/sec_mon.mk b/atf-20240117-bacca82a8/drivers/nxp/sec_mon/sec_mon.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/sec_mon/sec_mon.mk rename to atf-20240117-bacca82a8/drivers/nxp/sec_mon/sec_mon.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/sec_mon/snvs.c b/atf-20240117-bacca82a8/drivers/nxp/sec_mon/snvs.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/sec_mon/snvs.c rename to atf-20240117-bacca82a8/drivers/nxp/sec_mon/snvs.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/sfp/fuse_prov.c b/atf-20240117-bacca82a8/drivers/nxp/sfp/fuse_prov.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/sfp/fuse_prov.c rename to atf-20240117-bacca82a8/drivers/nxp/sfp/fuse_prov.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/sfp/sfp.c b/atf-20240117-bacca82a8/drivers/nxp/sfp/sfp.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/sfp/sfp.c rename to atf-20240117-bacca82a8/drivers/nxp/sfp/sfp.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/sfp/sfp.mk b/atf-20240117-bacca82a8/drivers/nxp/sfp/sfp.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/sfp/sfp.mk rename to atf-20240117-bacca82a8/drivers/nxp/sfp/sfp.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/timer/nxp_timer.c b/atf-20240117-bacca82a8/drivers/nxp/timer/nxp_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/timer/nxp_timer.c rename to atf-20240117-bacca82a8/drivers/nxp/timer/nxp_timer.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/timer/timer.mk b/atf-20240117-bacca82a8/drivers/nxp/timer/timer.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/timer/timer.mk rename to atf-20240117-bacca82a8/drivers/nxp/timer/timer.mk diff --git a/atf-20231013-0ea67d76a/drivers/nxp/trdc/imx_trdc.c b/atf-20240117-bacca82a8/drivers/nxp/trdc/imx_trdc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/trdc/imx_trdc.c rename to atf-20240117-bacca82a8/drivers/nxp/trdc/imx_trdc.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/tzc/plat_tzc380.c b/atf-20240117-bacca82a8/drivers/nxp/tzc/plat_tzc380.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/tzc/plat_tzc380.c rename to atf-20240117-bacca82a8/drivers/nxp/tzc/plat_tzc380.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/tzc/plat_tzc400.c b/atf-20240117-bacca82a8/drivers/nxp/tzc/plat_tzc400.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/tzc/plat_tzc400.c rename to atf-20240117-bacca82a8/drivers/nxp/tzc/plat_tzc400.c diff --git a/atf-20231013-0ea67d76a/drivers/nxp/tzc/tzc.mk b/atf-20240117-bacca82a8/drivers/nxp/tzc/tzc.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/nxp/tzc/tzc.mk rename to atf-20240117-bacca82a8/drivers/nxp/tzc/tzc.mk diff --git a/atf-20231013-0ea67d76a/drivers/partition/gpt.c b/atf-20240117-bacca82a8/drivers/partition/gpt.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/partition/gpt.c rename to atf-20240117-bacca82a8/drivers/partition/gpt.c diff --git a/atf-20240117-bacca82a8/drivers/partition/partition.c b/atf-20240117-bacca82a8/drivers/partition/partition.c new file mode 100644 index 000000000..1436ddd3b --- /dev/null +++ b/atf-20240117-bacca82a8/drivers/partition/partition.c @@ -0,0 +1,486 @@ +/* + * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static uint8_t mbr_sector[PLAT_PARTITION_BLOCK_SIZE]; +static partition_entry_list_t list; + +#if LOG_LEVEL >= LOG_LEVEL_VERBOSE +static void dump_entries(int num) +{ + char name[EFI_NAMELEN]; + int i, j, len; + + VERBOSE("Partition table with %d entries:\n", num); + for (i = 0; i < num; i++) { + len = snprintf(name, EFI_NAMELEN, "%s", list.list[i].name); + for (j = 0; j < EFI_NAMELEN - len - 1; j++) { + name[len + j] = ' '; + } + name[EFI_NAMELEN - 1] = '\0'; + VERBOSE("%d: %s %" PRIx64 "-%" PRIx64 "\n", i + 1, name, list.list[i].start, + list.list[i].start + list.list[i].length - 4); + } +} +#else +#define dump_entries(num) ((void)num) +#endif + +#pragma weak plat_patch_mbr_header + +void plat_patch_mbr_header(void *mbr) +{ +} + +/* + * Load the first sector that carries MBR header. + * The MBR boot signature should be always valid whether it's MBR or GPT. + */ +static int load_mbr_header(uintptr_t image_handle, mbr_entry_t *mbr_entry) +{ + size_t bytes_read; + int result; + mbr_entry_t *tmp; + + assert(mbr_entry != NULL); + /* MBR partition table is in LBA0. */ + result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); + if (result != 0) { + VERBOSE("Failed to seek (%i)\n", result); + return result; + } + result = io_read(image_handle, (uintptr_t)&mbr_sector, + PLAT_PARTITION_BLOCK_SIZE, &bytes_read); + if ((result != 0) || (bytes_read != PLAT_PARTITION_BLOCK_SIZE)) { + VERBOSE("Failed to read data (%i)\n", result); + return result; + } + + plat_patch_mbr_header(mbr_sector); + + /* Check MBR boot signature. */ + if ((mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 2] != MBR_SIGNATURE_FIRST) || + (mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 1] != MBR_SIGNATURE_SECOND)) { + VERBOSE("MBR boot signature failure\n"); + return -ENOENT; + } + + tmp = (mbr_entry_t *)(&mbr_sector[MBR_PRIMARY_ENTRY_OFFSET]); + + if (tmp->first_lba != 1) { + VERBOSE("MBR header may have an invalid first LBA\n"); + return -EINVAL; + } + + if ((tmp->sector_nums == 0) || (tmp->sector_nums == UINT32_MAX)) { + VERBOSE("MBR header entry has an invalid number of sectors\n"); + return -EINVAL; + } + + memcpy(mbr_entry, tmp, sizeof(mbr_entry_t)); + return 0; +} + +/* + * Load GPT header and check the GPT signature and header CRC. + * If partition numbers could be found, check & update it. + */ +static int load_gpt_header(uintptr_t image_handle, size_t header_offset, + unsigned long long *part_lba) +{ + gpt_header_t header; + size_t bytes_read; + int result; + uint32_t header_crc, calc_crc; + + result = io_seek(image_handle, IO_SEEK_SET, header_offset); + if (result != 0) { + VERBOSE("Failed to seek into the GPT image at offset (%zu)\n", + header_offset); + return result; + } + result = io_read(image_handle, (uintptr_t)&header, + sizeof(gpt_header_t), &bytes_read); + if ((result != 0) || (sizeof(gpt_header_t) != bytes_read)) { + VERBOSE("GPT header read error(%i) or read mismatch occurred," + "expected(%zu) and actual(%zu)\n", result, + sizeof(gpt_header_t), bytes_read); + return result; + } + if (memcmp(header.signature, GPT_SIGNATURE, + sizeof(header.signature)) != 0) { + VERBOSE("GPT header signature failure\n"); + return -EINVAL; + } + + /* + * UEFI Spec 2.8 March 2019 Page 119: HeaderCRC32 value is + * computed by setting this field to 0, and computing the + * 32-bit CRC for HeaderSize bytes. + */ + header_crc = header.header_crc; + header.header_crc = 0U; + + calc_crc = tf_crc32(0U, (uint8_t *)&header, sizeof(gpt_header_t)); + if (header_crc != calc_crc) { + ERROR("Invalid GPT Header CRC: Expected 0x%x but got 0x%x.\n", + header_crc, calc_crc); + return -EINVAL; + } + + header.header_crc = header_crc; + + /* partition numbers can't exceed PLAT_PARTITION_MAX_ENTRIES */ + list.entry_count = header.list_num; + if (list.entry_count > PLAT_PARTITION_MAX_ENTRIES) { + list.entry_count = PLAT_PARTITION_MAX_ENTRIES; + } + + *part_lba = header.part_lba; + return 0; +} + +/* + * Load a single MBR entry based on details from MBR header. + */ +static int load_mbr_entry(uintptr_t image_handle, mbr_entry_t *mbr_entry, + int part_number) +{ + size_t bytes_read; + uintptr_t offset; + int result; + + assert(mbr_entry != NULL); + /* MBR partition table is in LBA0. */ + result = io_seek(image_handle, IO_SEEK_SET, MBR_OFFSET); + if (result != 0) { + VERBOSE("Failed to seek (%i)\n", result); + return result; + } + result = io_read(image_handle, (uintptr_t)&mbr_sector, + PLAT_PARTITION_BLOCK_SIZE, &bytes_read); + if (result != 0) { + VERBOSE("Failed to read data (%i)\n", result); + return result; + } + + /* Check MBR boot signature. */ + if ((mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 2] != MBR_SIGNATURE_FIRST) || + (mbr_sector[LEGACY_PARTITION_BLOCK_SIZE - 1] != MBR_SIGNATURE_SECOND)) { + VERBOSE("MBR Entry boot signature failure\n"); + return -ENOENT; + } + offset = (uintptr_t)&mbr_sector + + MBR_PRIMARY_ENTRY_OFFSET + + MBR_PRIMARY_ENTRY_SIZE * part_number; + memcpy(mbr_entry, (void *)offset, sizeof(mbr_entry_t)); + + return 0; +} + +/* + * Load MBR entries based on max number of partition entries. + */ +static int load_mbr_entries(uintptr_t image_handle) +{ + mbr_entry_t mbr_entry; + int i; + + list.entry_count = MBR_PRIMARY_ENTRY_NUMBER; + + for (i = 0; i < list.entry_count; i++) { + load_mbr_entry(image_handle, &mbr_entry, i); + list.list[i].start = mbr_entry.first_lba * 512; + list.list[i].length = mbr_entry.sector_nums * 512; + list.list[i].name[0] = mbr_entry.type; + } + + return 0; +} + +/* + * Try to read and load a single GPT entry. + */ +static int load_gpt_entry(uintptr_t image_handle, gpt_entry_t *entry) +{ + size_t bytes_read = 0U; + int result; + + assert(entry != NULL); + result = io_read(image_handle, (uintptr_t)entry, sizeof(gpt_entry_t), + &bytes_read); + if ((result != 0) || (sizeof(gpt_entry_t) != bytes_read)) { + VERBOSE("GPT Entry read error(%i) or read mismatch occurred," + "expected(%zu) and actual(%zu)\n", result, + sizeof(gpt_entry_t), bytes_read); + return -EINVAL; + } + + return result; +} + +/* + * Retrieve each entry in the partition table, parse the data from each + * entry and store them in the list of partition table entries. + */ +static int load_partition_gpt(uintptr_t image_handle, + unsigned long long part_lba) +{ + const signed long long gpt_entry_offset = LBA(part_lba); + gpt_entry_t entry; + int result, i; + + result = io_seek(image_handle, IO_SEEK_SET, gpt_entry_offset); + if (result != 0) { + VERBOSE("Failed to seek (%i), Failed loading GPT partition" + "table entries\n", result); + return result; + } + + for (i = 0; i < list.entry_count; i++) { + result = load_gpt_entry(image_handle, &entry); + if (result != 0) { + VERBOSE("Failed to load gpt entry data(%i) error is (%i)\n", + i, result); + return result; + } + + result = parse_gpt_entry(&entry, &list.list[i]); + if (result != 0) { + break; + } + } + if (i == 0) { + VERBOSE("No Valid GPT Entries found\n"); + return -EINVAL; + } + /* + * Only records the valid partition number that is loaded from + * partition table. + */ + list.entry_count = i; + dump_entries(list.entry_count); + + return 0; +} + +/* + * Try retrieving and parsing the backup-GPT header and backup GPT entries. + * Last 33 blocks contains the backup-GPT entries and header. + */ +static int load_backup_gpt(unsigned int image_id, unsigned int sector_nums) +{ + int result; + unsigned long long part_lba = 0; + size_t gpt_header_offset; + uintptr_t dev_handle, image_spec, image_handle; + io_block_spec_t *block_spec; + int part_num_entries; + + result = plat_get_image_source(image_id, &dev_handle, &image_spec); + if (result != 0) { + VERBOSE("Failed to obtain reference to image id=%u (%i)\n", + image_id, result); + return result; + } + + block_spec = (io_block_spec_t *)image_spec; + /* + * We need to read 32 blocks of GPT entries and one block of GPT header + * try mapping only last 33 last blocks from the image to read the + * Backup-GPT header and its entries. + */ + part_num_entries = (PLAT_PARTITION_MAX_ENTRIES / 4); + /* Move the offset base to LBA-33 */ + block_spec->offset += LBA(sector_nums - part_num_entries); + /* + * Set length as LBA-33, 32 blocks of backup-GPT entries and one + * block of backup-GPT header. + */ + block_spec->length = LBA(part_num_entries + 1); + + result = io_open(dev_handle, image_spec, &image_handle); + if (result != 0) { + VERBOSE("Failed to access image id (%i)\n", result); + return result; + } + + INFO("Trying to retrieve back-up GPT header\n"); + /* Last block is backup-GPT header, after the end of GPT entries */ + gpt_header_offset = LBA(part_num_entries); + result = load_gpt_header(image_handle, gpt_header_offset, &part_lba); + if ((result != 0) || (part_lba == 0)) { + ERROR("Failed to retrieve Backup GPT header," + "Partition maybe corrupted\n"); + goto out; + } + + /* + * Note we mapped last 33 blocks(LBA-33), first block here starts with + * entries while last block was header. + */ + result = load_partition_gpt(image_handle, 0); + +out: + io_close(image_handle); + return result; +} + +/* + * Load a GPT partition, Try retrieving and parsing the primary GPT header, + * if its corrupted try loading backup GPT header and then retrieve list + * of partition table entries found from the GPT. + */ +static int load_primary_gpt(uintptr_t image_handle, unsigned int first_lba) +{ + int result; + unsigned long long part_lba; + size_t gpt_header_offset; + + /* Try to load Primary GPT header from LBA1 */ + gpt_header_offset = LBA(first_lba); + result = load_gpt_header(image_handle, gpt_header_offset, &part_lba); + if ((result != 0) || (part_lba == 0)) { + VERBOSE("Failed to retrieve Primary GPT header," + "trying to retrieve back-up GPT header\n"); + return result; + } + + return load_partition_gpt(image_handle, part_lba); +} + +/* + * Load the partition table info based on the image id provided. + */ +int load_partition_table(unsigned int image_id) +{ + uintptr_t dev_handle, image_handle, image_spec = 0; + mbr_entry_t mbr_entry; + int result; + + result = plat_get_image_source(image_id, &dev_handle, &image_spec); + if (result != 0) { + VERBOSE("Failed to obtain reference to image id=%u (%i)\n", + image_id, result); + return result; + } + + result = io_open(dev_handle, image_spec, &image_handle); + if (result != 0) { + VERBOSE("Failed to access image id=%u (%i)\n", image_id, result); + return result; + } + + result = load_mbr_header(image_handle, &mbr_entry); + if (result != 0) { + VERBOSE("Failed to access image id=%u (%i)\n", image_id, result); + goto out; + } + if (mbr_entry.type == PARTITION_TYPE_GPT) { + result = load_primary_gpt(image_handle, mbr_entry.first_lba); + if (result != 0) { + io_close(image_handle); + return load_backup_gpt(BKUP_GPT_IMAGE_ID, + mbr_entry.sector_nums); + } + } else { + result = load_mbr_entries(image_handle); + } + +out: + io_close(image_handle); + return result; +} + +/* + * Try retrieving a partition table entry based on the name of the partition. + */ +const partition_entry_t *get_partition_entry(const char *name) +{ + int i; + + for (i = 0; i < list.entry_count; i++) { + if (strcmp(name, list.list[i].name) == 0) { + return &list.list[i]; + } + } + return NULL; +} + +/* + * Try retrieving a partition table entry based on the GUID. + */ +const partition_entry_t *get_partition_entry_by_type(const uuid_t *type_uuid) +{ + int i; + + for (i = 0; i < list.entry_count; i++) { + if (guidcmp(type_uuid, &list.list[i].type_guid) == 0) { + return &list.list[i]; + } + } + + return NULL; +} + +/* + * Try retrieving a partition table entry based on the UUID. + */ +const partition_entry_t *get_partition_entry_by_uuid(const uuid_t *part_uuid) +{ + int i; + + for (i = 0; i < list.entry_count; i++) { + if (guidcmp(part_uuid, &list.list[i].part_guid) == 0) { + return &list.list[i]; + } + } + + return NULL; +} + +/* + * Return entry to the list of partition table entries. + */ +const partition_entry_list_t *get_partition_entry_list(void) +{ + return &list; +} + +/* + * Try loading partition table info for the given image ID. + */ +void partition_init(unsigned int image_id) +{ + int ret; + + ret = load_partition_table(image_id); + if (ret != 0) { + ERROR("Failed to parse partition with image id = %u\n", + image_id); + } +} + +/* + * Load a GPT based image. + */ +int gpt_partition_init(void) +{ + return load_partition_table(GPT_IMAGE_ID); +} diff --git a/atf-20231013-0ea67d76a/drivers/rambus/trng_ip_76.c b/atf-20240117-bacca82a8/drivers/rambus/trng_ip_76.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/rambus/trng_ip_76.c rename to atf-20240117-bacca82a8/drivers/rambus/trng_ip_76.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/auth/auth_mod.c b/atf-20240117-bacca82a8/drivers/renesas/common/auth/auth_mod.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/auth/auth_mod.c rename to atf-20240117-bacca82a8/drivers/renesas/common/auth/auth_mod.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/avs/avs_driver.c b/atf-20240117-bacca82a8/drivers/renesas/common/avs/avs_driver.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/avs/avs_driver.c rename to atf-20240117-bacca82a8/drivers/renesas/common/avs/avs_driver.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/avs/avs_driver.h b/atf-20240117-bacca82a8/drivers/renesas/common/avs/avs_driver.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/avs/avs_driver.h rename to atf-20240117-bacca82a8/drivers/renesas/common/avs/avs_driver.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/common.c b/atf-20240117-bacca82a8/drivers/renesas/common/common.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/common.c rename to atf-20240117-bacca82a8/drivers/renesas/common/common.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/console/rcar_console.S b/atf-20240117-bacca82a8/drivers/renesas/common/console/rcar_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/console/rcar_console.S rename to atf-20240117-bacca82a8/drivers/renesas/common/console/rcar_console.S diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/console/rcar_printf.c b/atf-20240117-bacca82a8/drivers/renesas/common/console/rcar_printf.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/console/rcar_printf.c rename to atf-20240117-bacca82a8/drivers/renesas/common/console/rcar_printf.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/console/rcar_printf.h b/atf-20240117-bacca82a8/drivers/renesas/common/console/rcar_printf.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/console/rcar_printf.h rename to atf-20240117-bacca82a8/drivers/renesas/common/console/rcar_printf.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/boot_init_dram.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/boot_init_dram.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/boot_init_dram.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/boot_init_dram.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr.mk b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr.mk rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr.mk diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/boot_init_dram_regdef.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/boot_init_dram_regdef.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/boot_init_dram_regdef.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/boot_init_dram_regdef.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_a.mk b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_a.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_a.mk rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_a.mk diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_init_d3.c b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_init_d3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_init_d3.c rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_init_d3.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_init_e3.c b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_init_e3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_init_e3.c rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_init_e3.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_init_v3m.c b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_init_v3m.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_a/ddr_init_v3m.c rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_a/ddr_init_v3m.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c similarity index 99% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c index 8d002deca..3f6a9484d 100644 --- a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c +++ b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -1180,6 +1180,11 @@ static void regif_pll_wa(void) ddrtbl_getval(_cnf_DDR_PHY_ADR_G_REGSET, _reg_PHY_LP4_BOOT_TOP_PLL_CTRL )); + if (ddrtbl_getval(_cnf_DDR_PHY_ADR_G_REGSET, _reg_PHY_LP4_BOOT_LOW_FREQ_SEL)) { + reg_ddrphy_write_a(ddr_regdef_adr(_reg_PHY_LP4_BOOT_LOW_FREQ_SEL), + _cnf_DDR_PHY_ADR_G_REGSET[0x7f & ddr_regdef_adr( + _reg_PHY_LP4_BOOT_LOW_FREQ_SEL)]); + } } reg_ddrphy_write_a(ddr_regdef_adr(_reg_PHY_LPDDR3_CS), @@ -2856,6 +2861,16 @@ static uint32_t pll3_freq(uint32_t on) timeout = wait_freqchgreq(1); + if ((!((prr_product == PRR_PRODUCT_H3) && (prr_cut <= PRR_PRODUCT_11))) && (on)) { + if (((1600U * ddr_mbpsdiv) < ddr_mbps) || (prr_product == PRR_PRODUCT_M3)) { + reg_ddrphy_write_a(ddr_regdef_adr(_reg_PHY_PLL_CTRL), 0x01421142U); + reg_ddrphy_write_a(ddr_regdef_adr(_reg_PHY_PLL_CTRL_CA), 0x00000142U); + } else { + reg_ddrphy_write_a(ddr_regdef_adr(_reg_PHY_PLL_CTRL), 0x03421342U); + reg_ddrphy_write_a(ddr_regdef_adr(_reg_PHY_PLL_CTRL_CA), 0x00000342U); + } + } + if (timeout) { return 1; } diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram_config.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram_regdef.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram_regdef.h similarity index 96% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram_regdef.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram_regdef.h index 3cb19752c..328adbfe4 100644 --- a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/boot_init_dram_regdef.h +++ b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/boot_init_dram_regdef.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ -#define RCAR_DDR_VERSION "rev.0.41" +#define RCAR_DDR_VERSION "rev.0.42" #define DRAM_CH_CNT 0x04 #define SLICE_CNT 0x04 #define CS_CNT 0x02 diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/ddr_b.mk b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/ddr_b.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/ddr_b.mk rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/ddr_b.mk diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/ddr_regdef.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/ddr_regdef.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/ddr_regdef.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/ddr_regdef.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3ver2.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3ver2.h similarity index 98% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3ver2.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3ver2.h index e5258af6c..5a662ec31 100644 --- a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3ver2.h +++ b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_h3ver2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2019, Renesas Electronics Corporation. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -230,8 +230,8 @@ static const uint32_t /*0693*/ 0x00000000, /*0694*/ 0x00000000, /*0695*/ 0x00005064, - /*0696*/ 0x01421142, - /*0697*/ 0x00000142, + /*0696*/ 0x05421542, + /*0697*/ 0x00000542, /*0698*/ 0x00000000, /*0699*/ 0x000f1100, /*069a*/ 0x0f110f11, @@ -240,12 +240,12 @@ static const uint32_t /*069d*/ 0x0002c000, /*069e*/ 0x02c002c0, /*069f*/ 0x000002c0, - /*06a0*/ 0x03421342, - /*06a1*/ 0x00000342, + /*06a0*/ 0x05421542, + /*06a1*/ 0x00000542, /*06a2*/ 0x00000000, /*06a3*/ 0x00000000, /*06a4*/ 0x05020000, - /*06a5*/ 0x14000000, + /*06a5*/ 0x14000001, /*06a6*/ 0x027f6e00, /*06a7*/ 0x047f027f, /*06a8*/ 0x00027f6e, diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3.h similarity index 99% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3.h index b491f0e91..482a2a5ce 100644 --- a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3.h +++ b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2019, Renesas Electronics Corporation. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -210,8 +210,8 @@ static const uint32_t DDR_PHY_ADR_G_REGSET_M3[DDR_PHY_ADR_G_REGSET_NUM_M3] = { /*0b8b*/ 0x01010100, /*0b8c*/ 0x00000600, /*0b8d*/ 0x50640000, - /*0b8e*/ 0x01421142, - /*0b8f*/ 0x00000142, + /*0b8e*/ 0x03421342, + /*0b8f*/ 0x00000342, /*0b90*/ 0x00000000, /*0b91*/ 0x000f1600, /*0b92*/ 0x0f160f16, diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3n.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3n.h similarity index 98% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3n.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3n.h index fb3032dee..436c1a0bb 100644 --- a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3n.h +++ b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/ddr_b/init_dram_tbl_m3n.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2020, Renesas Electronics Corporation. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -230,8 +230,8 @@ static const uint32_t DDR_PHY_ADR_G_REGSET_M3N[DDR_PHY_ADR_G_REGSET_NUM_M3N] = { /*0b93*/ 0x00000000, /*0b94*/ 0x00000000, /*0b95*/ 0x00005064, - /*0b96*/ 0x01421142, - /*0b97*/ 0x00000142, + /*0b96*/ 0x05421542, + /*0b97*/ 0x00000542, /*0b98*/ 0x00000000, /*0b99*/ 0x000f1600, /*0b9a*/ 0x0f160f16, @@ -241,12 +241,12 @@ static const uint32_t DDR_PHY_ADR_G_REGSET_M3N[DDR_PHY_ADR_G_REGSET_NUM_M3N] = { /*0b9e*/ 0x02c002c0, /*0b9f*/ 0x000002c0, /*0ba0*/ 0x08040201, - /*0ba1*/ 0x03421342, - /*0ba2*/ 0x00000342, + /*0ba1*/ 0x05421542, + /*0ba2*/ 0x00000542, /*0ba3*/ 0x00000000, /*0ba4*/ 0x00000000, /*0ba5*/ 0x05030000, - /*0ba6*/ 0x00010700, + /*0ba6*/ 0x00010701, /*0ba7*/ 0x00000014, /*0ba8*/ 0x00027f6e, /*0ba9*/ 0x047f027f, diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/dram_sub_func.c b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/dram_sub_func.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/dram_sub_func.c rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/dram_sub_func.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr/dram_sub_func.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr/dram_sub_func.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr/dram_sub_func.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr/dram_sub_func.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/ddr_regs.h b/atf-20240117-bacca82a8/drivers/renesas/common/ddr_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/ddr_regs.h rename to atf-20240117-bacca82a8/drivers/renesas/common/ddr_regs.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/delay/micro_delay.c b/atf-20240117-bacca82a8/drivers/renesas/common/delay/micro_delay.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/delay/micro_delay.c rename to atf-20240117-bacca82a8/drivers/renesas/common/delay/micro_delay.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/delay/micro_delay.h b/atf-20240117-bacca82a8/drivers/renesas/common/delay/micro_delay.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/delay/micro_delay.h rename to atf-20240117-bacca82a8/drivers/renesas/common/delay/micro_delay.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/dma/dma_driver.c b/atf-20240117-bacca82a8/drivers/renesas/common/dma/dma_driver.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/dma/dma_driver.c rename to atf-20240117-bacca82a8/drivers/renesas/common/dma/dma_driver.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_cmd.c b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_cmd.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_cmd.c rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_cmd.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_config.h b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_config.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_config.h rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_config.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_def.h b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_def.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_def.h rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_def.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_hal.h b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_hal.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_hal.h rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_hal.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_init.c b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_init.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_init.c rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_init.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_interrupt.c b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_interrupt.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_interrupt.c rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_interrupt.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_mount.c b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_mount.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_mount.c rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_mount.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_read.c b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_read.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_read.c rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_read.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_registers.h b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_registers.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_registers.h rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_registers.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_std.h b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_std.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_std.h rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_std.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_utility.c b/atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_utility.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/emmc/emmc_utility.c rename to atf-20240117-bacca82a8/drivers/renesas/common/emmc/emmc_utility.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/iic_dvfs/iic_dvfs.c b/atf-20240117-bacca82a8/drivers/renesas/common/iic_dvfs/iic_dvfs.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/iic_dvfs/iic_dvfs.c rename to atf-20240117-bacca82a8/drivers/renesas/common/iic_dvfs/iic_dvfs.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/iic_dvfs/iic_dvfs.h b/atf-20240117-bacca82a8/drivers/renesas/common/iic_dvfs/iic_dvfs.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/iic_dvfs/iic_dvfs.h rename to atf-20240117-bacca82a8/drivers/renesas/common/iic_dvfs/iic_dvfs.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_common.h b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_common.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_common.h rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_common.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_emmcdrv.c b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_emmcdrv.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_emmcdrv.c rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_emmcdrv.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_emmcdrv.h b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_emmcdrv.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_emmcdrv.h rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_emmcdrv.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_memdrv.c b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_memdrv.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_memdrv.c rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_memdrv.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_memdrv.h b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_memdrv.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_memdrv.h rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_memdrv.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_private.h b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_private.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_private.h rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_private.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_rcar.c b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_rcar.c similarity index 87% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_rcar.c rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_rcar.c index 45ef386ae..66662c111 100644 --- a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_rcar.c +++ b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_rcar.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -84,6 +84,29 @@ typedef struct { #define RCAR_COUNT_LOAD_BL33 (2U) #define RCAR_COUNT_LOAD_BL33X (3U) +#define CHECK_IMAGE_AREA_CNT (7U) +#define BOOT_BL2_ADDR (0xE6304000U) +#define BOOT_BL2_LENGTH (0x19000U) + +typedef struct { + uintptr_t dest; + uintptr_t length; +} addr_loaded_t; + +static addr_loaded_t addr_loaded[CHECK_IMAGE_AREA_CNT] = { + [0] = {BOOT_BL2_ADDR, BOOT_BL2_LENGTH}, + [1] = {BL31_BASE, RCAR_TRUSTED_SRAM_SIZE}, +#ifndef SPD_NONE + [2] = {BL32_BASE, BL32_SIZE} +#endif +}; + +#ifndef SPD_NONE +static uint32_t addr_loaded_cnt = 3; +#else +static uint32_t addr_loaded_cnt = 2; +#endif + static const plat_rcar_name_offset_t name_offset[] = { {BL31_IMAGE_ID, 0U, RCAR_ATTR_SET_ALL(0, 0, 0)}, @@ -244,8 +267,16 @@ void rcar_read_certificate(uint64_t cert, uint32_t *len, uintptr_t *dst) dstl = cert + RCAR_CERT_INFO_DST_OFFSET; break; } + val = mmio_read_32(size); + if (val > (UINT32_MAX / 4)) { + ERROR("BL2: %s[%d] uint32 overflow!\n", + __func__, __LINE__); + *dst = 0; + *len = 0; + return; + } - *len = mmio_read_32(size) * 4U; + *len = val * 4U; dsth = dstl + 4U; *dst = ((uintptr_t) mmio_read_32(dsth) << 32) + ((uintptr_t) mmio_read_32(dstl)); @@ -253,7 +284,14 @@ void rcar_read_certificate(uint64_t cert, uint32_t *len, uintptr_t *dst) } size = cert + RCAR_CERT_INFO_SIZE_OFFSET; - *len = mmio_read_32(size) * 4U; + val = mmio_read_32(size); + if (val > (UINT32_MAX / 4)) { + ERROR("BL2: %s[%d] uint32 overflow!\n", __func__, __LINE__); + *dst = 0; + *len = 0; + return; + } + *len = val * 4U; dstl = cert + RCAR_CERT_INFO_DST_OFFSET; dsth = dstl + 4U; *dst = ((uintptr_t) mmio_read_32(dsth) << 32) + @@ -266,17 +304,18 @@ static int32_t check_load_area(uintptr_t dst, uintptr_t len) uintptr_t dram_start, dram_end; uintptr_t prot_start, prot_end; int32_t result = IO_SUCCESS; + int n; - dram_start = legacy ? DRAM1_BASE : DRAM_40BIT_BASE; + dram_start = legacy ? DRAM1_NS_BASE : DRAM_40BIT_BASE; - dram_end = legacy ? DRAM1_BASE + DRAM1_SIZE : + dram_end = legacy ? DRAM1_NS_BASE + DRAM1_NS_SIZE : DRAM_40BIT_BASE + DRAM_40BIT_SIZE; prot_start = legacy ? DRAM_PROTECTED_BASE : DRAM_40BIT_PROTECTED_BASE; prot_end = prot_start + DRAM_PROTECTED_SIZE; - if (dst < dram_start || dst > dram_end - len) { + if (dst < dram_start || len > dram_end || dst > dram_end - len) { ERROR("BL2: dst address is on the protected area.\n"); result = IO_FAIL; goto done; @@ -286,12 +325,54 @@ static int32_t check_load_area(uintptr_t dst, uintptr_t len) if (dst >= prot_start && dst < prot_end) { ERROR("BL2: dst address is on the protected area.\n"); result = IO_FAIL; + goto done; } - if (dst < prot_start && dst > prot_start - len) { - ERROR("BL2: loaded data is on the protected area.\n"); + if (len > prot_start || (dst < prot_start && dst > prot_start - len)) { + ERROR("BL2: %s[%d] loaded data is on the protected area.\n", + __func__, __LINE__); result = IO_FAIL; + goto done; } + + if (addr_loaded_cnt >= CHECK_IMAGE_AREA_CNT) { + ERROR("BL2: max loadable non secure images reached\n"); + result = IO_FAIL; + goto done; + } + + addr_loaded[addr_loaded_cnt].dest = dst; + addr_loaded[addr_loaded_cnt].length = len; + for (n = 0; n < addr_loaded_cnt; n++) { + /* + * Check if next image invades a previous loaded image + * + * IMAGE n: area from previous image: dest| IMAGE n |length + * IMAGE n+1: area from next image: dst | IMAGE n |len + * + * 1. check: + * | IMAGE n | + * | IMAGE n+1 | + * 2. check: + * | IMAGE n | + * | IMAGE n+1 | + * 3. check: + * | IMAGE n | + * | IMAGE n+1 | + */ + if (((dst >= addr_loaded[n].dest) && + (dst <= addr_loaded[n].dest + addr_loaded[n].length)) || + ((dst + len >= addr_loaded[n].dest) && + (dst + len <= addr_loaded[n].dest + addr_loaded[n].length)) || + ((dst <= addr_loaded[n].dest) && + (dst + len >= addr_loaded[n].dest + addr_loaded[n].length))) { + ERROR("BL2: next image overlap a previous image area.\n"); + result = IO_FAIL; + goto done; + } + } + addr_loaded_cnt++; + done: if (result == IO_FAIL) { ERROR("BL2: Out of range : dst=0x%lx len=0x%lx\n", dst, len); @@ -435,17 +516,17 @@ static int32_t rcar_dev_init(io_dev_info_t *dev_info, const uintptr_t name) #endif rcar_image_number = header[0]; - for (i = 0; i < rcar_image_number + 2; i++) { - rcar_image_header[i] = header[i * 2 + 1]; - rcar_image_header_prttn[i] = header[i * 2 + 2]; - } - if (rcar_image_number == 0 || rcar_image_number > RCAR_MAX_BL3X_IMAGE) { WARN("Firmware Image Package header check failed.\n"); rc = IO_FAIL; goto error; } + for (i = 0; i < rcar_image_number + 2; i++) { + rcar_image_header[i] = header[i * 2 + 1]; + rcar_image_header_prttn[i] = header[i * 2 + 2]; + } + rc = io_seek(handle, IO_SEEK_SET, offset + RCAR_SECTOR6_CERT_OFFSET); if (rc != IO_SUCCESS) { WARN("Firmware Image Package header failed to seek cert\n"); @@ -517,13 +598,6 @@ static int32_t rcar_file_open(io_dev_info_t *info, const uintptr_t file_spec, rcar_read_certificate((uint64_t) cert, &len, &dst); - /* Baylibre: HACK */ - if (spec->offset == BL31_IMAGE_ID && len < RCAR_TRUSTED_SRAM_SIZE) { - WARN("%s,%s\n", "r-car ignoring the BL31 size from certificate", - "using RCAR_TRUSTED_SRAM_SIZE instead"); - len = RCAR_TRUSTED_SRAM_SIZE; - } - current_file.partition = partition; current_file.no_load = noload; current_file.offset = offset; diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/io/io_rcar.h b/atf-20240117-bacca82a8/drivers/renesas/common/io/io_rcar.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/io/io_rcar.h rename to atf-20240117-bacca82a8/drivers/renesas/common/io/io_rcar.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/pfc_regs.h b/atf-20240117-bacca82a8/drivers/renesas/common/pfc_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/pfc_regs.h rename to atf-20240117-bacca82a8/drivers/renesas/common/pfc_regs.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/pwrc/call_sram.S b/atf-20240117-bacca82a8/drivers/renesas/common/pwrc/call_sram.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/pwrc/call_sram.S rename to atf-20240117-bacca82a8/drivers/renesas/common/pwrc/call_sram.S diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/pwrc/pwrc.c b/atf-20240117-bacca82a8/drivers/renesas/common/pwrc/pwrc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/pwrc/pwrc.c rename to atf-20240117-bacca82a8/drivers/renesas/common/pwrc/pwrc.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/pwrc/pwrc.h b/atf-20240117-bacca82a8/drivers/renesas/common/pwrc/pwrc.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/pwrc/pwrc.h rename to atf-20240117-bacca82a8/drivers/renesas/common/pwrc/pwrc.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/qos_reg.h b/atf-20240117-bacca82a8/drivers/renesas/common/qos_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/qos_reg.h rename to atf-20240117-bacca82a8/drivers/renesas/common/qos_reg.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/rom/rom_api.c b/atf-20240117-bacca82a8/drivers/renesas/common/rom/rom_api.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/rom/rom_api.c rename to atf-20240117-bacca82a8/drivers/renesas/common/rom/rom_api.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/rom/rom_api.h b/atf-20240117-bacca82a8/drivers/renesas/common/rom/rom_api.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/rom/rom_api.h rename to atf-20240117-bacca82a8/drivers/renesas/common/rom/rom_api.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/rpc/rpc_driver.c b/atf-20240117-bacca82a8/drivers/renesas/common/rpc/rpc_driver.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/rpc/rpc_driver.c rename to atf-20240117-bacca82a8/drivers/renesas/common/rpc/rpc_driver.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/rpc/rpc_registers.h b/atf-20240117-bacca82a8/drivers/renesas/common/rpc/rpc_registers.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/rpc/rpc_registers.h rename to atf-20240117-bacca82a8/drivers/renesas/common/rpc/rpc_registers.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/scif/scif.S b/atf-20240117-bacca82a8/drivers/renesas/common/scif/scif.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/scif/scif.S rename to atf-20240117-bacca82a8/drivers/renesas/common/scif/scif.S diff --git a/atf-20231013-0ea67d76a/drivers/renesas/common/watchdog/swdt.c b/atf-20240117-bacca82a8/drivers/renesas/common/watchdog/swdt.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/common/watchdog/swdt.c rename to atf-20240117-bacca82a8/drivers/renesas/common/watchdog/swdt.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/board/board.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/board/board.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/board/board.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/board/board.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/board/board.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/board/board.h similarity index 81% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/board/board.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/board/board.h index 51a8e306f..23469114f 100644 --- a/atf-20231013-0ea67d76a/drivers/renesas/rcar/board/board.h +++ b/atf-20240117-bacca82a8/drivers/renesas/rcar/board/board.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2018, Renesas Electronics Corporation. All rights + * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights * reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -11,13 +11,13 @@ #define BOARD_SALVATOR_X (0x00) #define BOARD_KRIEK (0x01) #define BOARD_STARTER_KIT (0x02) +#define BOARD_EAGLE (0x03) #define BOARD_SALVATOR_XS (0x04) +#define BOARD_DRAAK (0x07) #define BOARD_EBISU (0x08) #define BOARD_STARTER_KIT_PRE (0x0B) -#define BOARD_EBISU_4D (0x0DU) -#define BOARD_DRAAK (0x0EU) -#define BOARD_EAGLE (0x0FU) -#define BOARD_UNKNOWN (BOARD_EAGLE + 1U) +#define BOARD_EBISU_4D (0x0D) +#define BOARD_UNKNOWN (BOARD_EBISU_4D + 1U) #define BOARD_REV_UNKNOWN (0xFF) diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/cpld/ulcb_cpld.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/cpld/ulcb_cpld.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/cpld/ulcb_cpld.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/cpld/ulcb_cpld.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/cpld/ulcb_cpld.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/cpld/ulcb_cpld.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/cpld/ulcb_cpld.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/cpld/ulcb_cpld.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/D3/pfc_init_d3.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/D3/pfc_init_d3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/D3/pfc_init_d3.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/D3/pfc_init_d3.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/D3/pfc_init_d3.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/D3/pfc_init_d3.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/D3/pfc_init_d3.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/D3/pfc_init_d3.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/E3/pfc_init_e3.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/E3/pfc_init_e3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/E3/pfc_init_e3.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/E3/pfc_init_e3.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/E3/pfc_init_e3.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/E3/pfc_init_e3.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/E3/pfc_init_e3.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/E3/pfc_init_e3.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v1.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/H3/pfc_init_h3_v2.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3/pfc_init_m3.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3/pfc_init_m3.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3/pfc_init_m3.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3/pfc_init_m3.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3/pfc_init_m3.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/M3N/pfc_init_m3n.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/V3M/pfc_init_v3m.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/pfc.mk b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/pfc.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/pfc.mk rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/pfc.mk diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/pfc_init.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/pfc_init.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/pfc/pfc_init.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/pfc/pfc_init.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/D3/qos_init_d3.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/D3/qos_init_d3.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/D3/qos_init_d3.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/D3/qos_init_d3.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/D3/qos_init_d3.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/D3/qos_init_d3.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/D3/qos_init_d3.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/D3/qos_init_d3.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/D3/qos_init_d3_mstat.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/E3/qos_init_e3_v10_mstat780.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v10.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v10_mstat.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v11.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v11_mstat.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v20_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3_v30_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/H3/qos_init_h3n_v30_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v10.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v10_mstat.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v11_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3/qos_init_m3_v30_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/M3N/qos_init_m3n_v10_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/V3M/qos_init_v3m.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/V3M/qos_init_v3m.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/V3M/qos_init_v3m.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/V3M/qos_init_v3m.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/V3M/qos_init_v3m.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/V3M/qos_init_v3m.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/V3M/qos_init_v3m.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/V3M/qos_init_v3m.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/V3M/qos_init_v3m_mstat.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos.mk b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos.mk rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos.mk diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos_common.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos_common.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos_common.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos_common.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos_init.c b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos_init.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos_init.c rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos_init.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos_init.h b/atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos_init.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rcar/qos/qos_init.h rename to atf-20240117-bacca82a8/drivers/renesas/rcar/qos/qos_init.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/board/board.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/board/board.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/board/board.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/board/board.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/board/board.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/board/board.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/board/board.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/board/board.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2E/pfc_init_g2e.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2H/pfc_init_g2h.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2M/pfc_init_g2m.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/G2N/pfc_init_g2n.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/pfc.mk b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/pfc.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/pfc.mk rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/pfc.mk diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/pfc_init.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/pfc_init.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/pfc/pfc_init.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/pfc/pfc_init.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat780.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat780.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat780.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2E/qos_init_g2e_v10_mstat780.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2H/qos_init_g2h_v30.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10_mstat.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10_mstat.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10_mstat.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v10_mstat.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v11_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2M/qos_init_g2m_v30_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_mstat390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt195.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt195.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt195.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt195.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt390.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt390.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt390.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/G2N/qos_init_g2n_v10_qoswt390.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos.mk b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos.mk similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos.mk rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos.mk diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos_common.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos_common.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos_common.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos_common.h diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos_init.c b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos_init.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos_init.c rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos_init.c diff --git a/atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos_init.h b/atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos_init.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/renesas/rzg/qos/qos_init.h rename to atf-20240117-bacca82a8/drivers/renesas/rzg/qos/qos_init.h diff --git a/atf-20231013-0ea67d76a/drivers/rpi3/gpio/rpi3_gpio.c b/atf-20240117-bacca82a8/drivers/rpi3/gpio/rpi3_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/rpi3/gpio/rpi3_gpio.c rename to atf-20240117-bacca82a8/drivers/rpi3/gpio/rpi3_gpio.c diff --git a/atf-20231013-0ea67d76a/drivers/rpi3/mailbox/rpi3_mbox.c b/atf-20240117-bacca82a8/drivers/rpi3/mailbox/rpi3_mbox.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/rpi3/mailbox/rpi3_mbox.c rename to atf-20240117-bacca82a8/drivers/rpi3/mailbox/rpi3_mbox.c diff --git a/atf-20231013-0ea67d76a/drivers/rpi3/rng/rpi3_rng.c b/atf-20240117-bacca82a8/drivers/rpi3/rng/rpi3_rng.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/rpi3/rng/rpi3_rng.c rename to atf-20240117-bacca82a8/drivers/rpi3/rng/rpi3_rng.c diff --git a/atf-20231013-0ea67d76a/drivers/rpi3/sdhost/rpi3_sdhost.c b/atf-20240117-bacca82a8/drivers/rpi3/sdhost/rpi3_sdhost.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/rpi3/sdhost/rpi3_sdhost.c rename to atf-20240117-bacca82a8/drivers/rpi3/sdhost/rpi3_sdhost.c diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/base.c b/atf-20240117-bacca82a8/drivers/scmi-msg/base.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/base.c rename to atf-20240117-bacca82a8/drivers/scmi-msg/base.c diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/base.h b/atf-20240117-bacca82a8/drivers/scmi-msg/base.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/base.h rename to atf-20240117-bacca82a8/drivers/scmi-msg/base.h diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/clock.c b/atf-20240117-bacca82a8/drivers/scmi-msg/clock.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/clock.c rename to atf-20240117-bacca82a8/drivers/scmi-msg/clock.c diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/clock.h b/atf-20240117-bacca82a8/drivers/scmi-msg/clock.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/clock.h rename to atf-20240117-bacca82a8/drivers/scmi-msg/clock.h diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/common.h b/atf-20240117-bacca82a8/drivers/scmi-msg/common.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/common.h rename to atf-20240117-bacca82a8/drivers/scmi-msg/common.h diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/entry.c b/atf-20240117-bacca82a8/drivers/scmi-msg/entry.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/entry.c rename to atf-20240117-bacca82a8/drivers/scmi-msg/entry.c diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/power_domain.c b/atf-20240117-bacca82a8/drivers/scmi-msg/power_domain.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/power_domain.c rename to atf-20240117-bacca82a8/drivers/scmi-msg/power_domain.c diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/power_domain.h b/atf-20240117-bacca82a8/drivers/scmi-msg/power_domain.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/power_domain.h rename to atf-20240117-bacca82a8/drivers/scmi-msg/power_domain.h diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/reset_domain.c b/atf-20240117-bacca82a8/drivers/scmi-msg/reset_domain.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/reset_domain.c rename to atf-20240117-bacca82a8/drivers/scmi-msg/reset_domain.c diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/reset_domain.h b/atf-20240117-bacca82a8/drivers/scmi-msg/reset_domain.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/reset_domain.h rename to atf-20240117-bacca82a8/drivers/scmi-msg/reset_domain.h diff --git a/atf-20231013-0ea67d76a/drivers/scmi-msg/smt.c b/atf-20240117-bacca82a8/drivers/scmi-msg/smt.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/scmi-msg/smt.c rename to atf-20240117-bacca82a8/drivers/scmi-msg/smt.c diff --git a/atf-20231013-0ea67d76a/drivers/st/bsec/bsec2.c b/atf-20240117-bacca82a8/drivers/st/bsec/bsec2.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/bsec/bsec2.c rename to atf-20240117-bacca82a8/drivers/st/bsec/bsec2.c diff --git a/atf-20231013-0ea67d76a/drivers/st/clk/clk-stm32-core.c b/atf-20240117-bacca82a8/drivers/st/clk/clk-stm32-core.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/clk/clk-stm32-core.c rename to atf-20240117-bacca82a8/drivers/st/clk/clk-stm32-core.c diff --git a/atf-20231013-0ea67d76a/drivers/st/clk/clk-stm32-core.h b/atf-20240117-bacca82a8/drivers/st/clk/clk-stm32-core.h similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/clk/clk-stm32-core.h rename to atf-20240117-bacca82a8/drivers/st/clk/clk-stm32-core.h diff --git a/atf-20231013-0ea67d76a/drivers/st/clk/clk-stm32mp13.c b/atf-20240117-bacca82a8/drivers/st/clk/clk-stm32mp13.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/clk/clk-stm32mp13.c rename to atf-20240117-bacca82a8/drivers/st/clk/clk-stm32mp13.c diff --git a/atf-20231013-0ea67d76a/drivers/st/clk/stm32mp1_clk.c b/atf-20240117-bacca82a8/drivers/st/clk/stm32mp1_clk.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/clk/stm32mp1_clk.c rename to atf-20240117-bacca82a8/drivers/st/clk/stm32mp1_clk.c diff --git a/atf-20231013-0ea67d76a/drivers/st/clk/stm32mp_clkfunc.c b/atf-20240117-bacca82a8/drivers/st/clk/stm32mp_clkfunc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/clk/stm32mp_clkfunc.c rename to atf-20240117-bacca82a8/drivers/st/clk/stm32mp_clkfunc.c diff --git a/atf-20231013-0ea67d76a/drivers/st/crypto/stm32_hash.c b/atf-20240117-bacca82a8/drivers/st/crypto/stm32_hash.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/crypto/stm32_hash.c rename to atf-20240117-bacca82a8/drivers/st/crypto/stm32_hash.c diff --git a/atf-20231013-0ea67d76a/drivers/st/crypto/stm32_pka.c b/atf-20240117-bacca82a8/drivers/st/crypto/stm32_pka.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/crypto/stm32_pka.c rename to atf-20240117-bacca82a8/drivers/st/crypto/stm32_pka.c diff --git a/atf-20231013-0ea67d76a/drivers/st/crypto/stm32_rng.c b/atf-20240117-bacca82a8/drivers/st/crypto/stm32_rng.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/crypto/stm32_rng.c rename to atf-20240117-bacca82a8/drivers/st/crypto/stm32_rng.c diff --git a/atf-20231013-0ea67d76a/drivers/st/crypto/stm32_saes.c b/atf-20240117-bacca82a8/drivers/st/crypto/stm32_saes.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/crypto/stm32_saes.c rename to atf-20240117-bacca82a8/drivers/st/crypto/stm32_saes.c diff --git a/atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp1_ddr.c b/atf-20240117-bacca82a8/drivers/st/ddr/stm32mp1_ddr.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp1_ddr.c rename to atf-20240117-bacca82a8/drivers/st/ddr/stm32mp1_ddr.c diff --git a/atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp1_ddr_helpers.c b/atf-20240117-bacca82a8/drivers/st/ddr/stm32mp1_ddr_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp1_ddr_helpers.c rename to atf-20240117-bacca82a8/drivers/st/ddr/stm32mp1_ddr_helpers.c diff --git a/atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp1_ram.c b/atf-20240117-bacca82a8/drivers/st/ddr/stm32mp1_ram.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp1_ram.c rename to atf-20240117-bacca82a8/drivers/st/ddr/stm32mp1_ram.c diff --git a/atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp_ddr.c b/atf-20240117-bacca82a8/drivers/st/ddr/stm32mp_ddr.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp_ddr.c rename to atf-20240117-bacca82a8/drivers/st/ddr/stm32mp_ddr.c diff --git a/atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp_ddr_test.c b/atf-20240117-bacca82a8/drivers/st/ddr/stm32mp_ddr_test.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp_ddr_test.c rename to atf-20240117-bacca82a8/drivers/st/ddr/stm32mp_ddr_test.c diff --git a/atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp_ram.c b/atf-20240117-bacca82a8/drivers/st/ddr/stm32mp_ram.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/ddr/stm32mp_ram.c rename to atf-20240117-bacca82a8/drivers/st/ddr/stm32mp_ram.c diff --git a/atf-20231013-0ea67d76a/drivers/st/etzpc/etzpc.c b/atf-20240117-bacca82a8/drivers/st/etzpc/etzpc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/etzpc/etzpc.c rename to atf-20240117-bacca82a8/drivers/st/etzpc/etzpc.c diff --git a/atf-20231013-0ea67d76a/drivers/st/fmc/stm32_fmc2_nand.c b/atf-20240117-bacca82a8/drivers/st/fmc/stm32_fmc2_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/fmc/stm32_fmc2_nand.c rename to atf-20240117-bacca82a8/drivers/st/fmc/stm32_fmc2_nand.c diff --git a/atf-20231013-0ea67d76a/drivers/st/gpio/stm32_gpio.c b/atf-20240117-bacca82a8/drivers/st/gpio/stm32_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/gpio/stm32_gpio.c rename to atf-20240117-bacca82a8/drivers/st/gpio/stm32_gpio.c diff --git a/atf-20231013-0ea67d76a/drivers/st/i2c/stm32_i2c.c b/atf-20240117-bacca82a8/drivers/st/i2c/stm32_i2c.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/i2c/stm32_i2c.c rename to atf-20240117-bacca82a8/drivers/st/i2c/stm32_i2c.c diff --git a/atf-20231013-0ea67d76a/drivers/st/iwdg/stm32_iwdg.c b/atf-20240117-bacca82a8/drivers/st/iwdg/stm32_iwdg.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/iwdg/stm32_iwdg.c rename to atf-20240117-bacca82a8/drivers/st/iwdg/stm32_iwdg.c diff --git a/atf-20231013-0ea67d76a/drivers/st/mmc/stm32_sdmmc2.c b/atf-20240117-bacca82a8/drivers/st/mmc/stm32_sdmmc2.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/mmc/stm32_sdmmc2.c rename to atf-20240117-bacca82a8/drivers/st/mmc/stm32_sdmmc2.c diff --git a/atf-20231013-0ea67d76a/drivers/st/pmic/stm32mp_pmic.c b/atf-20240117-bacca82a8/drivers/st/pmic/stm32mp_pmic.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/pmic/stm32mp_pmic.c rename to atf-20240117-bacca82a8/drivers/st/pmic/stm32mp_pmic.c diff --git a/atf-20231013-0ea67d76a/drivers/st/pmic/stpmic1.c b/atf-20240117-bacca82a8/drivers/st/pmic/stpmic1.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/pmic/stpmic1.c rename to atf-20240117-bacca82a8/drivers/st/pmic/stpmic1.c diff --git a/atf-20231013-0ea67d76a/drivers/st/regulator/regulator_core.c b/atf-20240117-bacca82a8/drivers/st/regulator/regulator_core.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/regulator/regulator_core.c rename to atf-20240117-bacca82a8/drivers/st/regulator/regulator_core.c diff --git a/atf-20231013-0ea67d76a/drivers/st/regulator/regulator_fixed.c b/atf-20240117-bacca82a8/drivers/st/regulator/regulator_fixed.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/regulator/regulator_fixed.c rename to atf-20240117-bacca82a8/drivers/st/regulator/regulator_fixed.c diff --git a/atf-20231013-0ea67d76a/drivers/st/reset/stm32mp1_reset.c b/atf-20240117-bacca82a8/drivers/st/reset/stm32mp1_reset.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/reset/stm32mp1_reset.c rename to atf-20240117-bacca82a8/drivers/st/reset/stm32mp1_reset.c diff --git a/atf-20231013-0ea67d76a/drivers/st/spi/stm32_qspi.c b/atf-20240117-bacca82a8/drivers/st/spi/stm32_qspi.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/spi/stm32_qspi.c rename to atf-20240117-bacca82a8/drivers/st/spi/stm32_qspi.c diff --git a/atf-20231013-0ea67d76a/drivers/st/uart/aarch32/stm32_console.S b/atf-20240117-bacca82a8/drivers/st/uart/aarch32/stm32_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/uart/aarch32/stm32_console.S rename to atf-20240117-bacca82a8/drivers/st/uart/aarch32/stm32_console.S diff --git a/atf-20231013-0ea67d76a/drivers/st/uart/aarch64/stm32_console.S b/atf-20240117-bacca82a8/drivers/st/uart/aarch64/stm32_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/uart/aarch64/stm32_console.S rename to atf-20240117-bacca82a8/drivers/st/uart/aarch64/stm32_console.S diff --git a/atf-20231013-0ea67d76a/drivers/st/uart/stm32_uart.c b/atf-20240117-bacca82a8/drivers/st/uart/stm32_uart.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/uart/stm32_uart.c rename to atf-20240117-bacca82a8/drivers/st/uart/stm32_uart.c diff --git a/atf-20231013-0ea67d76a/drivers/st/usb/stm32mp1_usb.c b/atf-20240117-bacca82a8/drivers/st/usb/stm32mp1_usb.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/st/usb/stm32mp1_usb.c rename to atf-20240117-bacca82a8/drivers/st/usb/stm32mp1_usb.c diff --git a/atf-20231013-0ea67d76a/drivers/synopsys/emmc/dw_mmc.c b/atf-20240117-bacca82a8/drivers/synopsys/emmc/dw_mmc.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/synopsys/emmc/dw_mmc.c rename to atf-20240117-bacca82a8/drivers/synopsys/emmc/dw_mmc.c diff --git a/atf-20231013-0ea67d76a/drivers/synopsys/ufs/dw_ufs.c b/atf-20240117-bacca82a8/drivers/synopsys/ufs/dw_ufs.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/synopsys/ufs/dw_ufs.c rename to atf-20240117-bacca82a8/drivers/synopsys/ufs/dw_ufs.c diff --git a/atf-20231013-0ea67d76a/drivers/ti/uart/aarch32/16550_console.S b/atf-20240117-bacca82a8/drivers/ti/uart/aarch32/16550_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/ti/uart/aarch32/16550_console.S rename to atf-20240117-bacca82a8/drivers/ti/uart/aarch32/16550_console.S diff --git a/atf-20231013-0ea67d76a/drivers/ti/uart/aarch64/16550_console.S b/atf-20240117-bacca82a8/drivers/ti/uart/aarch64/16550_console.S similarity index 100% rename from atf-20231013-0ea67d76a/drivers/ti/uart/aarch64/16550_console.S rename to atf-20240117-bacca82a8/drivers/ti/uart/aarch64/16550_console.S diff --git a/atf-20231013-0ea67d76a/drivers/ufs/ufs.c b/atf-20240117-bacca82a8/drivers/ufs/ufs.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/ufs/ufs.c rename to atf-20240117-bacca82a8/drivers/ufs/ufs.c diff --git a/atf-20231013-0ea67d76a/drivers/usb/usb_device.c b/atf-20240117-bacca82a8/drivers/usb/usb_device.c similarity index 100% rename from atf-20231013-0ea67d76a/drivers/usb/usb_device.c rename to atf-20240117-bacca82a8/drivers/usb/usb_device.c diff --git a/atf-20231013-0ea67d76a/fdts/a5ds.dts b/atf-20240117-bacca82a8/fdts/a5ds.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/a5ds.dts rename to atf-20240117-bacca82a8/fdts/a5ds.dts diff --git a/atf-20231013-0ea67d76a/fdts/arm_fpga.dts b/atf-20240117-bacca82a8/fdts/arm_fpga.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/arm_fpga.dts rename to atf-20240117-bacca82a8/fdts/arm_fpga.dts diff --git a/atf-20231013-0ea67d76a/fdts/corstone700.dtsi b/atf-20240117-bacca82a8/fdts/corstone700.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/corstone700.dtsi rename to atf-20240117-bacca82a8/fdts/corstone700.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/corstone700_fpga.dts b/atf-20240117-bacca82a8/fdts/corstone700_fpga.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/corstone700_fpga.dts rename to atf-20240117-bacca82a8/fdts/corstone700_fpga.dts diff --git a/atf-20231013-0ea67d76a/fdts/corstone700_fvp.dts b/atf-20240117-bacca82a8/fdts/corstone700_fvp.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/corstone700_fvp.dts rename to atf-20240117-bacca82a8/fdts/corstone700_fvp.dts diff --git a/atf-20231013-0ea67d76a/fdts/cot_descriptors.dtsi b/atf-20240117-bacca82a8/fdts/cot_descriptors.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/cot_descriptors.dtsi rename to atf-20240117-bacca82a8/fdts/cot_descriptors.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv2-psci.dts b/atf-20240117-bacca82a8/fdts/fvp-base-gicv2-psci.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv2-psci.dts rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv2-psci.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv2.dtsi b/atf-20240117-bacca82a8/fdts/fvp-base-gicv2.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv2.dtsi rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv2.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-1t.dts b/atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-1t.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-1t.dts rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-1t.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-dynamiq-2t.dts b/atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-dynamiq-2t.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-dynamiq-2t.dts rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-dynamiq-2t.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-dynamiq-common.dtsi b/atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-dynamiq-common.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-dynamiq-common.dtsi rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-dynamiq-common.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-dynamiq.dts b/atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-dynamiq.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci-dynamiq.dts rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci-dynamiq.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci.dts b/atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv3-psci.dts rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv3-psci.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-gicv3.dtsi b/atf-20240117-bacca82a8/fdts/fvp-base-gicv3.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-base-gicv3.dtsi rename to atf-20240117-bacca82a8/fdts/fvp-base-gicv3.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/fvp-base-psci-common.dtsi b/atf-20240117-bacca82a8/fdts/fvp-base-psci-common.dtsi similarity index 95% rename from atf-20231013-0ea67d76a/fdts/fvp-base-psci-common.dtsi rename to atf-20240117-bacca82a8/fdts/fvp-base-psci-common.dtsi index 79cf37d3b..583bba70e 100644 --- a/atf-20231013-0ea67d76a/fdts/fvp-base-psci-common.dtsi +++ b/atf-20240117-bacca82a8/fdts/fvp-base-psci-common.dtsi @@ -27,11 +27,12 @@ #address-cells = <2>; #size-cells = <2>; + chosen { + stdout-path = "serial0:115200n8"; #if (ENABLE_RME == 1) - chosen { bootargs = "console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=on";}; -#else - chosen {}; + bootargs = "console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=on"; #endif + }; aliases { serial0 = &v2m_serial0; @@ -243,6 +244,9 @@ <0 0 39 &gic 0 GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, <0 0 40 &gic 0 GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, <0 0 41 &gic 0 GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, - <0 0 42 &gic 0 GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; + <0 0 42 &gic 0 GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <0 0 43 &gic 0 GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>, + <0 0 44 &gic 0 GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>, + <0 0 46 &gic 0 GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; }; }; diff --git a/atf-20231013-0ea67d76a/fdts/fvp-defs-dynamiq.dtsi b/atf-20240117-bacca82a8/fdts/fvp-defs-dynamiq.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-defs-dynamiq.dtsi rename to atf-20240117-bacca82a8/fdts/fvp-defs-dynamiq.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/fvp-defs.dtsi b/atf-20240117-bacca82a8/fdts/fvp-defs.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-defs.dtsi rename to atf-20240117-bacca82a8/fdts/fvp-defs.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/fvp-foundation-gicv2-psci.dts b/atf-20240117-bacca82a8/fdts/fvp-foundation-gicv2-psci.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-foundation-gicv2-psci.dts rename to atf-20240117-bacca82a8/fdts/fvp-foundation-gicv2-psci.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-foundation-gicv3-psci.dts b/atf-20240117-bacca82a8/fdts/fvp-foundation-gicv3-psci.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-foundation-gicv3-psci.dts rename to atf-20240117-bacca82a8/fdts/fvp-foundation-gicv3-psci.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-foundation-motherboard.dtsi b/atf-20240117-bacca82a8/fdts/fvp-foundation-motherboard.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-foundation-motherboard.dtsi rename to atf-20240117-bacca82a8/fdts/fvp-foundation-motherboard.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/fvp-ve-Cortex-A5x1.dts b/atf-20240117-bacca82a8/fdts/fvp-ve-Cortex-A5x1.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-ve-Cortex-A5x1.dts rename to atf-20240117-bacca82a8/fdts/fvp-ve-Cortex-A5x1.dts diff --git a/atf-20231013-0ea67d76a/fdts/fvp-ve-Cortex-A7x1.dts b/atf-20240117-bacca82a8/fdts/fvp-ve-Cortex-A7x1.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/fvp-ve-Cortex-A7x1.dts rename to atf-20240117-bacca82a8/fdts/fvp-ve-Cortex-A7x1.dts diff --git a/atf-20231013-0ea67d76a/fdts/juno-ethosn.dtsi b/atf-20240117-bacca82a8/fdts/juno-ethosn.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/juno-ethosn.dtsi rename to atf-20240117-bacca82a8/fdts/juno-ethosn.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/juno.dts b/atf-20240117-bacca82a8/fdts/juno.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/juno.dts rename to atf-20240117-bacca82a8/fdts/juno.dts diff --git a/atf-20231013-0ea67d76a/fdts/morello-coresight.dtsi b/atf-20240117-bacca82a8/fdts/morello-coresight.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/morello-coresight.dtsi rename to atf-20240117-bacca82a8/fdts/morello-coresight.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/morello-fvp.dts b/atf-20240117-bacca82a8/fdts/morello-fvp.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/morello-fvp.dts rename to atf-20240117-bacca82a8/fdts/morello-fvp.dts diff --git a/atf-20231013-0ea67d76a/fdts/morello-soc.dts b/atf-20240117-bacca82a8/fdts/morello-soc.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/morello-soc.dts rename to atf-20240117-bacca82a8/fdts/morello-soc.dts diff --git a/atf-20231013-0ea67d76a/fdts/morello.dtsi b/atf-20240117-bacca82a8/fdts/morello.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/morello.dtsi rename to atf-20240117-bacca82a8/fdts/morello.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/mt7981-spi0.dts b/atf-20240117-bacca82a8/fdts/mt7981-spi0.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/mt7981-spi0.dts rename to atf-20240117-bacca82a8/fdts/mt7981-spi0.dts diff --git a/atf-20231013-0ea67d76a/fdts/mt7981-spi2.dts b/atf-20240117-bacca82a8/fdts/mt7981-spi2.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/mt7981-spi2.dts rename to atf-20240117-bacca82a8/fdts/mt7981-spi2.dts diff --git a/atf-20231013-0ea67d76a/fdts/mt7981.dts b/atf-20240117-bacca82a8/fdts/mt7981.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/mt7981.dts rename to atf-20240117-bacca82a8/fdts/mt7981.dts diff --git a/atf-20231013-0ea67d76a/fdts/mt7986.dts b/atf-20240117-bacca82a8/fdts/mt7986.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/mt7986.dts rename to atf-20240117-bacca82a8/fdts/mt7986.dts diff --git a/atf-20231013-0ea67d76a/fdts/mt7988-spi0.dts b/atf-20240117-bacca82a8/fdts/mt7988-spi0.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/mt7988-spi0.dts rename to atf-20240117-bacca82a8/fdts/mt7988-spi0.dts diff --git a/atf-20231013-0ea67d76a/fdts/mt7988-spi2.dts b/atf-20240117-bacca82a8/fdts/mt7988-spi2.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/mt7988-spi2.dts rename to atf-20240117-bacca82a8/fdts/mt7988-spi2.dts diff --git a/atf-20231013-0ea67d76a/fdts/mt7988.dts b/atf-20240117-bacca82a8/fdts/mt7988.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/mt7988.dts rename to atf-20240117-bacca82a8/fdts/mt7988.dts diff --git a/atf-20231013-0ea67d76a/fdts/n1sdp-multi-chip.dts b/atf-20240117-bacca82a8/fdts/n1sdp-multi-chip.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/n1sdp-multi-chip.dts rename to atf-20240117-bacca82a8/fdts/n1sdp-multi-chip.dts diff --git a/atf-20231013-0ea67d76a/fdts/n1sdp-single-chip.dts b/atf-20240117-bacca82a8/fdts/n1sdp-single-chip.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/n1sdp-single-chip.dts rename to atf-20240117-bacca82a8/fdts/n1sdp-single-chip.dts diff --git a/atf-20231013-0ea67d76a/fdts/n1sdp.dtsi b/atf-20240117-bacca82a8/fdts/n1sdp.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/n1sdp.dtsi rename to atf-20240117-bacca82a8/fdts/n1sdp.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/rtsm_ve-motherboard.dtsi b/atf-20240117-bacca82a8/fdts/rtsm_ve-motherboard.dtsi similarity index 94% rename from atf-20231013-0ea67d76a/fdts/rtsm_ve-motherboard.dtsi rename to atf-20240117-bacca82a8/fdts/rtsm_ve-motherboard.dtsi index 0a824b349..5a34aae43 100644 --- a/atf-20231013-0ea67d76a/fdts/rtsm_ve-motherboard.dtsi +++ b/atf-20240117-bacca82a8/fdts/rtsm_ve-motherboard.dtsi @@ -230,6 +230,25 @@ interrupts = <42>; }; + virtio@140000 { + compatible = "virtio,mmio"; + reg = <0x140000 0x200>; + interrupts = <43>; + }; + + virtio@150000 { + compatible = "virtio,mmio"; + reg = <0x150000 0x200>; + interrupts = <44>; + }; + + virtio@200000 { + compatible = "virtio,mmio"; + reg = <0x200000 0x200>; + interrupts = <46>; + status = "disabled"; + }; + rtc@170000 { compatible = "arm,pl031", "arm,primecell"; reg = <0x170000 0x1000>; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp1-cot-descriptors.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp1-cot-descriptors.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp1-cot-descriptors.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp1-cot-descriptors.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13-bl2.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13-bl2.dtsi similarity index 88% rename from atf-20231013-0ea67d76a/fdts/stm32mp13-bl2.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13-bl2.dtsi index 2b23daf39..06db79662 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp13-bl2.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp13-bl2.dtsi @@ -3,15 +3,6 @@ * Copyright (c) 2022-2023, STMicroelectronics - All Rights Reserved */ -/omit-if-no-ref/ &i2c4_pins_a; -/omit-if-no-ref/ &sdmmc1_b4_pins_a; -/omit-if-no-ref/ &sdmmc1_clk_pins_a; -/omit-if-no-ref/ &sdmmc2_b4_pins_a; -/omit-if-no-ref/ &sdmmc2_clk_pins_a; -/omit-if-no-ref/ &uart4_pins_a; -/omit-if-no-ref/ &uart8_pins_a; -/omit-if-no-ref/ &usart1_pins_a; - / { aliases { #if !STM32MP_EMMC && !STM32MP_SDMMC diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13-ddr.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13-ddr.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp13-ddr.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13-ddr.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13-ddr3-1x4Gb-1066-binF.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13-ddr3-1x4Gb-1066-binF.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp13-ddr3-1x4Gb-1066-binF.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13-ddr3-1x4Gb-1066-binF.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13-fw-config.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13-fw-config.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp13-fw-config.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13-fw-config.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13-pinctrl.dtsi similarity index 94% rename from atf-20231013-0ea67d76a/fdts/stm32mp13-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13-pinctrl.dtsi index 323d5ba66..6de9bb0f6 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp13-pinctrl.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp13-pinctrl.dtsi @@ -6,6 +6,7 @@ #include &pinctrl { + /omit-if-no-ref/ i2c4_pins_a: i2c4-0 { pins { pinmux = , /* I2C4_SCL */ @@ -16,6 +17,7 @@ }; }; + /omit-if-no-ref/ sdmmc1_b4_pins_a: sdmmc1-b4-0 { pins { pinmux = , /* SDMMC1_D0 */ @@ -29,6 +31,7 @@ }; }; + /omit-if-no-ref/ sdmmc1_clk_pins_a: sdmmc1-clk-0 { pins { pinmux = ; /* SDMMC1_CK */ @@ -38,6 +41,7 @@ }; }; + /omit-if-no-ref/ sdmmc2_b4_pins_a: sdmmc2-b4-0 { pins { pinmux = , /* SDMMC2_D0 */ @@ -51,6 +55,7 @@ }; }; + /omit-if-no-ref/ sdmmc2_clk_pins_a: sdmmc2-clk-0 { pins { pinmux = ; /* SDMMC2_CK */ @@ -60,6 +65,7 @@ }; }; + /omit-if-no-ref/ uart4_pins_a: uart4-0 { pins1 { pinmux = ; /* UART4_TX */ @@ -73,6 +79,7 @@ }; }; + /omit-if-no-ref/ usart1_pins_a: usart1-0 { pins1 { pinmux = , /* USART1_TX */ @@ -88,6 +95,7 @@ }; }; + /omit-if-no-ref/ uart8_pins_a: uart8-0 { pins1 { pinmux = ; /* UART8_TX */ diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp131.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp131.dtsi similarity index 98% rename from atf-20231013-0ea67d76a/fdts/stm32mp131.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp131.dtsi index 2be39afcf..8bcf363b6 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp131.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp131.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* - * Copyright (C) STMicroelectronics 2022 - All Rights Reserved + * Copyright (C) 2022-2023, STMicroelectronics - All Rights Reserved * Author: Alexandre Torgue for STMicroelectronics. */ #include @@ -276,23 +276,20 @@ }; fmc: memory-controller@58002000 { - #address-cells = <2>; - #size-cells = <1>; compatible = "st,stm32mp1-fmc2-ebi"; reg = <0x58002000 0x1000>; - clocks = <&rcc FMC_K>; - resets = <&rcc FMC_R>; - status = "disabled"; - ranges = <0 0 0x60000000 0x04000000>, /* EBI CS 1 */ <1 0 0x64000000 0x04000000>, /* EBI CS 2 */ <2 0 0x68000000 0x04000000>, /* EBI CS 3 */ <3 0 0x6c000000 0x04000000>, /* EBI CS 4 */ <4 0 0x80000000 0x10000000>; /* NAND */ + #address-cells = <2>; + #size-cells = <1>; + clocks = <&rcc FMC_K>; + resets = <&rcc FMC_R>; + status = "disabled"; nand-controller@4,0 { - #address-cells = <1>; - #size-cells = <0>; compatible = "st,stm32mp1-fmc2-nfc"; reg = <4 0x00000000 0x1000>, <4 0x08010000 0x1000>, @@ -300,6 +297,8 @@ <4 0x01000000 0x1000>, <4 0x09010000 0x1000>, <4 0x09020000 0x1000>; + #address-cells = <1>; + #size-cells = <0>; interrupts = ; status = "disabled"; }; @@ -341,7 +340,7 @@ status = "disabled"; }; - usbh_ohci: usbh-ohci@5800c000 { + usbh_ohci: usb@5800c000 { compatible = "generic-ohci"; reg = <0x5800c000 0x1000>; clocks = <&rcc USBH>; @@ -350,7 +349,7 @@ status = "disabled"; }; - usbh_ehci: usbh-ehci@5800d000 { + usbh_ehci: usb@5800d000 { compatible = "generic-ehci"; reg = <0x5800d000 0x1000>; clocks = <&rcc USBH>; @@ -424,7 +423,7 @@ cfg0_otp: cfg0_otp@0 { reg = <0x0 0x2>; }; - part_number_otp: part_number_otp@4 { + part_number_otp: part-number-otp@4 { reg = <0x4 0x2>; }; monotonic_otp: monotonic_otp@10 { @@ -470,7 +469,6 @@ ranges = <0 0x50002000 0x8400>; interrupt-parent = <&exti>; st,syscfg = <&exti 0x60 0xff>; - pins-are-numbered; gpioa: gpio@50002000 { gpio-controller; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp133.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp133.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp133.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp133.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp135.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp135.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp135.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp135.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp135f-dk-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp135f-dk-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp135f-dk-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp135f-dk-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp135f-dk.dts b/atf-20240117-bacca82a8/fdts/stm32mp135f-dk.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp135f-dk.dts rename to atf-20240117-bacca82a8/fdts/stm32mp135f-dk.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13xa.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13xa.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp13xa.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13xa.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13xc.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13xc.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp13xc.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13xc.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13xd.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13xd.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp13xd.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13xd.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp13xf.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp13xf.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp13xf.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp13xf.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-bl2.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-bl2.dtsi similarity index 70% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-bl2.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-bl2.dtsi index 53aeec55e..18a4ba932 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp15-bl2.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp15-bl2.dtsi @@ -3,37 +3,8 @@ * Copyright (c) 2020-2023, STMicroelectronics - All Rights Reserved */ -/omit-if-no-ref/ &fmc_pins_a; -/omit-if-no-ref/ &i2c2_pins_a; -/omit-if-no-ref/ &i2c4_pins_a; /omit-if-no-ref/ &i2c6; -/omit-if-no-ref/ &qspi_bk1_pins_a; -/omit-if-no-ref/ &qspi_bk2_pins_a; -/omit-if-no-ref/ &qspi_clk_pins_a; -/omit-if-no-ref/ &sdmmc1_b4_pins_a; -/omit-if-no-ref/ &sdmmc1_dir_pins_a; -/omit-if-no-ref/ &sdmmc1_dir_pins_b; -/omit-if-no-ref/ &sdmmc2_b4_pins_a; -/omit-if-no-ref/ &sdmmc2_b4_pins_b; -/omit-if-no-ref/ &sdmmc2_d47_pins_a; -/omit-if-no-ref/ &sdmmc2_d47_pins_b; -/omit-if-no-ref/ &sdmmc2_d47_pins_c; -/omit-if-no-ref/ &sdmmc2_d47_pins_d; /omit-if-no-ref/ &spi6; -/omit-if-no-ref/ &uart4_pins_a; -/omit-if-no-ref/ &uart4_pins_b; -/omit-if-no-ref/ &uart7_pins_a; -/omit-if-no-ref/ &uart7_pins_b; -/omit-if-no-ref/ &uart7_pins_c; -/omit-if-no-ref/ &uart8_pins_a; -/omit-if-no-ref/ &usart2_pins_a; -/omit-if-no-ref/ &usart2_pins_b; -/omit-if-no-ref/ &usart2_pins_c; -/omit-if-no-ref/ &usart3_pins_a; -/omit-if-no-ref/ &usart3_pins_b; -/omit-if-no-ref/ &usart3_pins_c; -/omit-if-no-ref/ &usbotg_fs_dp_dm_pins_a; -/omit-if-no-ref/ &usbotg_hs_pins_a; / { #if !STM32MP_EMMC && !STM32MP_SDMMC diff --git a/atf-20240117-bacca82a8/fdts/stm32mp15-bl32.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-bl32.dtsi new file mode 100644 index 000000000..688222498 --- /dev/null +++ b/atf-20240117-bacca82a8/fdts/stm32mp15-bl32.dtsi @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (c) 2020-2023, STMicroelectronics - All Rights Reserved + */ + +/omit-if-no-ref/ &i2c6; +/omit-if-no-ref/ &spi6; + +/ { + aliases { + /delete-property/ mmc0; + /delete-property/ mmc1; + }; + + cpus { + /delete-node/ cpu@1; + }; + + /delete-node/ psci; + + soc { + /delete-node/ usb-otg@49000000; + /delete-node/ hash@54002000; + /delete-node/ memory-controller@58002000; + /delete-node/ spi@58003000; + /delete-node/ mmc@58005000; + /delete-node/ mmc@58007000; + /delete-node/ usbphyc@5a006000; + /delete-node/ stgen@5c008000; + }; +}; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-ddr.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-ddr.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-ddr.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-ddr.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-1x2Gb-1066-binG.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-1x2Gb-1066-binG.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-1x2Gb-1066-binG.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-1x2Gb-1066-binG.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-1x4Gb-1066-binG.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-1x4Gb-1066-binG.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-1x4Gb-1066-binG.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-1x4Gb-1066-binG.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-2x4Gb-1066-binG.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-2x4Gb-1066-binG.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-2x4Gb-1066-binG.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-2x4Gb-1066-binG.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-ddr3-dhsom-2x4Gb-1066-binG.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-fw-config.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-fw-config.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-fw-config.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-fw-config.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15-pinctrl.dtsi similarity index 93% rename from atf-20231013-0ea67d76a/fdts/stm32mp15-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15-pinctrl.dtsi index a1be44781..70d1db140 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp15-pinctrl.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp15-pinctrl.dtsi @@ -6,6 +6,7 @@ #include &pinctrl { + /omit-if-no-ref/ fmc_pins_a: fmc-0 { pins1 { pinmux = , /* FMC_NOE */ @@ -31,6 +32,7 @@ }; }; + /omit-if-no-ref/ i2c2_pins_a: i2c2-0 { pins { pinmux = , /* I2C2_SCL */ @@ -41,6 +43,7 @@ }; }; + /omit-if-no-ref/ qspi_clk_pins_a: qspi-clk-0 { pins { pinmux = ; /* QSPI_CLK */ @@ -50,8 +53,9 @@ }; }; + /omit-if-no-ref/ qspi_bk1_pins_a: qspi-bk1-0 { - pins1 { + pins { pinmux = , /* QSPI_BK1_IO0 */ , /* QSPI_BK1_IO1 */ , /* QSPI_BK1_IO2 */ @@ -60,16 +64,11 @@ drive-push-pull; slew-rate = <1>; }; - pins2 { - pinmux = ; /* QSPI_BK1_NCS */ - bias-pull-up; - drive-push-pull; - slew-rate = <1>; - }; }; + /omit-if-no-ref/ qspi_bk2_pins_a: qspi-bk2-0 { - pins1 { + pins { pinmux = , /* QSPI_BK2_IO0 */ , /* QSPI_BK2_IO1 */ , /* QSPI_BK2_IO2 */ @@ -78,7 +77,21 @@ drive-push-pull; slew-rate = <1>; }; - pins2 { + }; + + /omit-if-no-ref/ + qspi_cs1_pins_a: qspi-cs1-0 { + pins { + pinmux = ; /* QSPI_BK1_NCS */ + bias-pull-up; + drive-push-pull; + slew-rate = <1>; + }; + }; + + /omit-if-no-ref/ + qspi_cs2_pins_a: qspi-cs2-0 { + pins { pinmux = ; /* QSPI_BK2_NCS */ bias-pull-up; drive-push-pull; @@ -86,6 +99,7 @@ }; }; + /omit-if-no-ref/ sdmmc1_b4_pins_a: sdmmc1-b4-0 { pins1 { pinmux = , /* SDMMC1_D0 */ @@ -105,6 +119,7 @@ }; }; + /omit-if-no-ref/ sdmmc1_dir_pins_a: sdmmc1-dir-0 { pins1 { pinmux = , /* SDMMC1_D0DIR */ @@ -120,6 +135,7 @@ }; }; + /omit-if-no-ref/ sdmmc1_dir_pins_b: sdmmc1-dir-1 { pins1 { pinmux = , /* SDMMC1_D0DIR */ @@ -129,12 +145,13 @@ drive-push-pull; bias-pull-up; }; - pins2{ + pins2 { pinmux = ; /* SDMMC1_CKIN */ bias-pull-up; }; }; + /omit-if-no-ref/ sdmmc2_b4_pins_a: sdmmc2-b4-0 { pins1 { pinmux = , /* SDMMC2_D0 */ @@ -154,6 +171,7 @@ }; }; + /omit-if-no-ref/ sdmmc2_b4_pins_b: sdmmc2-b4-1 { pins1 { pinmux = , /* SDMMC2_D0 */ @@ -173,6 +191,7 @@ }; }; + /omit-if-no-ref/ sdmmc2_d47_pins_a: sdmmc2-d47-0 { pins { pinmux = , /* SDMMC2_D4 */ @@ -185,6 +204,7 @@ }; }; + /omit-if-no-ref/ sdmmc2_d47_pins_b: sdmmc2-d47-1 { pins { pinmux = , /* SDMMC2_D4 */ @@ -197,6 +217,7 @@ }; }; + /omit-if-no-ref/ sdmmc2_d47_pins_c: sdmmc2-d47-2 { pins { pinmux = , /* SDMMC2_D4 */ @@ -209,6 +230,7 @@ }; }; + /omit-if-no-ref/ sdmmc2_d47_pins_d: sdmmc2-d47-3 { pins { pinmux = , /* SDMMC2_D4 */ @@ -218,6 +240,7 @@ }; }; + /omit-if-no-ref/ uart4_pins_a: uart4-0 { pins1 { pinmux = ; /* UART4_TX */ @@ -231,6 +254,7 @@ }; }; + /omit-if-no-ref/ uart4_pins_b: uart4-1 { pins1 { pinmux = ; /* UART4_TX */ @@ -244,6 +268,7 @@ }; }; + /omit-if-no-ref/ uart7_pins_a: uart7-0 { pins1 { pinmux = ; /* UART7_TX */ @@ -259,6 +284,7 @@ }; }; + /omit-if-no-ref/ uart7_pins_b: uart7-1 { pins1 { pinmux = ; /* UART7_TX */ @@ -272,6 +298,7 @@ }; }; + /omit-if-no-ref/ uart7_pins_c: uart7-2 { pins1 { pinmux = ; /* UART7_TX */ @@ -281,10 +308,11 @@ }; pins2 { pinmux = ; /* UART7_RX */ - bias-disable; + bias-pull-up; }; }; + /omit-if-no-ref/ uart8_pins_a: uart8-0 { pins1 { pinmux = ; /* UART8_TX */ @@ -298,6 +326,7 @@ }; }; + /omit-if-no-ref/ usart2_pins_a: usart2-0 { pins1 { pinmux = , /* USART2_TX */ @@ -313,6 +342,7 @@ }; }; + /omit-if-no-ref/ usart2_pins_b: usart2-1 { pins1 { pinmux = , /* USART2_TX */ @@ -328,13 +358,14 @@ }; }; + /omit-if-no-ref/ usart2_pins_c: usart2-2 { pins1 { pinmux = , /* USART2_TX */ ; /* USART2_RTS */ bias-disable; drive-push-pull; - slew-rate = <3>; + slew-rate = <0>; }; pins2 { pinmux = , /* USART2_RX */ @@ -343,6 +374,7 @@ }; }; + /omit-if-no-ref/ usart3_pins_a: usart3-0 { pins1 { pinmux = ; /* USART3_TX */ @@ -356,6 +388,7 @@ }; }; + /omit-if-no-ref/ usart3_pins_b: usart3-1 { pins1 { pinmux = , /* USART3_TX */ @@ -371,6 +404,7 @@ }; }; + /omit-if-no-ref/ usart3_pins_c: usart3-2 { pins1 { pinmux = , /* USART3_TX */ @@ -386,12 +420,14 @@ }; }; + /omit-if-no-ref/ usbotg_hs_pins_a: usbotg-hs-0 { pins { pinmux = ; /* OTG_ID */ }; }; + /omit-if-no-ref/ usbotg_fs_dp_dm_pins_a: usbotg-fs-dp-dm-0 { pins { pinmux = , /* OTG_FS_DM */ @@ -401,6 +437,7 @@ }; &pinctrl_z { + /omit-if-no-ref/ i2c4_pins_a: i2c4-0 { pins { pinmux = , /* I2C4_SCL */ diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp151.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp151.dtsi similarity index 97% rename from atf-20231013-0ea67d76a/fdts/stm32mp151.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp151.dtsi index 869b9127c..7a22a1c78 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp151.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp151.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* - * Copyright (c) 2017-2022, STMicroelectronics - All Rights Reserved + * Copyright (c) 2017-2023, STMicroelectronics - All Rights Reserved * Author: Ludovic Barre for STMicroelectronics. */ #include @@ -324,9 +324,8 @@ sdmmc1: mmc@58005000 { compatible = "st,stm32-sdmmc2", "arm,pl18x", "arm,primecell"; arm,primecell-periphid = <0x00253180>; - reg = <0x58005000 0x1000>, <0x58006000 0x1000>; + reg = <0x58005000 0x1000>; interrupts = ; - interrupt-names = "cmd_irq"; clocks = <&rcc SDMMC1_K>; clock-names = "apb_pclk"; resets = <&rcc SDMMC1_R>; @@ -339,9 +338,8 @@ sdmmc2: mmc@58007000 { compatible = "st,stm32-sdmmc2", "arm,pl18x", "arm,primecell"; arm,primecell-periphid = <0x00253180>; - reg = <0x58007000 0x1000>, <0x58008000 0x1000>; + reg = <0x58007000 0x1000>; interrupts = ; - interrupt-names = "cmd_irq"; clocks = <&rcc SDMMC2_K>; clock-names = "apb_pclk"; resets = <&rcc SDMMC2_R>; @@ -463,7 +461,7 @@ cfg0_otp: cfg0_otp@0 { reg = <0x0 0x1>; }; - part_number_otp: part_number_otp@4 { + part_number_otp: part-number-otp@4 { reg = <0x4 0x1>; }; monotonic_otp: monotonic_otp@10 { @@ -523,7 +521,7 @@ }; tamp: tamp@5c00a000 { - compatible = "st,stm32-tamp", "simple-bus", "syscon", "simple-mfd"; + compatible = "st,stm32-tamp", "syscon", "simple-mfd"; reg = <0x5c00a000 0x400>; secure-interrupts = ; clocks = <&rcc RTCAPB>; @@ -540,7 +538,6 @@ ranges = <0 0x50002000 0xa400>; interrupt-parent = <&exti>; st,syscfg = <&exti 0x60 0xff>; - pins-are-numbered; gpioa: gpio@50002000 { gpio-controller; @@ -669,7 +666,6 @@ #size-cells = <1>; compatible = "st,stm32mp157-z-pinctrl"; ranges = <0 0x54004000 0x400>; - pins-are-numbered; interrupt-parent = <&exti>; st,syscfg = <&exti 0x60 0xff>; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp151a-prtt1a-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp151a-prtt1a-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp151a-prtt1a-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp151a-prtt1a-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp151a-prtt1a.dts b/atf-20240117-bacca82a8/fdts/stm32mp151a-prtt1a.dts similarity index 97% rename from atf-20231013-0ea67d76a/fdts/stm32mp151a-prtt1a.dts rename to atf-20240117-bacca82a8/fdts/stm32mp151a-prtt1a.dts index be9bdae7c..363462081 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp151a-prtt1a.dts +++ b/atf-20240117-bacca82a8/fdts/stm32mp151a-prtt1a.dts @@ -39,7 +39,9 @@ &qspi { pinctrl-names = "default", "sleep"; - pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; + pinctrl-0 = <&qspi_clk_pins_a + &qspi_bk1_pins_a + &qspi_cs1_pins_a>; reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; #address-cells = <1>; #size-cells = <0>; @@ -56,7 +58,7 @@ }; &qspi_bk1_pins_a { - pins1 { + pins { bias-pull-up; drive-push-pull; slew-rate = <1>; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp153.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp153.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp153.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp153.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp157.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp157.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-avenger96-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-avenger96-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-avenger96-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-avenger96-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-avenger96.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-avenger96.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-avenger96.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-avenger96.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-dhcor-avenger96-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-dhcor-avenger96-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-dhcor-avenger96-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-dhcor-avenger96-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-dhcor-avenger96.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-dhcor-avenger96.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-dhcor-avenger96.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-dhcor-avenger96.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-dk1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-dk1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-dk1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-dk1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-dk1.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-dk1.dts similarity index 76% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-dk1.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-dk1.dts index a73bef8ee..b4d5d20cd 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp157a-dk1.dts +++ b/atf-20240117-bacca82a8/fdts/stm32mp157a-dk1.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* - * Copyright (C) STMicroelectronics 2019 - All Rights Reserved + * Copyright (C) 2019-2023, STMicroelectronics - All Rights Reserved * Author: Alexandre Torgue for STMicroelectronics. */ @@ -15,12 +15,6 @@ model = "STMicroelectronics STM32MP157A-DK1 Discovery Board"; compatible = "st,stm32mp157a-dk1", "st,stm32mp157"; - aliases { - serial0 = &uart4; - serial1 = &usart3; - serial2 = &uart7; - }; - chosen { stdout-path = "serial0:115200n8"; }; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-ed1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-ed1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-ed1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-ed1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157a-ev1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157a-ev1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157a-ev1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157a-ev1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-dhcom-pdk2-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-dhcom-pdk2-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-dhcom-pdk2-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-dhcom-pdk2-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-dhcom-pdk2.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-dhcom-pdk2.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-dhcom-pdk2.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-dhcom-pdk2.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-dk2-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-dk2-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-dk2-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-dk2-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-dk2.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-dk2.dts similarity index 81% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-dk2.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-dk2.dts index be8300e9e..f6f3782e2 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp157c-dk2.dts +++ b/atf-20240117-bacca82a8/fdts/stm32mp157c-dk2.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* - * Copyright (C) STMicroelectronics 2019 - All Rights Reserved + * Copyright (C) 2019-2023, STMicroelectronics - All Rights Reserved * Author: Alexandre Torgue for STMicroelectronics. */ @@ -17,9 +17,6 @@ compatible = "st,stm32mp157c-dk2", "st,stm32mp157"; aliases { - serial0 = &uart4; - serial1 = &usart3; - serial2 = &uart7; serial3 = &usart2; }; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-ed1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-ed1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-ed1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-ed1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-ed1.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-ed1.dts similarity index 98% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-ed1.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-ed1.dts index 63753bdd3..949c929af 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp157c-ed1.dts +++ b/atf-20240117-bacca82a8/fdts/stm32mp157c-ed1.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* - * Copyright (c) 2017-2022, STMicroelectronics - All Rights Reserved + * Copyright (c) 2017-2023, STMicroelectronics - All Rights Reserved * Author: Ludovic Barre for STMicroelectronics. */ /dts-v1/; @@ -16,6 +16,10 @@ model = "STMicroelectronics STM32MP157C eval daughter"; compatible = "st,stm32mp157c-ed1", "st,stm32mp157"; + aliases { + serial0 = &uart4; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -24,10 +28,6 @@ device_type = "memory"; reg = <0xC0000000 0x40000000>; }; - - aliases { - serial0 = &uart4; - }; }; &bsec { diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-ev1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-ev1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-ev1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-ev1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-ev1.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-ev1.dts similarity index 86% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-ev1.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-ev1.dts index 02840a2e5..e2746456b 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp157c-ev1.dts +++ b/atf-20240117-bacca82a8/fdts/stm32mp157c-ev1.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) /* - * Copyright (c) 2017-2021, STMicroelectronics - All Rights Reserved + * Copyright (c) 2017-2023, STMicroelectronics - All Rights Reserved * Author: Ludovic Barre for STMicroelectronics. */ /dts-v1/; @@ -11,13 +11,13 @@ model = "STMicroelectronics STM32MP157C eval daughter on eval mother"; compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157"; - chosen { - stdout-path = "serial0:115200n8"; - }; - aliases { serial1 = &usart3; }; + + chosen { + stdout-path = "serial0:115200n8"; + }; }; &fmc { @@ -39,13 +39,15 @@ &qspi { pinctrl-names = "default"; - pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; + pinctrl-0 = <&qspi_clk_pins_a + &qspi_bk1_pins_a + &qspi_cs1_pins_a>; reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; #address-cells = <1>; #size-cells = <0>; status = "okay"; - flash0: mx66l51235l@0 { + flash0: flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-rx-bus-width = <4>; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-lxa-mc1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-lxa-mc1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-lxa-mc1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-lxa-mc1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-lxa-mc1.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-lxa-mc1.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-lxa-mc1.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-lxa-mc1.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-odyssey-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-odyssey-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-odyssey-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-odyssey-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-odyssey-som.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp157c-odyssey-som.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-odyssey-som.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp157c-odyssey-som.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157c-odyssey.dts b/atf-20240117-bacca82a8/fdts/stm32mp157c-odyssey.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157c-odyssey.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157c-odyssey.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157d-dk1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157d-dk1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157d-dk1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157d-dk1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157d-ed1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157d-ed1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157d-ed1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157d-ed1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157d-ev1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157d-ev1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157d-ev1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157d-ev1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157f-dk2-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157f-dk2-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157f-dk2-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157f-dk2-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157f-ed1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157f-ed1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157f-ed1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157f-ed1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp157f-ev1-fw-config.dts b/atf-20240117-bacca82a8/fdts/stm32mp157f-ev1-fw-config.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp157f-ev1-fw-config.dts rename to atf-20240117-bacca82a8/fdts/stm32mp157f-ev1-fw-config.dts diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xc.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xc.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xc.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xc.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcom-pdk2.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcom-pdk2.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcom-pdk2.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcom-pdk2.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcom-som.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcom-som.dtsi similarity index 97% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcom-som.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcom-som.dtsi index c9f21b0e6..7737a4477 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcom-som.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcom-som.dtsi @@ -2,6 +2,7 @@ /* * Copyright (C) 2019-2020 Marek Vasut * Copyright (C) 2022 DH electronics GmbH + * Copyright (C) 2023, STMicroelectronics - All Rights Reserved */ #include "stm32mp15-pinctrl.dtsi" @@ -169,7 +170,9 @@ &qspi { pinctrl-names = "default"; - pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; + pinctrl-0 = <&qspi_clk_pins_a + &qspi_bk1_pins_a + &qspi_cs1_pins_a>; reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; #address-cells = <1>; #size-cells = <0>; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcor-avenger96.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcor-avenger96.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcor-avenger96.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcor-avenger96.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcor-io1v8.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcor-io1v8.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcor-io1v8.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcor-io1v8.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcor-som.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcor-som.dtsi similarity index 97% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcor-som.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcor-som.dtsi index c241efc48..8d829a416 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dhcor-som.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dhcor-som.dtsi @@ -4,6 +4,7 @@ * Author: Manivannan Sadhasivam * Copyright (C) 2020 Marek Vasut * Copyright (C) 2022 DH electronics GmbH + * Copyright (C) 2023, STMicroelectronics - All Rights Reserved */ #include "stm32mp15-pinctrl.dtsi" @@ -164,7 +165,9 @@ &qspi { pinctrl-names = "default"; - pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>; + pinctrl-0 = <&qspi_clk_pins_a + &qspi_bk1_pins_a + &qspi_cs1_pins_a>; reg = <0x58003000 0x1000>, <0x70000000 0x200000>; #address-cells = <1>; #size-cells = <0>; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dkx.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dkx.dtsi similarity index 98% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xx-dkx.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xx-dkx.dtsi index 52d4170fd..f8baa9d4a 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-dkx.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp15xx-dkx.dtsi @@ -8,6 +8,12 @@ #include "stm32mp15-ddr3-1x4Gb-1066-binG.dtsi" / { + aliases { + serial0 = &uart4; + serial1 = &usart3; + serial2 = &uart7; + }; + memory@c0000000 { device_type = "memory"; reg = <0xc0000000 0x20000000>; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xx-osd32.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xx-osd32.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xx-osd32.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xx-osd32.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xxaa-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xxaa-pinctrl.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xxaa-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xxaa-pinctrl.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xxab-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xxab-pinctrl.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xxab-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xxab-pinctrl.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xxac-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xxac-pinctrl.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xxac-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xxac-pinctrl.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp15xxad-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp15xxad-pinctrl.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp15xxad-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp15xxad-pinctrl.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp25-bl2.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp25-bl2.dtsi similarity index 79% rename from atf-20231013-0ea67d76a/fdts/stm32mp25-bl2.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp25-bl2.dtsi index 7a6bbbe54..438a58ca8 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp25-bl2.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp25-bl2.dtsi @@ -2,5 +2,3 @@ /* * Copyright (C) 2023, STMicroelectronics - All Rights Reserved */ - -/omit-if-no-ref/ &usart2_pins_a; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp25-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp25-pinctrl.dtsi similarity index 96% rename from atf-20231013-0ea67d76a/fdts/stm32mp25-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp25-pinctrl.dtsi index 8d0eaafe9..05876a394 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp25-pinctrl.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp25-pinctrl.dtsi @@ -6,6 +6,7 @@ #include &pinctrl { + /omit-if-no-ref/ usart2_pins_a: usart2-0 { pins1 { pinmux = ; /* USART2_TX */ diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp251.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp251.dtsi similarity index 99% rename from atf-20231013-0ea67d76a/fdts/stm32mp251.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp251.dtsi index 821eb496a..f55a3b973 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp251.dtsi +++ b/atf-20240117-bacca82a8/fdts/stm32mp251.dtsi @@ -67,7 +67,7 @@ <0x0 0x4ac60000 0x0 0x2000>; }; - timer: timer { + timer { compatible = "arm,armv8-timer"; interrupt-parent = <&intc>; interrupts = , diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp253.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp253.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp253.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp253.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp255.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp255.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp255.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp255.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp257.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp257.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp257.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp257.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp257f-ev1.dts b/atf-20240117-bacca82a8/fdts/stm32mp257f-ev1.dts similarity index 94% rename from atf-20231013-0ea67d76a/fdts/stm32mp257f-ev1.dts rename to atf-20240117-bacca82a8/fdts/stm32mp257f-ev1.dts index 916d1e2c3..b7e92e47c 100644 --- a/atf-20231013-0ea67d76a/fdts/stm32mp257f-ev1.dts +++ b/atf-20240117-bacca82a8/fdts/stm32mp257f-ev1.dts @@ -25,7 +25,7 @@ memory@80000000 { device_type = "memory"; - reg = <0x0 0x80000000 0x1 0x00000000>; + reg = <0x0 0x80000000 0x1 0x0>; }; }; diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp25xc.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp25xc.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp25xc.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp25xc.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp25xf.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp25xf.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp25xf.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp25xf.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp25xxai-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp25xxai-pinctrl.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp25xxai-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp25xxai-pinctrl.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp25xxak-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp25xxak-pinctrl.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp25xxak-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp25xxak-pinctrl.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/stm32mp25xxal-pinctrl.dtsi b/atf-20240117-bacca82a8/fdts/stm32mp25xxal-pinctrl.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/fdts/stm32mp25xxal-pinctrl.dtsi rename to atf-20240117-bacca82a8/fdts/stm32mp25xxal-pinctrl.dtsi diff --git a/atf-20231013-0ea67d76a/fdts/tc.dts b/atf-20240117-bacca82a8/fdts/tc.dts similarity index 100% rename from atf-20231013-0ea67d76a/fdts/tc.dts rename to atf-20240117-bacca82a8/fdts/tc.dts diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/arch.h b/atf-20240117-bacca82a8/include/arch/aarch32/arch.h similarity index 99% rename from atf-20231013-0ea67d76a/include/arch/aarch32/arch.h rename to atf-20240117-bacca82a8/include/arch/aarch32/arch.h index da4ee7f11..a7117532c 100644 --- a/atf-20231013-0ea67d76a/include/arch/aarch32/arch.h +++ b/atf-20240117-bacca82a8/include/arch/aarch32/arch.h @@ -796,5 +796,6 @@ #define DSU_CLUSTER_PWR_OFF 0 #define DSU_CLUSTER_PWR_ON 1 #define DSU_CLUSTER_PWR_MASK U(1) +#define DSU_CLUSTER_MEM_RET BIT(1) #endif /* ARCH_H */ diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/arch_features.h b/atf-20240117-bacca82a8/include/arch/aarch32/arch_features.h similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch32/arch_features.h rename to atf-20240117-bacca82a8/include/arch/aarch32/arch_features.h diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/arch_helpers.h b/atf-20240117-bacca82a8/include/arch/aarch32/arch_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch32/arch_helpers.h rename to atf-20240117-bacca82a8/include/arch/aarch32/arch_helpers.h diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/asm_macros.S b/atf-20240117-bacca82a8/include/arch/aarch32/asm_macros.S similarity index 96% rename from atf-20231013-0ea67d76a/include/arch/aarch32/asm_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch32/asm_macros.S index 83e94caa4..3ba86e956 100644 --- a/atf-20231013-0ea67d76a/include/arch/aarch32/asm_macros.S +++ b/atf-20240117-bacca82a8/include/arch/aarch32/asm_macros.S @@ -120,6 +120,14 @@ .endm #endif + /* Macro for error synchronization */ + .macro synchronize_errors + /* Complete any stores that may return an abort */ + dsb sy + /* Synchronise the CPU context with the completion of the dsb */ + isb + .endm + #if (ARM_ARCH_MAJOR == 7) /* ARMv7 does not support stl instruction */ .macro stl _reg, _write_lock diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/assert_macros.S b/atf-20240117-bacca82a8/include/arch/aarch32/assert_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch32/assert_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch32/assert_macros.S diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/console_macros.S b/atf-20240117-bacca82a8/include/arch/aarch32/console_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch32/console_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch32/console_macros.S diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/el3_common_macros.S b/atf-20240117-bacca82a8/include/arch/aarch32/el3_common_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch32/el3_common_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch32/el3_common_macros.S diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/smccc_helpers.h b/atf-20240117-bacca82a8/include/arch/aarch32/smccc_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch32/smccc_helpers.h rename to atf-20240117-bacca82a8/include/arch/aarch32/smccc_helpers.h diff --git a/atf-20231013-0ea67d76a/include/arch/aarch32/smccc_macros.S b/atf-20240117-bacca82a8/include/arch/aarch32/smccc_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch32/smccc_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch32/smccc_macros.S diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/arch.h b/atf-20240117-bacca82a8/include/arch/aarch64/arch.h similarity index 99% rename from atf-20231013-0ea67d76a/include/arch/aarch64/arch.h rename to atf-20240117-bacca82a8/include/arch/aarch64/arch.h index c10102a56..e9d22b61d 100644 --- a/atf-20231013-0ea67d76a/include/arch/aarch64/arch.h +++ b/atf-20240117-bacca82a8/include/arch/aarch64/arch.h @@ -962,6 +962,7 @@ #define EC_AARCH64_HVC U(0x16) #define EC_AARCH64_SMC U(0x17) #define EC_AARCH64_SYS U(0x18) +#define EC_IMP_DEF_EL3 U(0x1f) #define EC_IABORT_LOWER_EL U(0x20) #define EC_IABORT_CUR_EL U(0x21) #define EC_PC_ALIGN U(0x22) @@ -1231,7 +1232,9 @@ /* MPAM register definitions */ #define MPAM3_EL3_MPAMEN_BIT (ULL(1) << 63) +#define MPAM3_EL3_TRAPLOWER_BIT (ULL(1) << 62) #define MPAMHCR_EL2_TRAP_MPAMIDR_EL1 (ULL(1) << 31) +#define MPAM3_EL3_RESET_VAL MPAM3_EL3_TRAPLOWER_BIT #define MPAM2_EL2_TRAPMPAM0EL1 (ULL(1) << 49) #define MPAM2_EL2_TRAPMPAM1EL1 (ULL(1) << 48) @@ -1414,6 +1417,7 @@ #define DSU_CLUSTER_PWR_OFF 0 #define DSU_CLUSTER_PWR_ON 1 #define DSU_CLUSTER_PWR_MASK U(1) +#define DSU_CLUSTER_MEM_RET BIT(1) /******************************************************************************* * Definitions for CPU Power/Performance Management registers diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/arch_features.h b/atf-20240117-bacca82a8/include/arch/aarch64/arch_features.h similarity index 99% rename from atf-20231013-0ea67d76a/include/arch/aarch64/arch_features.h rename to atf-20240117-bacca82a8/include/arch/aarch64/arch_features.h index bd41fefde..cf8da5e8a 100644 --- a/atf-20231013-0ea67d76a/include/arch/aarch64/arch_features.h +++ b/atf-20240117-bacca82a8/include/arch/aarch64/arch_features.h @@ -159,7 +159,7 @@ static inline unsigned int read_feat_mpam_version(void) } CREATE_FEATURE_FUNCS_VER(feat_mpam, read_feat_mpam_version, 1U, - ENABLE_MPAM_FOR_LOWER_ELS) + ENABLE_FEAT_MPAM) /* FEAT_HCX: Extended Hypervisor Configuration Register */ CREATE_FEATURE_FUNCS(feat_hcx, id_aa64mmfr1_el1, ID_AA64MMFR1_EL1_HCX_SHIFT, diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/arch_helpers.h b/atf-20240117-bacca82a8/include/arch/aarch64/arch_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch64/arch_helpers.h rename to atf-20240117-bacca82a8/include/arch/aarch64/arch_helpers.h diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/asm_macros.S b/atf-20240117-bacca82a8/include/arch/aarch64/asm_macros.S similarity index 91% rename from atf-20231013-0ea67d76a/include/arch/aarch64/asm_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch64/asm_macros.S index 6091f6294..d09ad0f0d 100644 --- a/atf-20231013-0ea67d76a/include/arch/aarch64/asm_macros.S +++ b/atf-20240117-bacca82a8/include/arch/aarch64/asm_macros.S @@ -292,4 +292,29 @@ #endif .endm + /* + * Macro to unmask External Aborts by changing PSTATE.A bit. + * Put explicit synchronization event to ensure newly unmasked interrupt + * is taken immediately. + */ + .macro unmask_async_ea + msr daifclr, #DAIF_ABT_BIT + isb + .endm + + /* Macro for error synchronization on exception boundries. + * With FEAT_RAS enabled, it is assumed that FEAT_IESB is also present + * and enabled. + * FEAT_IESB provides an implicit error synchronization event at exception + * entry and exception return, so there is no need for any explicit instruction. + */ + .macro synchronize_errors +#if !ENABLE_FEAT_RAS + /* Complete any stores that may return an abort */ + dsb sy + /* Synchronise the CPU context with the completion of the dsb */ + isb +#endif + .endm + #endif /* ASM_MACROS_S */ diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/assert_macros.S b/atf-20240117-bacca82a8/include/arch/aarch64/assert_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch64/assert_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch64/assert_macros.S diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/console_macros.S b/atf-20240117-bacca82a8/include/arch/aarch64/console_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch64/console_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch64/console_macros.S diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/el2_common_macros.S b/atf-20240117-bacca82a8/include/arch/aarch64/el2_common_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch64/el2_common_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch64/el2_common_macros.S diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/el3_common_macros.S b/atf-20240117-bacca82a8/include/arch/aarch64/el3_common_macros.S similarity index 96% rename from atf-20231013-0ea67d76a/include/arch/aarch64/el3_common_macros.S rename to atf-20240117-bacca82a8/include/arch/aarch64/el3_common_macros.S index 536d807d5..a78837f23 100644 --- a/atf-20231013-0ea67d76a/include/arch/aarch64/el3_common_macros.S +++ b/atf-20240117-bacca82a8/include/arch/aarch64/el3_common_macros.S @@ -208,6 +208,10 @@ */ mov_imm x0, (SCTLR_RESET_VAL & ~(SCTLR_EE_BIT | SCTLR_WXN_BIT \ | SCTLR_SA_BIT | SCTLR_A_BIT | SCTLR_DSSBS_BIT)) +#if ENABLE_FEAT_RAS + /* If FEAT_RAS is present assume FEAT_IESB is also present */ + orr x0, x0, #SCTLR_IESB_BIT +#endif msr sctlr_el3, x0 isb .endif /* _init_sctlr */ @@ -441,4 +445,20 @@ #endif .endm +/* ----------------------------------------------------------------- + * The below macro reads SCR_EL3 from the context structure to + * determine the security state of the context upon ERET. + * ------------------------------------------------------------------ + */ + .macro get_security_state _ret:req, _scr_reg:req + ubfx \_ret, \_scr_reg, #SCR_NSE_SHIFT, #1 + cmp \_ret, #1 + beq realm_state + bfi \_ret, \_scr_reg, #0, #1 + b end + realm_state: + mov \_ret, #2 + end: + .endm + #endif /* EL3_COMMON_MACROS_S */ diff --git a/atf-20231013-0ea67d76a/include/arch/aarch64/smccc_helpers.h b/atf-20240117-bacca82a8/include/arch/aarch64/smccc_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/arch/aarch64/smccc_helpers.h rename to atf-20240117-bacca82a8/include/arch/aarch64/smccc_helpers.h diff --git a/atf-20231013-0ea67d76a/include/bl1/bl1.h b/atf-20240117-bacca82a8/include/bl1/bl1.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl1/bl1.h rename to atf-20240117-bacca82a8/include/bl1/bl1.h diff --git a/atf-20231013-0ea67d76a/include/bl1/tbbr/tbbr_img_desc.h b/atf-20240117-bacca82a8/include/bl1/tbbr/tbbr_img_desc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl1/tbbr/tbbr_img_desc.h rename to atf-20240117-bacca82a8/include/bl1/tbbr/tbbr_img_desc.h diff --git a/atf-20231013-0ea67d76a/include/bl2/bl2.h b/atf-20240117-bacca82a8/include/bl2/bl2.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl2/bl2.h rename to atf-20240117-bacca82a8/include/bl2/bl2.h diff --git a/atf-20231013-0ea67d76a/include/bl2pl/bl2pl.h b/atf-20240117-bacca82a8/include/bl2pl/bl2pl.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl2pl/bl2pl.h rename to atf-20240117-bacca82a8/include/bl2pl/bl2pl.h diff --git a/atf-20231013-0ea67d76a/include/bl2u/bl2u.h b/atf-20240117-bacca82a8/include/bl2u/bl2u.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl2u/bl2u.h rename to atf-20240117-bacca82a8/include/bl2u/bl2u.h diff --git a/atf-20231013-0ea67d76a/include/bl31/bl31.h b/atf-20240117-bacca82a8/include/bl31/bl31.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl31/bl31.h rename to atf-20240117-bacca82a8/include/bl31/bl31.h diff --git a/atf-20231013-0ea67d76a/include/bl31/ea_handle.h b/atf-20240117-bacca82a8/include/bl31/ea_handle.h similarity index 93% rename from atf-20231013-0ea67d76a/include/bl31/ea_handle.h rename to atf-20240117-bacca82a8/include/bl31/ea_handle.h index 68f012c14..7cd7b6a1c 100644 --- a/atf-20231013-0ea67d76a/include/bl31/ea_handle.h +++ b/atf-20240117-bacca82a8/include/bl31/ea_handle.h @@ -21,4 +21,6 @@ /* RAS event signalled as peripheral interrupt */ #define ERROR_INTERRUPT 3 +#define ASYNC_EA_REPLAY_COUNTER U(100) + #endif /* EA_HANDLE_H */ diff --git a/atf-20231013-0ea67d76a/include/bl31/ehf.h b/atf-20240117-bacca82a8/include/bl31/ehf.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl31/ehf.h rename to atf-20240117-bacca82a8/include/bl31/ehf.h diff --git a/atf-20231013-0ea67d76a/include/bl31/interrupt_mgmt.h b/atf-20240117-bacca82a8/include/bl31/interrupt_mgmt.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl31/interrupt_mgmt.h rename to atf-20240117-bacca82a8/include/bl31/interrupt_mgmt.h diff --git a/atf-20231013-0ea67d76a/include/bl31/sync_handle.h b/atf-20240117-bacca82a8/include/bl31/sync_handle.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl31/sync_handle.h rename to atf-20240117-bacca82a8/include/bl31/sync_handle.h diff --git a/atf-20231013-0ea67d76a/include/bl32/payloads/tlk.h b/atf-20240117-bacca82a8/include/bl32/payloads/tlk.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl32/payloads/tlk.h rename to atf-20240117-bacca82a8/include/bl32/payloads/tlk.h diff --git a/atf-20231013-0ea67d76a/include/bl32/pnc/pnc.h b/atf-20240117-bacca82a8/include/bl32/pnc/pnc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl32/pnc/pnc.h rename to atf-20240117-bacca82a8/include/bl32/pnc/pnc.h diff --git a/atf-20231013-0ea67d76a/include/bl32/sp_min/platform_sp_min.h b/atf-20240117-bacca82a8/include/bl32/sp_min/platform_sp_min.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl32/sp_min/platform_sp_min.h rename to atf-20240117-bacca82a8/include/bl32/sp_min/platform_sp_min.h diff --git a/atf-20231013-0ea67d76a/include/bl32/tsp/platform_tsp.h b/atf-20240117-bacca82a8/include/bl32/tsp/platform_tsp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl32/tsp/platform_tsp.h rename to atf-20240117-bacca82a8/include/bl32/tsp/platform_tsp.h diff --git a/atf-20231013-0ea67d76a/include/bl32/tsp/tsp.h b/atf-20240117-bacca82a8/include/bl32/tsp/tsp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/bl32/tsp/tsp.h rename to atf-20240117-bacca82a8/include/bl32/tsp/tsp.h diff --git a/atf-20231013-0ea67d76a/include/common/asm_macros_common.S b/atf-20240117-bacca82a8/include/common/asm_macros_common.S similarity index 100% rename from atf-20231013-0ea67d76a/include/common/asm_macros_common.S rename to atf-20240117-bacca82a8/include/common/asm_macros_common.S diff --git a/atf-20231013-0ea67d76a/include/common/bl_common.h b/atf-20240117-bacca82a8/include/common/bl_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/bl_common.h rename to atf-20240117-bacca82a8/include/common/bl_common.h diff --git a/atf-20231013-0ea67d76a/include/common/bl_common.ld.h b/atf-20240117-bacca82a8/include/common/bl_common.ld.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/bl_common.ld.h rename to atf-20240117-bacca82a8/include/common/bl_common.ld.h diff --git a/atf-20231013-0ea67d76a/include/common/debug.h b/atf-20240117-bacca82a8/include/common/debug.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/debug.h rename to atf-20240117-bacca82a8/include/common/debug.h diff --git a/atf-20231013-0ea67d76a/include/common/desc_image_load.h b/atf-20240117-bacca82a8/include/common/desc_image_load.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/desc_image_load.h rename to atf-20240117-bacca82a8/include/common/desc_image_load.h diff --git a/atf-20231013-0ea67d76a/include/common/ep_info.h b/atf-20240117-bacca82a8/include/common/ep_info.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/ep_info.h rename to atf-20240117-bacca82a8/include/common/ep_info.h diff --git a/atf-20231013-0ea67d76a/include/common/fdt_fixup.h b/atf-20240117-bacca82a8/include/common/fdt_fixup.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/fdt_fixup.h rename to atf-20240117-bacca82a8/include/common/fdt_fixup.h diff --git a/atf-20231013-0ea67d76a/include/common/fdt_wrappers.h b/atf-20240117-bacca82a8/include/common/fdt_wrappers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/fdt_wrappers.h rename to atf-20240117-bacca82a8/include/common/fdt_wrappers.h diff --git a/atf-20231013-0ea67d76a/include/common/feat_detect.h b/atf-20240117-bacca82a8/include/common/feat_detect.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/feat_detect.h rename to atf-20240117-bacca82a8/include/common/feat_detect.h diff --git a/atf-20231013-0ea67d76a/include/common/image_decompress.h b/atf-20240117-bacca82a8/include/common/image_decompress.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/image_decompress.h rename to atf-20240117-bacca82a8/include/common/image_decompress.h diff --git a/atf-20231013-0ea67d76a/include/common/interrupt_props.h b/atf-20240117-bacca82a8/include/common/interrupt_props.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/interrupt_props.h rename to atf-20240117-bacca82a8/include/common/interrupt_props.h diff --git a/atf-20231013-0ea67d76a/include/common/nv_cntr_ids.h b/atf-20240117-bacca82a8/include/common/nv_cntr_ids.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/nv_cntr_ids.h rename to atf-20240117-bacca82a8/include/common/nv_cntr_ids.h diff --git a/atf-20231013-0ea67d76a/include/common/param_header.h b/atf-20240117-bacca82a8/include/common/param_header.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/param_header.h rename to atf-20240117-bacca82a8/include/common/param_header.h diff --git a/atf-20231013-0ea67d76a/include/common/romlib.h b/atf-20240117-bacca82a8/include/common/romlib.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/romlib.h rename to atf-20240117-bacca82a8/include/common/romlib.h diff --git a/atf-20231013-0ea67d76a/include/common/runtime_svc.h b/atf-20240117-bacca82a8/include/common/runtime_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/runtime_svc.h rename to atf-20240117-bacca82a8/include/common/runtime_svc.h diff --git a/atf-20231013-0ea67d76a/include/common/tbbr/cot_def.h b/atf-20240117-bacca82a8/include/common/tbbr/cot_def.h similarity index 74% rename from atf-20231013-0ea67d76a/include/common/tbbr/cot_def.h rename to atf-20240117-bacca82a8/include/common/tbbr/cot_def.h index 822c474d5..bf23917bb 100644 --- a/atf-20231013-0ea67d76a/include/common/tbbr/cot_def.h +++ b/atf-20240117-bacca82a8/include/common/tbbr/cot_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -32,7 +32,12 @@ * buffers must be big enough to hold either. As RSA keys are bigger than ECDSA * ones for all key sizes we support, they impose the minimum size of these * buffers. + * + * If the platform employs its own mbedTLS configuration, it is the platform's + * responsibility to define TF_MBEDTLS_USE_RSA or TF_MBEDTLS_USE_ECDSA to + * establish the appropriate PK_DER_LEN size. */ +#ifdef MBEDTLS_CONFIG_FILE #if TF_MBEDTLS_USE_RSA #if TF_MBEDTLS_KEY_SIZE == 1024 #define PK_DER_LEN 162 @@ -45,9 +50,17 @@ #else #error "Invalid value for TF_MBEDTLS_KEY_SIZE" #endif -#else /* Only using ECDSA keys. */ +#elif TF_MBEDTLS_USE_ECDSA +#if TF_MBEDTLS_KEY_SIZE == 384 +#define PK_DER_LEN 120 +#elif TF_MBEDTLS_KEY_SIZE == 256 #define PK_DER_LEN 92 +#else +#error "Invalid value for TF_MBEDTLS_KEY_SIZE" #endif +#else +#error "Invalid value of algorithm" +#endif /* TF_MBEDTLS_USE_RSA */ #if TF_MBEDTLS_HASH_ALG_ID == TF_MBEDTLS_SHA256 #define HASH_DER_LEN 51 @@ -58,5 +71,6 @@ #else #error "Invalid value for TF_MBEDTLS_HASH_ALG_ID" #endif +#endif /* MBEDTLS_CONFIG_FILE */ #endif /* COT_DEF_H */ diff --git a/atf-20231013-0ea67d76a/include/common/tbbr/tbbr_img_def.h b/atf-20240117-bacca82a8/include/common/tbbr/tbbr_img_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/tbbr/tbbr_img_def.h rename to atf-20240117-bacca82a8/include/common/tbbr/tbbr_img_def.h diff --git a/atf-20231013-0ea67d76a/include/common/tf_crc32.h b/atf-20240117-bacca82a8/include/common/tf_crc32.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/tf_crc32.h rename to atf-20240117-bacca82a8/include/common/tf_crc32.h diff --git a/atf-20231013-0ea67d76a/include/common/uuid.h b/atf-20240117-bacca82a8/include/common/uuid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/common/uuid.h rename to atf-20240117-bacca82a8/include/common/uuid.h diff --git a/atf-20231013-0ea67d76a/include/drivers/allwinner/axp.h b/atf-20240117-bacca82a8/include/drivers/allwinner/axp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/allwinner/axp.h rename to atf-20240117-bacca82a8/include/drivers/allwinner/axp.h diff --git a/atf-20231013-0ea67d76a/include/drivers/allwinner/sunxi_rsb.h b/atf-20240117-bacca82a8/include/drivers/allwinner/sunxi_rsb.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/allwinner/sunxi_rsb.h rename to atf-20240117-bacca82a8/include/drivers/allwinner/sunxi_rsb.h diff --git a/atf-20231013-0ea67d76a/include/drivers/amlogic/crypto/sha_dma.h b/atf-20240117-bacca82a8/include/drivers/amlogic/crypto/sha_dma.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/amlogic/crypto/sha_dma.h rename to atf-20240117-bacca82a8/include/drivers/amlogic/crypto/sha_dma.h diff --git a/atf-20231013-0ea67d76a/include/drivers/amlogic/meson_console.h b/atf-20240117-bacca82a8/include/drivers/amlogic/meson_console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/amlogic/meson_console.h rename to atf-20240117-bacca82a8/include/drivers/amlogic/meson_console.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/arm_gicv3_common.h b/atf-20240117-bacca82a8/include/drivers/arm/arm_gicv3_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/arm_gicv3_common.h rename to atf-20240117-bacca82a8/include/drivers/arm/arm_gicv3_common.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/cci.h b/atf-20240117-bacca82a8/include/drivers/arm/cci.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/cci.h rename to atf-20240117-bacca82a8/include/drivers/arm/cci.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/ccn.h b/atf-20240117-bacca82a8/include/drivers/arm/ccn.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/ccn.h rename to atf-20240117-bacca82a8/include/drivers/arm/ccn.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/css/css_mhu.h b/atf-20240117-bacca82a8/include/drivers/arm/css/css_mhu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/css/css_mhu.h rename to atf-20240117-bacca82a8/include/drivers/arm/css/css_mhu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/css/css_mhu_doorbell.h b/atf-20240117-bacca82a8/include/drivers/arm/css/css_mhu_doorbell.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/css/css_mhu_doorbell.h rename to atf-20240117-bacca82a8/include/drivers/arm/css/css_mhu_doorbell.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/css/css_scp.h b/atf-20240117-bacca82a8/include/drivers/arm/css/css_scp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/css/css_scp.h rename to atf-20240117-bacca82a8/include/drivers/arm/css/css_scp.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/css/css_scpi.h b/atf-20240117-bacca82a8/include/drivers/arm/css/css_scpi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/css/css_scpi.h rename to atf-20240117-bacca82a8/include/drivers/arm/css/css_scpi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/css/scmi.h b/atf-20240117-bacca82a8/include/drivers/arm/css/scmi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/css/scmi.h rename to atf-20240117-bacca82a8/include/drivers/arm/css/scmi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/css/sds.h b/atf-20240117-bacca82a8/include/drivers/arm/css/sds.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/css/sds.h rename to atf-20240117-bacca82a8/include/drivers/arm/css/sds.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/dcc.h b/atf-20240117-bacca82a8/include/drivers/arm/dcc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/dcc.h rename to atf-20240117-bacca82a8/include/drivers/arm/dcc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/ethosn.h b/atf-20240117-bacca82a8/include/drivers/arm/ethosn.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/ethosn.h rename to atf-20240117-bacca82a8/include/drivers/arm/ethosn.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/ethosn_cert.h b/atf-20240117-bacca82a8/include/drivers/arm/ethosn_cert.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/ethosn_cert.h rename to atf-20240117-bacca82a8/include/drivers/arm/ethosn_cert.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/ethosn_fip.h b/atf-20240117-bacca82a8/include/drivers/arm/ethosn_fip.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/ethosn_fip.h rename to atf-20240117-bacca82a8/include/drivers/arm/ethosn_fip.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/ethosn_oid.h b/atf-20240117-bacca82a8/include/drivers/arm/ethosn_oid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/ethosn_oid.h rename to atf-20240117-bacca82a8/include/drivers/arm/ethosn_oid.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/fvp/fvp_pwrc.h b/atf-20240117-bacca82a8/include/drivers/arm/fvp/fvp_pwrc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/fvp/fvp_pwrc.h rename to atf-20240117-bacca82a8/include/drivers/arm/fvp/fvp_pwrc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/gic600_multichip.h b/atf-20240117-bacca82a8/include/drivers/arm/gic600_multichip.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/gic600_multichip.h rename to atf-20240117-bacca82a8/include/drivers/arm/gic600_multichip.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/gic600ae_fmu.h b/atf-20240117-bacca82a8/include/drivers/arm/gic600ae_fmu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/gic600ae_fmu.h rename to atf-20240117-bacca82a8/include/drivers/arm/gic600ae_fmu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/gic_common.h b/atf-20240117-bacca82a8/include/drivers/arm/gic_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/gic_common.h rename to atf-20240117-bacca82a8/include/drivers/arm/gic_common.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/gicv2.h b/atf-20240117-bacca82a8/include/drivers/arm/gicv2.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/gicv2.h rename to atf-20240117-bacca82a8/include/drivers/arm/gicv2.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/gicv3.h b/atf-20240117-bacca82a8/include/drivers/arm/gicv3.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/gicv3.h rename to atf-20240117-bacca82a8/include/drivers/arm/gicv3.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/mhu.h b/atf-20240117-bacca82a8/include/drivers/arm/mhu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/mhu.h rename to atf-20240117-bacca82a8/include/drivers/arm/mhu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/nic_400.h b/atf-20240117-bacca82a8/include/drivers/arm/nic_400.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/nic_400.h rename to atf-20240117-bacca82a8/include/drivers/arm/nic_400.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/pl011.h b/atf-20240117-bacca82a8/include/drivers/arm/pl011.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/pl011.h rename to atf-20240117-bacca82a8/include/drivers/arm/pl011.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/pl061_gpio.h b/atf-20240117-bacca82a8/include/drivers/arm/pl061_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/pl061_gpio.h rename to atf-20240117-bacca82a8/include/drivers/arm/pl061_gpio.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/rss_comms.h b/atf-20240117-bacca82a8/include/drivers/arm/rss_comms.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/rss_comms.h rename to atf-20240117-bacca82a8/include/drivers/arm/rss_comms.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/sbsa.h b/atf-20240117-bacca82a8/include/drivers/arm/sbsa.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/sbsa.h rename to atf-20240117-bacca82a8/include/drivers/arm/sbsa.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/scu.h b/atf-20240117-bacca82a8/include/drivers/arm/scu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/scu.h rename to atf-20240117-bacca82a8/include/drivers/arm/scu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/smmu_v3.h b/atf-20240117-bacca82a8/include/drivers/arm/smmu_v3.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/smmu_v3.h rename to atf-20240117-bacca82a8/include/drivers/arm/smmu_v3.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/sp804_delay_timer.h b/atf-20240117-bacca82a8/include/drivers/arm/sp804_delay_timer.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/sp804_delay_timer.h rename to atf-20240117-bacca82a8/include/drivers/arm/sp804_delay_timer.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/sp805.h b/atf-20240117-bacca82a8/include/drivers/arm/sp805.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/sp805.h rename to atf-20240117-bacca82a8/include/drivers/arm/sp805.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/tzc380.h b/atf-20240117-bacca82a8/include/drivers/arm/tzc380.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/tzc380.h rename to atf-20240117-bacca82a8/include/drivers/arm/tzc380.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/tzc400.h b/atf-20240117-bacca82a8/include/drivers/arm/tzc400.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/tzc400.h rename to atf-20240117-bacca82a8/include/drivers/arm/tzc400.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/tzc_common.h b/atf-20240117-bacca82a8/include/drivers/arm/tzc_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/tzc_common.h rename to atf-20240117-bacca82a8/include/drivers/arm/tzc_common.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/tzc_dmc500.h b/atf-20240117-bacca82a8/include/drivers/arm/tzc_dmc500.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/tzc_dmc500.h rename to atf-20240117-bacca82a8/include/drivers/arm/tzc_dmc500.h diff --git a/atf-20231013-0ea67d76a/include/drivers/arm/tzc_dmc620.h b/atf-20240117-bacca82a8/include/drivers/arm/tzc_dmc620.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/arm/tzc_dmc620.h rename to atf-20240117-bacca82a8/include/drivers/arm/tzc_dmc620.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/auth_common.h b/atf-20240117-bacca82a8/include/drivers/auth/auth_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/auth_common.h rename to atf-20240117-bacca82a8/include/drivers/auth/auth_common.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/auth_mod.h b/atf-20240117-bacca82a8/include/drivers/auth/auth_mod.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/auth_mod.h rename to atf-20240117-bacca82a8/include/drivers/auth/auth_mod.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/crypto_mod.h b/atf-20240117-bacca82a8/include/drivers/auth/crypto_mod.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/crypto_mod.h rename to atf-20240117-bacca82a8/include/drivers/auth/crypto_mod.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/img_parser_mod.h b/atf-20240117-bacca82a8/include/drivers/auth/img_parser_mod.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/img_parser_mod.h rename to atf-20240117-bacca82a8/include/drivers/auth/img_parser_mod.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/mbedtls_common.h b/atf-20240117-bacca82a8/include/drivers/auth/mbedtls/mbedtls_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/mbedtls_common.h rename to atf-20240117-bacca82a8/include/drivers/auth/mbedtls/mbedtls_common.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/mbedtls_config-2.h b/atf-20240117-bacca82a8/include/drivers/auth/mbedtls/mbedtls_config-2.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/mbedtls_config-2.h rename to atf-20240117-bacca82a8/include/drivers/auth/mbedtls/mbedtls_config-2.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/mbedtls_config-3.h b/atf-20240117-bacca82a8/include/drivers/auth/mbedtls/mbedtls_config-3.h similarity index 97% rename from atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/mbedtls_config-3.h rename to atf-20240117-bacca82a8/include/drivers/auth/mbedtls/mbedtls_config-3.h index ba936a3c8..923fc5467 100644 --- a/atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/mbedtls_config-3.h +++ b/atf-20240117-bacca82a8/include/drivers/auth/mbedtls/mbedtls_config-3.h @@ -62,8 +62,12 @@ #if TF_MBEDTLS_USE_ECDSA #define MBEDTLS_ECDSA_C #define MBEDTLS_ECP_C +#if TF_MBEDTLS_KEY_SIZE == 384 +#define MBEDTLS_ECP_DP_SECP384R1_ENABLED +#else #define MBEDTLS_ECP_DP_SECP256R1_ENABLED #endif +#endif #if TF_MBEDTLS_USE_RSA #define MBEDTLS_RSA_C #define MBEDTLS_X509_RSASSA_PSS_SUPPORT diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/psa_mbedtls_config.h b/atf-20240117-bacca82a8/include/drivers/auth/mbedtls/psa_mbedtls_config.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/mbedtls/psa_mbedtls_config.h rename to atf-20240117-bacca82a8/include/drivers/auth/mbedtls/psa_mbedtls_config.h diff --git a/atf-20231013-0ea67d76a/include/drivers/auth/tbbr_cot_common.h b/atf-20240117-bacca82a8/include/drivers/auth/tbbr_cot_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/auth/tbbr_cot_common.h rename to atf-20240117-bacca82a8/include/drivers/auth/tbbr_cot_common.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/chimp.h b/atf-20240117-bacca82a8/include/drivers/brcm/chimp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/chimp.h rename to atf-20240117-bacca82a8/include/drivers/brcm/chimp.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/chimp_nv_defs.h b/atf-20240117-bacca82a8/include/drivers/brcm/chimp_nv_defs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/chimp_nv_defs.h rename to atf-20240117-bacca82a8/include/drivers/brcm/chimp_nv_defs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/dmu.h b/atf-20240117-bacca82a8/include/drivers/brcm/dmu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/dmu.h rename to atf-20240117-bacca82a8/include/drivers/brcm/dmu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/bcm_emmc.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/bcm_emmc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/bcm_emmc.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/bcm_emmc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_api.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_api.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_api.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_api.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_brcm_rdb_sd4_top.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_brcm_rdb_sd4_top.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_brcm_rdb_sd4_top.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_brcm_rdb_sd4_top.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_chal_sd.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_chal_sd.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_chal_sd.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_chal_sd.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_chal_types.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_chal_types.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_chal_types.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_chal_types.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_csl_sd.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_csl_sd.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_csl_sd.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_csl_sd.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_csl_sdcmd.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_csl_sdcmd.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_csl_sdcmd.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_csl_sdcmd.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_csl_sdprot.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_csl_sdprot.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_csl_sdprot.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_csl_sdprot.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.h b/atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.h rename to atf-20240117-bacca82a8/include/drivers/brcm/emmc/emmc_pboot_hal_memory_drv.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/fru.h b/atf-20240117-bacca82a8/include/drivers/brcm/fru.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/fru.h rename to atf-20240117-bacca82a8/include/drivers/brcm/fru.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/i2c/i2c.h b/atf-20240117-bacca82a8/include/drivers/brcm/i2c/i2c.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/i2c/i2c.h rename to atf-20240117-bacca82a8/include/drivers/brcm/i2c/i2c.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/i2c/i2c_regs.h b/atf-20240117-bacca82a8/include/drivers/brcm/i2c/i2c_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/i2c/i2c_regs.h rename to atf-20240117-bacca82a8/include/drivers/brcm/i2c/i2c_regs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/iproc_gpio.h b/atf-20240117-bacca82a8/include/drivers/brcm/iproc_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/iproc_gpio.h rename to atf-20240117-bacca82a8/include/drivers/brcm/iproc_gpio.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/mdio/mdio.h b/atf-20240117-bacca82a8/include/drivers/brcm/mdio/mdio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/mdio/mdio.h rename to atf-20240117-bacca82a8/include/drivers/brcm/mdio/mdio.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/ocotp.h b/atf-20240117-bacca82a8/include/drivers/brcm/ocotp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/ocotp.h rename to atf-20240117-bacca82a8/include/drivers/brcm/ocotp.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/scp.h b/atf-20240117-bacca82a8/include/drivers/brcm/scp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/scp.h rename to atf-20240117-bacca82a8/include/drivers/brcm/scp.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/sf.h b/atf-20240117-bacca82a8/include/drivers/brcm/sf.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/sf.h rename to atf-20240117-bacca82a8/include/drivers/brcm/sf.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/sotp.h b/atf-20240117-bacca82a8/include/drivers/brcm/sotp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/sotp.h rename to atf-20240117-bacca82a8/include/drivers/brcm/sotp.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/spi.h b/atf-20240117-bacca82a8/include/drivers/brcm/spi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/spi.h rename to atf-20240117-bacca82a8/include/drivers/brcm/spi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/spi_flash.h b/atf-20240117-bacca82a8/include/drivers/brcm/spi_flash.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/spi_flash.h rename to atf-20240117-bacca82a8/include/drivers/brcm/spi_flash.h diff --git a/atf-20231013-0ea67d76a/include/drivers/brcm/usbh_xhci_regs.h b/atf-20240117-bacca82a8/include/drivers/brcm/usbh_xhci_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/brcm/usbh_xhci_regs.h rename to atf-20240117-bacca82a8/include/drivers/brcm/usbh_xhci_regs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/cadence/cdns_combo_phy.h b/atf-20240117-bacca82a8/include/drivers/cadence/cdns_combo_phy.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/cadence/cdns_combo_phy.h rename to atf-20240117-bacca82a8/include/drivers/cadence/cdns_combo_phy.h diff --git a/atf-20231013-0ea67d76a/include/drivers/cadence/cdns_nand.h b/atf-20240117-bacca82a8/include/drivers/cadence/cdns_nand.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/cadence/cdns_nand.h rename to atf-20240117-bacca82a8/include/drivers/cadence/cdns_nand.h diff --git a/atf-20231013-0ea67d76a/include/drivers/cadence/cdns_sdmmc.h b/atf-20240117-bacca82a8/include/drivers/cadence/cdns_sdmmc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/cadence/cdns_sdmmc.h rename to atf-20240117-bacca82a8/include/drivers/cadence/cdns_sdmmc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/cadence/cdns_uart.h b/atf-20240117-bacca82a8/include/drivers/cadence/cdns_uart.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/cadence/cdns_uart.h rename to atf-20240117-bacca82a8/include/drivers/cadence/cdns_uart.h diff --git a/atf-20231013-0ea67d76a/include/drivers/cfi/v2m_flash.h b/atf-20240117-bacca82a8/include/drivers/cfi/v2m_flash.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/cfi/v2m_flash.h rename to atf-20240117-bacca82a8/include/drivers/cfi/v2m_flash.h diff --git a/atf-20231013-0ea67d76a/include/drivers/clk.h b/atf-20240117-bacca82a8/include/drivers/clk.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/clk.h rename to atf-20240117-bacca82a8/include/drivers/clk.h diff --git a/atf-20231013-0ea67d76a/include/drivers/console.h b/atf-20240117-bacca82a8/include/drivers/console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/console.h rename to atf-20240117-bacca82a8/include/drivers/console.h diff --git a/atf-20231013-0ea67d76a/include/drivers/console_assertions.h b/atf-20240117-bacca82a8/include/drivers/console_assertions.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/console_assertions.h rename to atf-20240117-bacca82a8/include/drivers/console_assertions.h diff --git a/atf-20231013-0ea67d76a/include/drivers/coreboot/cbmem_console.h b/atf-20240117-bacca82a8/include/drivers/coreboot/cbmem_console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/coreboot/cbmem_console.h rename to atf-20240117-bacca82a8/include/drivers/coreboot/cbmem_console.h diff --git a/atf-20231013-0ea67d76a/include/drivers/delay_timer.h b/atf-20240117-bacca82a8/include/drivers/delay_timer.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/delay_timer.h rename to atf-20240117-bacca82a8/include/drivers/delay_timer.h diff --git a/atf-20231013-0ea67d76a/include/drivers/dw_ufs.h b/atf-20240117-bacca82a8/include/drivers/dw_ufs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/dw_ufs.h rename to atf-20240117-bacca82a8/include/drivers/dw_ufs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/fwu/fwu.h b/atf-20240117-bacca82a8/include/drivers/fwu/fwu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/fwu/fwu.h rename to atf-20240117-bacca82a8/include/drivers/fwu/fwu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/fwu/fwu_metadata.h b/atf-20240117-bacca82a8/include/drivers/fwu/fwu_metadata.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/fwu/fwu_metadata.h rename to atf-20240117-bacca82a8/include/drivers/fwu/fwu_metadata.h diff --git a/atf-20231013-0ea67d76a/include/drivers/generic_delay_timer.h b/atf-20240117-bacca82a8/include/drivers/generic_delay_timer.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/generic_delay_timer.h rename to atf-20240117-bacca82a8/include/drivers/generic_delay_timer.h diff --git a/atf-20231013-0ea67d76a/include/drivers/gpio.h b/atf-20240117-bacca82a8/include/drivers/gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/gpio.h rename to atf-20240117-bacca82a8/include/drivers/gpio.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_block.h b/atf-20240117-bacca82a8/include/drivers/io/io_block.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_block.h rename to atf-20240117-bacca82a8/include/drivers/io/io_block.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_driver.h b/atf-20240117-bacca82a8/include/drivers/io/io_driver.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_driver.h rename to atf-20240117-bacca82a8/include/drivers/io/io_driver.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_encrypted.h b/atf-20240117-bacca82a8/include/drivers/io/io_encrypted.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_encrypted.h rename to atf-20240117-bacca82a8/include/drivers/io/io_encrypted.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_fip.h b/atf-20240117-bacca82a8/include/drivers/io/io_fip.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_fip.h rename to atf-20240117-bacca82a8/include/drivers/io/io_fip.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_memmap.h b/atf-20240117-bacca82a8/include/drivers/io/io_memmap.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_memmap.h rename to atf-20240117-bacca82a8/include/drivers/io/io_memmap.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_mtd.h b/atf-20240117-bacca82a8/include/drivers/io/io_mtd.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_mtd.h rename to atf-20240117-bacca82a8/include/drivers/io/io_mtd.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_semihosting.h b/atf-20240117-bacca82a8/include/drivers/io/io_semihosting.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_semihosting.h rename to atf-20240117-bacca82a8/include/drivers/io/io_semihosting.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_storage.h b/atf-20240117-bacca82a8/include/drivers/io/io_storage.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_storage.h rename to atf-20240117-bacca82a8/include/drivers/io/io_storage.h diff --git a/atf-20231013-0ea67d76a/include/drivers/io/io_ubi.h b/atf-20240117-bacca82a8/include/drivers/io/io_ubi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/io/io_ubi.h rename to atf-20240117-bacca82a8/include/drivers/io/io_ubi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/addr_map.h b/atf-20240117-bacca82a8/include/drivers/marvell/addr_map.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/addr_map.h rename to atf-20240117-bacca82a8/include/drivers/marvell/addr_map.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/amb_adec.h b/atf-20240117-bacca82a8/include/drivers/marvell/amb_adec.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/amb_adec.h rename to atf-20240117-bacca82a8/include/drivers/marvell/amb_adec.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/ap807_clocks_init.h b/atf-20240117-bacca82a8/include/drivers/marvell/ap807_clocks_init.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/ap807_clocks_init.h rename to atf-20240117-bacca82a8/include/drivers/marvell/ap807_clocks_init.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/aro.h b/atf-20240117-bacca82a8/include/drivers/marvell/aro.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/aro.h rename to atf-20240117-bacca82a8/include/drivers/marvell/aro.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/cache_llc.h b/atf-20240117-bacca82a8/include/drivers/marvell/cache_llc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/cache_llc.h rename to atf-20240117-bacca82a8/include/drivers/marvell/cache_llc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/ccu.h b/atf-20240117-bacca82a8/include/drivers/marvell/ccu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/ccu.h rename to atf-20240117-bacca82a8/include/drivers/marvell/ccu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/gwin.h b/atf-20240117-bacca82a8/include/drivers/marvell/gwin.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/gwin.h rename to atf-20240117-bacca82a8/include/drivers/marvell/gwin.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/i2c.h b/atf-20240117-bacca82a8/include/drivers/marvell/i2c.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/i2c.h rename to atf-20240117-bacca82a8/include/drivers/marvell/i2c.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/io_win.h b/atf-20240117-bacca82a8/include/drivers/marvell/io_win.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/io_win.h rename to atf-20240117-bacca82a8/include/drivers/marvell/io_win.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/iob.h b/atf-20240117-bacca82a8/include/drivers/marvell/iob.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/iob.h rename to atf-20240117-bacca82a8/include/drivers/marvell/iob.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/mci.h b/atf-20240117-bacca82a8/include/drivers/marvell/mci.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/mci.h rename to atf-20240117-bacca82a8/include/drivers/marvell/mci.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/mochi/ap_setup.h b/atf-20240117-bacca82a8/include/drivers/marvell/mochi/ap_setup.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/mochi/ap_setup.h rename to atf-20240117-bacca82a8/include/drivers/marvell/mochi/ap_setup.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/mochi/cp110_setup.h b/atf-20240117-bacca82a8/include/drivers/marvell/mochi/cp110_setup.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/mochi/cp110_setup.h rename to atf-20240117-bacca82a8/include/drivers/marvell/mochi/cp110_setup.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/thermal.h b/atf-20240117-bacca82a8/include/drivers/marvell/thermal.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/thermal.h rename to atf-20240117-bacca82a8/include/drivers/marvell/thermal.h diff --git a/atf-20231013-0ea67d76a/include/drivers/marvell/uart/a3700_console.h b/atf-20240117-bacca82a8/include/drivers/marvell/uart/a3700_console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/marvell/uart/a3700_console.h rename to atf-20240117-bacca82a8/include/drivers/marvell/uart/a3700_console.h diff --git a/atf-20231013-0ea67d76a/include/drivers/measured_boot/event_log/event_log.h b/atf-20240117-bacca82a8/include/drivers/measured_boot/event_log/event_log.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/measured_boot/event_log/event_log.h rename to atf-20240117-bacca82a8/include/drivers/measured_boot/event_log/event_log.h diff --git a/atf-20231013-0ea67d76a/include/drivers/measured_boot/event_log/tcg.h b/atf-20240117-bacca82a8/include/drivers/measured_boot/event_log/tcg.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/measured_boot/event_log/tcg.h rename to atf-20240117-bacca82a8/include/drivers/measured_boot/event_log/tcg.h diff --git a/atf-20231013-0ea67d76a/include/drivers/measured_boot/rss/rss_measured_boot.h b/atf-20240117-bacca82a8/include/drivers/measured_boot/rss/rss_measured_boot.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/measured_boot/rss/rss_measured_boot.h rename to atf-20240117-bacca82a8/include/drivers/measured_boot/rss/rss_measured_boot.h diff --git a/atf-20231013-0ea67d76a/include/drivers/mentor/mi2cv.h b/atf-20240117-bacca82a8/include/drivers/mentor/mi2cv.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/mentor/mi2cv.h rename to atf-20240117-bacca82a8/include/drivers/mentor/mi2cv.h diff --git a/atf-20231013-0ea67d76a/include/drivers/mmc.h b/atf-20240117-bacca82a8/include/drivers/mmc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/mmc.h rename to atf-20240117-bacca82a8/include/drivers/mmc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nand.h b/atf-20240117-bacca82a8/include/drivers/nand.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nand.h rename to atf-20240117-bacca82a8/include/drivers/nand.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nuvoton/npcm845x/npcm845x_clock.h b/atf-20240117-bacca82a8/include/drivers/nuvoton/npcm845x/npcm845x_clock.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nuvoton/npcm845x/npcm845x_clock.h rename to atf-20240117-bacca82a8/include/drivers/nuvoton/npcm845x/npcm845x_clock.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nuvoton/npcm845x/npcm845x_gcr.h b/atf-20240117-bacca82a8/include/drivers/nuvoton/npcm845x/npcm845x_gcr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nuvoton/npcm845x/npcm845x_gcr.h rename to atf-20240117-bacca82a8/include/drivers/nuvoton/npcm845x/npcm845x_gcr.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nuvoton/npcm845x/npcm845x_lpuart.h b/atf-20240117-bacca82a8/include/drivers/nuvoton/npcm845x/npcm845x_lpuart.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nuvoton/npcm845x/npcm845x_lpuart.h rename to atf-20240117-bacca82a8/include/drivers/nuvoton/npcm845x/npcm845x_lpuart.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/auth/csf_hdr_parser/csf_hdr.h b/atf-20240117-bacca82a8/include/drivers/nxp/auth/csf_hdr_parser/csf_hdr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/auth/csf_hdr_parser/csf_hdr.h rename to atf-20240117-bacca82a8/include/drivers/nxp/auth/csf_hdr_parser/csf_hdr.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/console/plat_console.h b/atf-20240117-bacca82a8/include/drivers/nxp/console/plat_console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/console/plat_console.h rename to atf-20240117-bacca82a8/include/drivers/nxp/console/plat_console.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/caam.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/caam.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/caam.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/caam.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/caam_io.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/caam_io.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/caam_io.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/caam_io.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/hash.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/hash.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/hash.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/hash.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/jobdesc.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/jobdesc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/jobdesc.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/jobdesc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/jr_driver_config.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/jr_driver_config.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/jr_driver_config.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/jr_driver_config.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/rsa.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/rsa.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/rsa.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/rsa.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/sec_hw_specific.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/sec_hw_specific.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/sec_hw_specific.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/sec_hw_specific.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/sec_jr_driver.h b/atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/sec_jr_driver.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/crypto/caam/sec_jr_driver.h rename to atf-20240117-bacca82a8/include/drivers/nxp/crypto/caam/sec_jr_driver.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/csu/csu.h b/atf-20240117-bacca82a8/include/drivers/nxp/csu/csu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/csu/csu.h rename to atf-20240117-bacca82a8/include/drivers/nxp/csu/csu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/dcfg.h b/atf-20240117-bacca82a8/include/drivers/nxp/dcfg/dcfg.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/dcfg.h rename to atf-20240117-bacca82a8/include/drivers/nxp/dcfg/dcfg.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/dcfg_lsch2.h b/atf-20240117-bacca82a8/include/drivers/nxp/dcfg/dcfg_lsch2.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/dcfg_lsch2.h rename to atf-20240117-bacca82a8/include/drivers/nxp/dcfg/dcfg_lsch2.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/dcfg_lsch3.h b/atf-20240117-bacca82a8/include/drivers/nxp/dcfg/dcfg_lsch3.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/dcfg_lsch3.h rename to atf-20240117-bacca82a8/include/drivers/nxp/dcfg/dcfg_lsch3.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/scfg.h b/atf-20240117-bacca82a8/include/drivers/nxp/dcfg/scfg.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/dcfg/scfg.h rename to atf-20240117-bacca82a8/include/drivers/nxp/dcfg/scfg.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/ddr.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/ddr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/ddr.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/ddr.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/ddr_io.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/ddr_io.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/ddr_io.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/ddr_io.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/dimm.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/dimm.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/dimm.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/dimm.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/fsl-mmdc/fsl_mmdc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/immap.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/immap.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/immap.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/immap.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/opts.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/opts.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/opts.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/opts.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/regs.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/regs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/regs.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/regs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ddr/utility.h b/atf-20240117-bacca82a8/include/drivers/nxp/ddr/utility.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ddr/utility.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ddr/utility.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/flexspi/flash_info.h b/atf-20240117-bacca82a8/include/drivers/nxp/flexspi/flash_info.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/flexspi/flash_info.h rename to atf-20240117-bacca82a8/include/drivers/nxp/flexspi/flash_info.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/flexspi/fspi_api.h b/atf-20240117-bacca82a8/include/drivers/nxp/flexspi/fspi_api.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/flexspi/fspi_api.h rename to atf-20240117-bacca82a8/include/drivers/nxp/flexspi/fspi_api.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/flexspi/xspi_error_codes.h b/atf-20240117-bacca82a8/include/drivers/nxp/flexspi/xspi_error_codes.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/flexspi/xspi_error_codes.h rename to atf-20240117-bacca82a8/include/drivers/nxp/flexspi/xspi_error_codes.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/gic/gicv2/plat_gic.h b/atf-20240117-bacca82a8/include/drivers/nxp/gic/gicv2/plat_gic.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/gic/gicv2/plat_gic.h rename to atf-20240117-bacca82a8/include/drivers/nxp/gic/gicv2/plat_gic.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/gic/gicv3/plat_gic.h b/atf-20240117-bacca82a8/include/drivers/nxp/gic/gicv3/plat_gic.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/gic/gicv3/plat_gic.h rename to atf-20240117-bacca82a8/include/drivers/nxp/gic/gicv3/plat_gic.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/gpio/nxp_gpio.h b/atf-20240117-bacca82a8/include/drivers/nxp/gpio/nxp_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/gpio/nxp_gpio.h rename to atf-20240117-bacca82a8/include/drivers/nxp/gpio/nxp_gpio.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/i2c/i2c.h b/atf-20240117-bacca82a8/include/drivers/nxp/i2c/i2c.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/i2c/i2c.h rename to atf-20240117-bacca82a8/include/drivers/nxp/i2c/i2c.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ifc/ifc_nand.h b/atf-20240117-bacca82a8/include/drivers/nxp/ifc/ifc_nand.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ifc/ifc_nand.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ifc/ifc_nand.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/ifc/ifc_nor.h b/atf-20240117-bacca82a8/include/drivers/nxp/ifc/ifc_nor.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/ifc/ifc_nor.h rename to atf-20240117-bacca82a8/include/drivers/nxp/ifc/ifc_nor.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/interconnect/ls_interconnect.h b/atf-20240117-bacca82a8/include/drivers/nxp/interconnect/ls_interconnect.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/interconnect/ls_interconnect.h rename to atf-20240117-bacca82a8/include/drivers/nxp/interconnect/ls_interconnect.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/pmu/pmu.h b/atf-20240117-bacca82a8/include/drivers/nxp/pmu/pmu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/pmu/pmu.h rename to atf-20240117-bacca82a8/include/drivers/nxp/pmu/pmu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/qspi/qspi.h b/atf-20240117-bacca82a8/include/drivers/nxp/qspi/qspi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/qspi/qspi.h rename to atf-20240117-bacca82a8/include/drivers/nxp/qspi/qspi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/sd/sd_mmc.h b/atf-20240117-bacca82a8/include/drivers/nxp/sd/sd_mmc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/sd/sd_mmc.h rename to atf-20240117-bacca82a8/include/drivers/nxp/sd/sd_mmc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/sec_mon/snvs.h b/atf-20240117-bacca82a8/include/drivers/nxp/sec_mon/snvs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/sec_mon/snvs.h rename to atf-20240117-bacca82a8/include/drivers/nxp/sec_mon/snvs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/sfp/fuse_prov.h b/atf-20240117-bacca82a8/include/drivers/nxp/sfp/fuse_prov.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/sfp/fuse_prov.h rename to atf-20240117-bacca82a8/include/drivers/nxp/sfp/fuse_prov.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/sfp/sfp.h b/atf-20240117-bacca82a8/include/drivers/nxp/sfp/sfp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/sfp/sfp.h rename to atf-20240117-bacca82a8/include/drivers/nxp/sfp/sfp.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/sfp/sfp_error_codes.h b/atf-20240117-bacca82a8/include/drivers/nxp/sfp/sfp_error_codes.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/sfp/sfp_error_codes.h rename to atf-20240117-bacca82a8/include/drivers/nxp/sfp/sfp_error_codes.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/smmu/nxp_smmu.h b/atf-20240117-bacca82a8/include/drivers/nxp/smmu/nxp_smmu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/smmu/nxp_smmu.h rename to atf-20240117-bacca82a8/include/drivers/nxp/smmu/nxp_smmu.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/timer/nxp_timer.h b/atf-20240117-bacca82a8/include/drivers/nxp/timer/nxp_timer.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/timer/nxp_timer.h rename to atf-20240117-bacca82a8/include/drivers/nxp/timer/nxp_timer.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/trdc/imx_trdc.h b/atf-20240117-bacca82a8/include/drivers/nxp/trdc/imx_trdc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/trdc/imx_trdc.h rename to atf-20240117-bacca82a8/include/drivers/nxp/trdc/imx_trdc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/tzc/plat_tzc380.h b/atf-20240117-bacca82a8/include/drivers/nxp/tzc/plat_tzc380.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/tzc/plat_tzc380.h rename to atf-20240117-bacca82a8/include/drivers/nxp/tzc/plat_tzc380.h diff --git a/atf-20231013-0ea67d76a/include/drivers/nxp/tzc/plat_tzc400.h b/atf-20240117-bacca82a8/include/drivers/nxp/tzc/plat_tzc400.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/nxp/tzc/plat_tzc400.h rename to atf-20240117-bacca82a8/include/drivers/nxp/tzc/plat_tzc400.h diff --git a/atf-20231013-0ea67d76a/include/drivers/partition/efi.h b/atf-20240117-bacca82a8/include/drivers/partition/efi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/partition/efi.h rename to atf-20240117-bacca82a8/include/drivers/partition/efi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/partition/gpt.h b/atf-20240117-bacca82a8/include/drivers/partition/gpt.h similarity index 83% rename from atf-20231013-0ea67d76a/include/drivers/partition/gpt.h rename to atf-20240117-bacca82a8/include/drivers/partition/gpt.h index c2a229e33..383c17de6 100644 --- a/atf-20231013-0ea67d76a/include/drivers/partition/gpt.h +++ b/atf-20240117-bacca82a8/include/drivers/partition/gpt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -12,10 +12,6 @@ #include #define PARTITION_TYPE_GPT 0xee -#define GPT_HEADER_OFFSET PLAT_PARTITION_BLOCK_SIZE -#define GPT_ENTRY_OFFSET (GPT_HEADER_OFFSET + \ - PLAT_PARTITION_BLOCK_SIZE) - #define GPT_SIGNATURE "EFI PART" typedef struct gpt_entry { @@ -45,7 +41,7 @@ typedef struct gpt_header { /* size of a single partition entry (usually 128) */ unsigned int part_size; unsigned int part_crc; -} gpt_header_t; +} __packed gpt_header_t; int parse_gpt_entry(gpt_entry_t *gpt_entry, partition_entry_t *entry); diff --git a/atf-20231013-0ea67d76a/include/drivers/partition/mbr.h b/atf-20240117-bacca82a8/include/drivers/partition/mbr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/partition/mbr.h rename to atf-20240117-bacca82a8/include/drivers/partition/mbr.h diff --git a/atf-20231013-0ea67d76a/include/drivers/partition/partition.h b/atf-20240117-bacca82a8/include/drivers/partition/partition.h similarity index 89% rename from atf-20231013-0ea67d76a/include/drivers/partition/partition.h rename to atf-20240117-bacca82a8/include/drivers/partition/partition.h index 5643d3ea5..d567d4cbb 100644 --- a/atf-20231013-0ea67d76a/include/drivers/partition/partition.h +++ b/atf-20240117-bacca82a8/include/drivers/partition/partition.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -29,7 +29,7 @@ CASSERT((PLAT_PARTITION_BLOCK_SIZE == 512) || #define LEGACY_PARTITION_BLOCK_SIZE 512 -#define DEFAULT_GPT_HEADER_SIZE 92 +#define LBA(n) ((unsigned long long)(n) * PLAT_PARTITION_BLOCK_SIZE) typedef struct partition_entry { uint64_t start; @@ -50,6 +50,6 @@ const partition_entry_t *get_partition_entry_by_type(const uuid_t *type_guid); const partition_entry_t *get_partition_entry_by_uuid(const uuid_t *part_uuid); const partition_entry_list_t *get_partition_entry_list(void); void partition_init(unsigned int image_id); -void partition_init_secondary_gpt(unsigned int image_id); +int gpt_partition_init(void); #endif /* PARTITION_H */ diff --git a/atf-20231013-0ea67d76a/include/drivers/rambus/trng_ip_76.h b/atf-20240117-bacca82a8/include/drivers/rambus/trng_ip_76.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/rambus/trng_ip_76.h rename to atf-20240117-bacca82a8/include/drivers/rambus/trng_ip_76.h diff --git a/atf-20231013-0ea67d76a/include/drivers/raw_nand.h b/atf-20240117-bacca82a8/include/drivers/raw_nand.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/raw_nand.h rename to atf-20240117-bacca82a8/include/drivers/raw_nand.h diff --git a/atf-20231013-0ea67d76a/include/drivers/renesas/rcar/console/console.h b/atf-20240117-bacca82a8/include/drivers/renesas/rcar/console/console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/renesas/rcar/console/console.h rename to atf-20240117-bacca82a8/include/drivers/renesas/rcar/console/console.h diff --git a/atf-20231013-0ea67d76a/include/drivers/rpi3/gpio/rpi3_gpio.h b/atf-20240117-bacca82a8/include/drivers/rpi3/gpio/rpi3_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/rpi3/gpio/rpi3_gpio.h rename to atf-20240117-bacca82a8/include/drivers/rpi3/gpio/rpi3_gpio.h diff --git a/atf-20231013-0ea67d76a/include/drivers/rpi3/mailbox/rpi3_mbox.h b/atf-20240117-bacca82a8/include/drivers/rpi3/mailbox/rpi3_mbox.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/rpi3/mailbox/rpi3_mbox.h rename to atf-20240117-bacca82a8/include/drivers/rpi3/mailbox/rpi3_mbox.h diff --git a/atf-20231013-0ea67d76a/include/drivers/rpi3/rng/rpi3_rng.h b/atf-20240117-bacca82a8/include/drivers/rpi3/rng/rpi3_rng.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/rpi3/rng/rpi3_rng.h rename to atf-20240117-bacca82a8/include/drivers/rpi3/rng/rpi3_rng.h diff --git a/atf-20231013-0ea67d76a/include/drivers/rpi3/sdhost/rpi3_sdhost.h b/atf-20240117-bacca82a8/include/drivers/rpi3/sdhost/rpi3_sdhost.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/rpi3/sdhost/rpi3_sdhost.h rename to atf-20240117-bacca82a8/include/drivers/rpi3/sdhost/rpi3_sdhost.h diff --git a/atf-20231013-0ea67d76a/include/drivers/scmi-msg.h b/atf-20240117-bacca82a8/include/drivers/scmi-msg.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/scmi-msg.h rename to atf-20240117-bacca82a8/include/drivers/scmi-msg.h diff --git a/atf-20231013-0ea67d76a/include/drivers/scmi.h b/atf-20240117-bacca82a8/include/drivers/scmi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/scmi.h rename to atf-20240117-bacca82a8/include/drivers/scmi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/spi_mem.h b/atf-20240117-bacca82a8/include/drivers/spi_mem.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/spi_mem.h rename to atf-20240117-bacca82a8/include/drivers/spi_mem.h diff --git a/atf-20231013-0ea67d76a/include/drivers/spi_nand.h b/atf-20240117-bacca82a8/include/drivers/spi_nand.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/spi_nand.h rename to atf-20240117-bacca82a8/include/drivers/spi_nand.h diff --git a/atf-20231013-0ea67d76a/include/drivers/spi_nor.h b/atf-20240117-bacca82a8/include/drivers/spi_nor.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/spi_nor.h rename to atf-20240117-bacca82a8/include/drivers/spi_nor.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/bsec.h b/atf-20240117-bacca82a8/include/drivers/st/bsec.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/bsec.h rename to atf-20240117-bacca82a8/include/drivers/st/bsec.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/bsec2_reg.h b/atf-20240117-bacca82a8/include/drivers/st/bsec2_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/bsec2_reg.h rename to atf-20240117-bacca82a8/include/drivers/st/bsec2_reg.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/etzpc.h b/atf-20240117-bacca82a8/include/drivers/st/etzpc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/etzpc.h rename to atf-20240117-bacca82a8/include/drivers/st/etzpc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/regulator.h b/atf-20240117-bacca82a8/include/drivers/st/regulator.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/regulator.h rename to atf-20240117-bacca82a8/include/drivers/st/regulator.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/regulator_fixed.h b/atf-20240117-bacca82a8/include/drivers/st/regulator_fixed.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/regulator_fixed.h rename to atf-20240117-bacca82a8/include/drivers/st/regulator_fixed.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_console.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_console.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_console.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_fmc2_nand.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_fmc2_nand.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_fmc2_nand.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_fmc2_nand.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_gpio.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_gpio.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_gpio.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_hash.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_hash.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_hash.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_hash.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_i2c.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_i2c.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_i2c.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_i2c.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_iwdg.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_iwdg.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_iwdg.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_iwdg.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_pka.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_pka.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_pka.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_pka.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_qspi.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_qspi.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_qspi.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_qspi.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_rng.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_rng.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_rng.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_rng.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_saes.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_saes.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_saes.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_saes.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_sdmmc2.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_sdmmc2.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_sdmmc2.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_sdmmc2.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_uart.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_uart.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_uart.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_uart.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32_uart_regs.h b/atf-20240117-bacca82a8/include/drivers/st/stm32_uart_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32_uart_regs.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32_uart_regs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp13_rcc.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp13_rcc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp13_rcc.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp13_rcc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp15_rcc.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp15_rcc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp15_rcc.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp15_rcc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_clk.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_clk.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_clk.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_clk.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ddr.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ddr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ddr.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ddr.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ddr_helpers.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ddr_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ddr_helpers.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ddr_helpers.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ddr_regs.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ddr_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ddr_regs.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ddr_regs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_pwr.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_pwr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_pwr.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_pwr.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ram.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ram.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_ram.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_ram.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_rcc.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_rcc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_rcc.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_rcc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_usb.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp1_usb.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp1_usb.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp1_usb.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp25_rcc.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp25_rcc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp25_rcc.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp25_rcc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp_clkfunc.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp_clkfunc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp_clkfunc.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp_clkfunc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ddr.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp_ddr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ddr.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp_ddr.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ddr_test.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp_ddr_test.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ddr_test.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp_ddr_test.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ddrctrl_regs.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp_ddrctrl_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ddrctrl_regs.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp_ddrctrl_regs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp_pmic.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp_pmic.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp_pmic.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp_pmic.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ram.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp_ram.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp_ram.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp_ram.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stm32mp_reset.h b/atf-20240117-bacca82a8/include/drivers/st/stm32mp_reset.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stm32mp_reset.h rename to atf-20240117-bacca82a8/include/drivers/st/stm32mp_reset.h diff --git a/atf-20231013-0ea67d76a/include/drivers/st/stpmic1.h b/atf-20240117-bacca82a8/include/drivers/st/stpmic1.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/st/stpmic1.h rename to atf-20240117-bacca82a8/include/drivers/st/stpmic1.h diff --git a/atf-20231013-0ea67d76a/include/drivers/synopsys/dw_mmc.h b/atf-20240117-bacca82a8/include/drivers/synopsys/dw_mmc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/synopsys/dw_mmc.h rename to atf-20240117-bacca82a8/include/drivers/synopsys/dw_mmc.h diff --git a/atf-20231013-0ea67d76a/include/drivers/ti/uart/uart_16550.h b/atf-20240117-bacca82a8/include/drivers/ti/uart/uart_16550.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/ti/uart/uart_16550.h rename to atf-20240117-bacca82a8/include/drivers/ti/uart/uart_16550.h diff --git a/atf-20231013-0ea67d76a/include/drivers/ufs.h b/atf-20240117-bacca82a8/include/drivers/ufs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/ufs.h rename to atf-20240117-bacca82a8/include/drivers/ufs.h diff --git a/atf-20231013-0ea67d76a/include/drivers/usb_device.h b/atf-20240117-bacca82a8/include/drivers/usb_device.h similarity index 100% rename from atf-20231013-0ea67d76a/include/drivers/usb_device.h rename to atf-20240117-bacca82a8/include/drivers/usb_device.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp1-clks.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp1-clks.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp1-clks.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp1-clks.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp1-clksrc.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp1-clksrc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp1-clksrc.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp1-clksrc.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp13-clks.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp13-clks.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp13-clks.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp13-clks.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp13-clksrc.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp13-clksrc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp13-clksrc.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp13-clksrc.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp15-clks.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp15-clks.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp15-clks.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp15-clks.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp15-clksrc.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp15-clksrc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp15-clksrc.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp15-clksrc.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp25-clks.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp25-clks.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp25-clks.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp25-clks.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp25-clksrc.h b/atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp25-clksrc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/clock/stm32mp25-clksrc.h rename to atf-20240117-bacca82a8/include/dt-bindings/clock/stm32mp25-clksrc.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/interrupt-controller/arm-gic.h b/atf-20240117-bacca82a8/include/dt-bindings/interrupt-controller/arm-gic.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/interrupt-controller/arm-gic.h rename to atf-20240117-bacca82a8/include/dt-bindings/interrupt-controller/arm-gic.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/interrupt-controller/irq.h b/atf-20240117-bacca82a8/include/dt-bindings/interrupt-controller/irq.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/interrupt-controller/irq.h rename to atf-20240117-bacca82a8/include/dt-bindings/interrupt-controller/irq.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/pinctrl/stm32-pinfunc.h b/atf-20240117-bacca82a8/include/dt-bindings/pinctrl/stm32-pinfunc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/pinctrl/stm32-pinfunc.h rename to atf-20240117-bacca82a8/include/dt-bindings/pinctrl/stm32-pinfunc.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp1-resets.h b/atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp1-resets.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp1-resets.h rename to atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp1-resets.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp13-resets.h b/atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp13-resets.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp13-resets.h rename to atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp13-resets.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp15-resets.h b/atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp15-resets.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp15-resets.h rename to atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp15-resets.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp25-resets.h b/atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp25-resets.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/reset/stm32mp25-resets.h rename to atf-20240117-bacca82a8/include/dt-bindings/reset/stm32mp25-resets.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/soc/st,stm32-etzpc.h b/atf-20240117-bacca82a8/include/dt-bindings/soc/st,stm32-etzpc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/soc/st,stm32-etzpc.h rename to atf-20240117-bacca82a8/include/dt-bindings/soc/st,stm32-etzpc.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/soc/stm32mp13-tzc400.h b/atf-20240117-bacca82a8/include/dt-bindings/soc/stm32mp13-tzc400.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/soc/stm32mp13-tzc400.h rename to atf-20240117-bacca82a8/include/dt-bindings/soc/stm32mp13-tzc400.h diff --git a/atf-20231013-0ea67d76a/include/dt-bindings/soc/stm32mp15-tzc400.h b/atf-20240117-bacca82a8/include/dt-bindings/soc/stm32mp15-tzc400.h similarity index 100% rename from atf-20231013-0ea67d76a/include/dt-bindings/soc/stm32mp15-tzc400.h rename to atf-20240117-bacca82a8/include/dt-bindings/soc/stm32mp15-tzc400.h diff --git a/atf-20231013-0ea67d76a/include/export/README b/atf-20240117-bacca82a8/include/export/README similarity index 100% rename from atf-20231013-0ea67d76a/include/export/README rename to atf-20240117-bacca82a8/include/export/README diff --git a/atf-20231013-0ea67d76a/include/export/common/bl_common_exp.h b/atf-20240117-bacca82a8/include/export/common/bl_common_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/common/bl_common_exp.h rename to atf-20240117-bacca82a8/include/export/common/bl_common_exp.h diff --git a/atf-20231013-0ea67d76a/include/export/common/ep_info_exp.h b/atf-20240117-bacca82a8/include/export/common/ep_info_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/common/ep_info_exp.h rename to atf-20240117-bacca82a8/include/export/common/ep_info_exp.h diff --git a/atf-20231013-0ea67d76a/include/export/common/param_header_exp.h b/atf-20240117-bacca82a8/include/export/common/param_header_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/common/param_header_exp.h rename to atf-20240117-bacca82a8/include/export/common/param_header_exp.h diff --git a/atf-20231013-0ea67d76a/include/export/common/tbbr/tbbr_img_def_exp.h b/atf-20240117-bacca82a8/include/export/common/tbbr/tbbr_img_def_exp.h similarity index 82% rename from atf-20231013-0ea67d76a/include/export/common/tbbr/tbbr_img_def_exp.h rename to atf-20240117-bacca82a8/include/export/common/tbbr/tbbr_img_def_exp.h index 98a00999d..ce17b4afb 100644 --- a/atf-20231013-0ea67d76a/include/export/common/tbbr/tbbr_img_def_exp.h +++ b/atf-20240117-bacca82a8/include/export/common/tbbr/tbbr_img_def_exp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2019-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -79,41 +79,44 @@ /* NT_FW_CONFIG */ #define NT_FW_CONFIG_ID U(27) -/* GPT Partition */ +/* GPT primary header and entries */ #define GPT_IMAGE_ID U(28) +/* GPT backup header and entries */ +#define BKUP_GPT_IMAGE_ID U(29) + /* Binary with STM32 header */ -#define STM32_IMAGE_ID U(29) +#define STM32_IMAGE_ID U(30) /* Encrypted image identifier */ -#define ENC_IMAGE_ID U(30) +#define ENC_IMAGE_ID U(31) /* FW_CONFIG */ -#define FW_CONFIG_ID U(31) +#define FW_CONFIG_ID U(32) /* * Primary FWU metadata image ID */ -#define FWU_METADATA_IMAGE_ID U(32) +#define FWU_METADATA_IMAGE_ID U(33) /* * Backup FWU metadata image ID */ -#define BKUP_FWU_METADATA_IMAGE_ID U(33) +#define BKUP_FWU_METADATA_IMAGE_ID U(34) /* Realm Monitor Manager (RMM) */ -#define RMM_IMAGE_ID U(34) +#define RMM_IMAGE_ID U(35) /* CCA Content Certificate ID */ -#define CCA_CONTENT_CERT_ID U(35) +#define CCA_CONTENT_CERT_ID U(36) /* Core SWD Key Certificate ID */ -#define CORE_SWD_KEY_CERT_ID U(36) +#define CORE_SWD_KEY_CERT_ID U(37) /* Platform Key Certificate ID */ -#define PLAT_KEY_CERT_ID U(37) +#define PLAT_KEY_CERT_ID U(38) /* Max Images */ -#define MAX_IMAGE_IDS U(38) +#define MAX_IMAGE_IDS U(39) #endif /* ARM_TRUSTED_FIRMWARE_EXPORT_COMMON_TBBR_TBBR_IMG_DEF_EXP_H */ diff --git a/atf-20231013-0ea67d76a/include/export/drivers/gpio_exp.h b/atf-20240117-bacca82a8/include/export/drivers/gpio_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/drivers/gpio_exp.h rename to atf-20240117-bacca82a8/include/export/drivers/gpio_exp.h diff --git a/atf-20231013-0ea67d76a/include/export/lib/bl_aux_params/bl_aux_params_exp.h b/atf-20240117-bacca82a8/include/export/lib/bl_aux_params/bl_aux_params_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/lib/bl_aux_params/bl_aux_params_exp.h rename to atf-20240117-bacca82a8/include/export/lib/bl_aux_params/bl_aux_params_exp.h diff --git a/atf-20231013-0ea67d76a/include/export/lib/utils_def_exp.h b/atf-20240117-bacca82a8/include/export/lib/utils_def_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/lib/utils_def_exp.h rename to atf-20240117-bacca82a8/include/export/lib/utils_def_exp.h diff --git a/atf-20231013-0ea67d76a/include/export/plat/mediatek/common/plat_params_exp.h b/atf-20240117-bacca82a8/include/export/plat/mediatek/common/plat_params_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/plat/mediatek/common/plat_params_exp.h rename to atf-20240117-bacca82a8/include/export/plat/mediatek/common/plat_params_exp.h diff --git a/atf-20231013-0ea67d76a/include/export/plat/rockchip/common/plat_params_exp.h b/atf-20240117-bacca82a8/include/export/plat/rockchip/common/plat_params_exp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/export/plat/rockchip/common/plat_params_exp.h rename to atf-20240117-bacca82a8/include/export/plat/rockchip/common/plat_params_exp.h diff --git a/atf-20231013-0ea67d76a/include/lib/bakery_lock.h b/atf-20240117-bacca82a8/include/lib/bakery_lock.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/bakery_lock.h rename to atf-20240117-bacca82a8/include/lib/bakery_lock.h diff --git a/atf-20231013-0ea67d76a/include/lib/bl_aux_params/bl_aux_params.h b/atf-20240117-bacca82a8/include/lib/bl_aux_params/bl_aux_params.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/bl_aux_params/bl_aux_params.h rename to atf-20240117-bacca82a8/include/lib/bl_aux_params/bl_aux_params.h diff --git a/atf-20231013-0ea67d76a/include/lib/bootmarker_capture.h b/atf-20240117-bacca82a8/include/lib/bootmarker_capture.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/bootmarker_capture.h rename to atf-20240117-bacca82a8/include/lib/bootmarker_capture.h diff --git a/atf-20231013-0ea67d76a/include/lib/cassert.h b/atf-20240117-bacca82a8/include/lib/cassert.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cassert.h rename to atf-20240117-bacca82a8/include/lib/cassert.h diff --git a/atf-20231013-0ea67d76a/include/lib/coreboot.h b/atf-20240117-bacca82a8/include/lib/coreboot.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/coreboot.h rename to atf-20240117-bacca82a8/include/lib/coreboot.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/aem_generic.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/aem_generic.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/aem_generic.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/aem_generic.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a12.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a12.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a12.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a12.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a15.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a15.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a15.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a15.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a17.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a17.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a17.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a17.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a32.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a32.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a32.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a32.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a5.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a5.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a5.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a5.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a53.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a53.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a53.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a53.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a57.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a57.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a57.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a57.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a7.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a7.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a7.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a7.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a72.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a72.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a72.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a72.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a9.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a9.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cortex_a9.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cortex_a9.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cpu_macros.S b/atf-20240117-bacca82a8/include/lib/cpus/aarch32/cpu_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch32/cpu_macros.S rename to atf-20240117-bacca82a8/include/lib/cpus/aarch32/cpu_macros.S diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/a64fx.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/a64fx.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/a64fx.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/a64fx.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/aem_generic.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/aem_generic.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/aem_generic.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/aem_generic.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a35.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a35.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a35.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a35.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a510.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a510.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a510.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a510.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a520.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a520.h similarity index 71% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a520.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a520.h index 417698152..619a15d1c 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a520.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a520.h @@ -12,8 +12,15 @@ /******************************************************************************* * CPU Extended Control register specific definitions ******************************************************************************/ +#define CORTEX_A520_CPUACTLR_EL1 S3_0_C15_C1_0 + #define CORTEX_A520_CPUECTLR_EL1 S3_0_C15_C1_4 +/******************************************************************************* + * CPU Auxiliary Control register 1 specific definitions. + ******************************************************************************/ +#define CORTEX_A520_CPUACTLR_EL1 S3_0_C15_C1_0 + /******************************************************************************* * CPU Power Control register specific definitions ******************************************************************************/ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a53.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a53.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a53.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a53.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a55.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a55.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a55.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a55.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a57.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a57.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a57.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a57.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a65.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a65.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a65.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a65.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a65ae.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a65ae.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a65ae.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a65ae.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a710.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a710.h similarity index 89% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a710.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a710.h index 432e17aba..9df8d471b 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a710.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a710.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, Arm Limited. All rights reserved. + * Copyright (c) 2021-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -38,6 +38,11 @@ #define CORTEX_A710_CPUACTLR2_EL1_BIT_40 (ULL(1) << 40) #define CORTEX_A710_CPUACTLR2_EL1_BIT_36 (ULL(1) << 36) +/******************************************************************************* + * CPU Auxiliary Control register 3 specific definitions. + ******************************************************************************/ +#define CORTEX_A710_CPUACTLR3_EL1 S3_0_C15_C1_2 + /******************************************************************************* * CPU Auxiliary Control register 5 specific definitions. ******************************************************************************/ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a715.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a715.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a715.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a715.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a72.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a72.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a72.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a72.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a720.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a720.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a720.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a720.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a73.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a73.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a73.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a73.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a75.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a75.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a75.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a75.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a76.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a76.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a76.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a76.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a76ae.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a76ae.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a76ae.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a76ae.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a77.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a77.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a77.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a77.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a78.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a78.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a78.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a78.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a78_ae.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a78_ae.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a78_ae.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a78_ae.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a78c.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a78c.h similarity index 89% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a78c.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a78c.h index 301be69a4..d600ecab5 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_a78c.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_a78c.h @@ -47,4 +47,9 @@ #define CORTEX_A78C_IMP_CPUPOR_EL3 S3_6_C15_C8_2 #define CORTEX_A78C_IMP_CPUPMR_EL3 S3_6_C15_C8_3 +/******************************************************************************* + * CPU Auxiliary Control register 5 specific definitions. + ******************************************************************************/ +#define CORTEX_A78C_ACTLR5_EL1 S3_0_C15_C9_0 + #endif /* CORTEX_A78C_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_blackhawk.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_blackhawk.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_blackhawk.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_blackhawk.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_chaberton.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_chaberton.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_chaberton.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_chaberton.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_gelas.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_gelas.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_gelas.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_gelas.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x1.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x1.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x1.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x1.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x2.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x2.h similarity index 89% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x2.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x2.h index 863b8c8d3..0f97b1e11 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x2.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, Arm Limited. All rights reserved. + * Copyright (c) 2021-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -27,6 +27,11 @@ #define CORTEX_X2_CPUECTLR2_EL1_PF_MODE_WIDTH U(4) #define CORTEX_X2_CPUECTLR2_EL1_PF_MODE_CNSRV ULL(0x9) +/******************************************************************************* + * CPU Auxiliary Control register 3 specific definitions. + ******************************************************************************/ +#define CORTEX_X2_CPUACTLR3_EL1 S3_0_C15_C1_2 + /******************************************************************************* * CPU Power Control register specific definitions ******************************************************************************/ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x3.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x3.h similarity index 86% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x3.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x3.h index 04548eae4..4a3ac775e 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x3.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x3.h @@ -47,4 +47,10 @@ #define CORTEX_X3_CPUECTLR2_EL1_PF_MODE_WIDTH U(4) #define CORTEX_X3_CPUECTLR2_EL1_PF_MODE_CNSRV ULL(0x9) +/******************************************************************************* + * CPU Auxiliary Control register 3 specific definitions. + ******************************************************************************/ +#define CORTEX_X3_CPUACTLR3_EL1 S3_0_C15_C1_2 +#define CORTEX_X3_CPUACTLR3_EL1_BIT_47 (ULL(1) << 47) + #endif /* CORTEX_X3_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x4.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x4.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cortex_x4.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cortex_x4.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cpu_macros.S b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cpu_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cpu_macros.S rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cpu_macros.S diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cpuamu.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/cpuamu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/cpuamu.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/cpuamu.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/denver.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/denver.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/denver.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/denver.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/dsu_def.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/dsu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/dsu_def.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/dsu_def.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/generic.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/generic.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/generic.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/generic.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_e1.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_e1.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_e1.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_e1.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_hermes.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_hermes.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_hermes.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_hermes.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_n1.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_n1.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_n1.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_n1.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_n2.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_n2.h similarity index 94% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_n2.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_n2.h index 0d5085433..b379faba6 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_n2.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_n2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, Arm Limited. All rights reserved. + * Copyright (c) 2020-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -65,5 +65,8 @@ #define NEOVERSE_N2_CPUECTLR2_EL1_PF_MODE_CNSRV ULL(9) #define CPUECTLR2_EL1_PF_MODE_LSB U(11) #define CPUECTLR2_EL1_PF_MODE_WIDTH U(4) +#define CPUECTLR2_EL1_TXREQ_STATIC_FULL ULL(0) +#define CPUECTLR2_EL1_TXREQ_LSB U(0) +#define CPUECTLR2_EL1_TXREQ_WIDTH U(3) #endif /* NEOVERSE_N2_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_n_common.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_n_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_n_common.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_n_common.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_poseidon.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_poseidon.h similarity index 84% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_poseidon.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_poseidon.h index 202ef5cb8..117826d07 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_poseidon.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_poseidon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Arm Limited. All rights reserved. + * Copyright (c) 2022-2024, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -8,7 +8,8 @@ #define NEOVERSE_POSEIDON_H -#define NEOVERSE_POSEIDON_MIDR U(0x410FD830) +#define NEOVERSE_POSEIDON_VNAE_MIDR U(0x410FD830) +#define NEOVERSE_POSEIDON_V_MIDR U(0x410FD840) /* Neoverse Poseidon loop count for CVE-2022-23960 mitigation */ #define NEOVERSE_POSEIDON_BHB_LOOP_COUNT U(132) diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_v1.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_v1.h similarity index 97% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_v1.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_v1.h index d61899428..1e2d7eaf9 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_v1.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_v1.h @@ -47,5 +47,6 @@ #define NEOVERSE_V1_ACTLR5_EL1 S3_0_C15_C9_0 #define NEOVERSE_V1_ACTLR5_EL1_BIT_55 (ULL(1) << 55) #define NEOVERSE_V1_ACTLR5_EL1_BIT_56 (ULL(1) << 56) +#define NEOVERSE_V1_ACTLR5_EL1_BIT_61 (ULL(1) << 61) #endif /* NEOVERSE_V1_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_v2.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_v2.h similarity index 85% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_v2.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_v2.h index 68c15587f..39a660713 100644 --- a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/neoverse_v2.h +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/neoverse_v2.h @@ -22,6 +22,10 @@ ******************************************************************************/ #define NEOVERSE_V2_CPUPWRCTLR_EL1 S3_0_C15_C2_7 #define NEOVERSE_V2_CPUPWRCTLR_EL1_CORE_PWRDN_BIT U(1) +#define NEOVERSE_V2_CPUPWRCTLR_EL1_WFI_RET_CTRL_SHIFT U(4) +#define NEOVERSE_V2_CPUPWRCTLR_EL1_WFI_RET_CTRL_WIDTH U(3) +#define NEOVERSE_V2_CPUPWRCTLR_EL1_WFE_RET_CTRL_SHIFT U(7) +#define NEOVERSE_V2_CPUPWRCTLR_EL1_WFE_RET_CTRL_WIDTH U(3) /******************************************************************************* * CPU Extended Control register 2 specific definitions. @@ -30,6 +34,9 @@ #define NEOVERSE_V2_CPUECTLR2_EL1_PF_MODE_CNSRV ULL(9) #define NEOVERSE_V2_CPUECTLR2_EL1_PF_MODE_LSB U(11) #define NEOVERSE_V2_CPUECTLR2_EL1_PF_MODE_WIDTH U(4) +#define NEOVERSE_V2_CPUECTLR2_EL1_TXREQ_STATIC_FULL ULL(0) +#define NEOVERSE_V2_CPUECTLR2_EL1_TXREQ_LSB U(0) +#define NEOVERSE_V2_CPUECTLR2_EL1_TXREQ_WIDTH U(3) /******************************************************************************* * CPU Auxiliary Control register 2 specific definitions. diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/nevis.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/nevis.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/nevis.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/nevis.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/qemu_max.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/qemu_max.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/qemu_max.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/qemu_max.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/aarch64/rainier.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/rainier.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/aarch64/rainier.h rename to atf-20240117-bacca82a8/include/lib/cpus/aarch64/rainier.h diff --git a/atf-20240117-bacca82a8/include/lib/cpus/aarch64/travis.h b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/travis.h new file mode 100644 index 000000000..a8a255673 --- /dev/null +++ b/atf-20240117-bacca82a8/include/lib/cpus/aarch64/travis.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef TRAVIS_H +#define TRAVIS_H + +#define TRAVIS_MIDR U(0x410FD8C0) + +/******************************************************************************* + * CPU Extended Control register specific definitions + ******************************************************************************/ +#define TRAVIS_IMP_CPUECTLR_EL1 S3_0_C15_C1_4 + +/******************************************************************************* + * CPU Power Control register specific definitions + ******************************************************************************/ +#define TRAVIS_IMP_CPUPWRCTLR_EL1 S3_0_C15_C2_7 +#define TRAVIS_IMP_CPUPWRCTLR_EL1_CORE_PWRDN_EN_BIT U(1) + +/******************************************************************************* + * SME Control registers + ******************************************************************************/ +#define TRAVIS_SVCRSM S0_3_C4_C2_3 +#define TRAVIS_SVCRZA S0_3_C4_C4_3 + +#endif /* TRAVIS_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/cpu_ops.h b/atf-20240117-bacca82a8/include/lib/cpus/cpu_ops.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/cpu_ops.h rename to atf-20240117-bacca82a8/include/lib/cpus/cpu_ops.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/errata.h b/atf-20240117-bacca82a8/include/lib/cpus/errata.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/errata.h rename to atf-20240117-bacca82a8/include/lib/cpus/errata.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/wa_cve_2017_5715.h b/atf-20240117-bacca82a8/include/lib/cpus/wa_cve_2017_5715.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/wa_cve_2017_5715.h rename to atf-20240117-bacca82a8/include/lib/cpus/wa_cve_2017_5715.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/wa_cve_2018_3639.h b/atf-20240117-bacca82a8/include/lib/cpus/wa_cve_2018_3639.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/wa_cve_2018_3639.h rename to atf-20240117-bacca82a8/include/lib/cpus/wa_cve_2018_3639.h diff --git a/atf-20231013-0ea67d76a/include/lib/cpus/wa_cve_2022_23960.h b/atf-20240117-bacca82a8/include/lib/cpus/wa_cve_2022_23960.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/cpus/wa_cve_2022_23960.h rename to atf-20240117-bacca82a8/include/lib/cpus/wa_cve_2022_23960.h diff --git a/atf-20231013-0ea67d76a/include/lib/debugfs.h b/atf-20240117-bacca82a8/include/lib/debugfs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/debugfs.h rename to atf-20240117-bacca82a8/include/lib/debugfs.h diff --git a/atf-20231013-0ea67d76a/include/lib/el3_runtime/aarch32/context.h b/atf-20240117-bacca82a8/include/lib/el3_runtime/aarch32/context.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/el3_runtime/aarch32/context.h rename to atf-20240117-bacca82a8/include/lib/el3_runtime/aarch32/context.h diff --git a/atf-20231013-0ea67d76a/include/lib/el3_runtime/aarch64/context.h b/atf-20240117-bacca82a8/include/lib/el3_runtime/aarch64/context.h similarity index 82% rename from atf-20231013-0ea67d76a/include/lib/el3_runtime/aarch64/context.h rename to atf-20240117-bacca82a8/include/lib/el3_runtime/aarch64/context.h index ebd0e3055..f6376194d 100644 --- a/atf-20231013-0ea67d76a/include/lib/el3_runtime/aarch64/context.h +++ b/atf-20240117-bacca82a8/include/lib/el3_runtime/aarch64/context.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,6 +7,7 @@ #ifndef CONTEXT_H #define CONTEXT_H +#include #include /******************************************************************************* @@ -61,9 +62,22 @@ #define CTX_ELR_EL3 U(0x20) #define CTX_PMCR_EL0 U(0x28) #define CTX_IS_IN_EL3 U(0x30) -#define CTX_CPTR_EL3 U(0x38) -#define CTX_ZCR_EL3 U(0x40) -#define CTX_EL3STATE_END U(0x50) /* Align to the next 16 byte boundary */ +/* Constants required in supporting nested exception in EL3 */ +#define CTX_SAVED_ELR_EL3 U(0x38) +/* + * General purpose flag, to save various EL3 states + * FFH mode : Used to identify if handling nested exception + * KFH mode : Used as counter value + */ +#define CTX_NESTED_EA_FLAG U(0x40) +#if FFH_SUPPORT + #define CTX_SAVED_ESR_EL3 U(0x48) + #define CTX_SAVED_SPSR_EL3 U(0x50) + #define CTX_SAVED_GPREG_LR U(0x58) + #define CTX_EL3STATE_END U(0x60) /* Align to the next 16 byte boundary */ +#else + #define CTX_EL3STATE_END U(0x50) /* Align to the next 16 byte boundary */ +#endif /* FFH_SUPPORT */ /******************************************************************************* * Constants that allow assembler code to access members of and the @@ -193,52 +207,40 @@ // Only if MTE registers in use #define CTX_TFSR_EL2 U(0x100) -#define CTX_MPAM2_EL2 U(0x108) -#define CTX_MPAMHCR_EL2 U(0x110) -#define CTX_MPAMVPM0_EL2 U(0x118) -#define CTX_MPAMVPM1_EL2 U(0x120) -#define CTX_MPAMVPM2_EL2 U(0x128) -#define CTX_MPAMVPM3_EL2 U(0x130) -#define CTX_MPAMVPM4_EL2 U(0x138) -#define CTX_MPAMVPM5_EL2 U(0x140) -#define CTX_MPAMVPM6_EL2 U(0x148) -#define CTX_MPAMVPM7_EL2 U(0x150) -#define CTX_MPAMVPMV_EL2 U(0x158) - // Starting with Armv8.6 -#define CTX_HDFGRTR_EL2 U(0x160) -#define CTX_HAFGRTR_EL2 U(0x168) -#define CTX_HDFGWTR_EL2 U(0x170) -#define CTX_HFGITR_EL2 U(0x178) -#define CTX_HFGRTR_EL2 U(0x180) -#define CTX_HFGWTR_EL2 U(0x188) -#define CTX_CNTPOFF_EL2 U(0x190) +#define CTX_HDFGRTR_EL2 U(0x108) +#define CTX_HAFGRTR_EL2 U(0x110) +#define CTX_HDFGWTR_EL2 U(0x118) +#define CTX_HFGITR_EL2 U(0x120) +#define CTX_HFGRTR_EL2 U(0x128) +#define CTX_HFGWTR_EL2 U(0x130) +#define CTX_CNTPOFF_EL2 U(0x138) // Starting with Armv8.4 -#define CTX_CONTEXTIDR_EL2 U(0x198) -#define CTX_TTBR1_EL2 U(0x1a0) -#define CTX_VDISR_EL2 U(0x1a8) -#define CTX_VSESR_EL2 U(0x1b0) -#define CTX_VNCR_EL2 U(0x1b8) -#define CTX_TRFCR_EL2 U(0x1c0) +#define CTX_CONTEXTIDR_EL2 U(0x140) +#define CTX_TTBR1_EL2 U(0x148) +#define CTX_VDISR_EL2 U(0x150) +#define CTX_VSESR_EL2 U(0x158) +#define CTX_VNCR_EL2 U(0x160) +#define CTX_TRFCR_EL2 U(0x168) // Starting with Armv8.5 -#define CTX_SCXTNUM_EL2 U(0x1c8) +#define CTX_SCXTNUM_EL2 U(0x170) // Register for FEAT_HCX -#define CTX_HCRX_EL2 U(0x1d0) +#define CTX_HCRX_EL2 U(0x178) // Starting with Armv8.9 -#define CTX_TCR2_EL2 U(0x1d8) -#define CTX_POR_EL2 U(0x1e0) -#define CTX_PIRE0_EL2 U(0x1e8) -#define CTX_PIR_EL2 U(0x1f0) -#define CTX_S2PIR_EL2 U(0x1f8) -#define CTX_GCSCR_EL2 U(0x200) -#define CTX_GCSPR_EL2 U(0x208) +#define CTX_TCR2_EL2 U(0x180) +#define CTX_POR_EL2 U(0x188) +#define CTX_PIRE0_EL2 U(0x190) +#define CTX_PIR_EL2 U(0x198) +#define CTX_S2PIR_EL2 U(0x1a0) +#define CTX_GCSCR_EL2 U(0x1a8) +#define CTX_GCSPR_EL2 U(0x1b0) /* Align to the next 16 byte boundary */ -#define CTX_EL2_SYSREGS_END U(0x210) +#define CTX_EL2_SYSREGS_END U(0x1c0) #endif /* CTX_INCLUDE_EL2_REGS */ @@ -323,6 +325,35 @@ #define CTX_PAUTH_REGS_END U(0) #endif /* CTX_INCLUDE_PAUTH_REGS */ +/******************************************************************************* + * Registers related to ARMv8.2-MPAM. + ******************************************************************************/ +#define CTX_MPAM_REGS_OFFSET (CTX_PAUTH_REGS_OFFSET + CTX_PAUTH_REGS_END) +#if CTX_INCLUDE_MPAM_REGS +#define CTX_MPAM2_EL2 U(0x0) +#define CTX_MPAMHCR_EL2 U(0x8) +#define CTX_MPAMVPM0_EL2 U(0x10) +#define CTX_MPAMVPM1_EL2 U(0x18) +#define CTX_MPAMVPM2_EL2 U(0x20) +#define CTX_MPAMVPM3_EL2 U(0x28) +#define CTX_MPAMVPM4_EL2 U(0x30) +#define CTX_MPAMVPM5_EL2 U(0x38) +#define CTX_MPAMVPM6_EL2 U(0x40) +#define CTX_MPAMVPM7_EL2 U(0x48) +#define CTX_MPAMVPMV_EL2 U(0x50) +#define CTX_MPAM_REGS_END U(0x60) +#else +#define CTX_MPAM_REGS_END U(0x0) +#endif /* CTX_INCLUDE_MPAM_REGS */ + +/******************************************************************************* + * Registers initialised in a per-world context. + ******************************************************************************/ +#define CTX_CPTR_EL3 U(0x0) +#define CTX_ZCR_EL3 U(0x8) +#define CTX_MPAM3_EL3 U(0x10) +#define CTX_PERWORLD_EL3STATE_END U(0x18) + #ifndef __ASSEMBLER__ #include @@ -353,6 +384,9 @@ #if CTX_INCLUDE_PAUTH_REGS # define CTX_PAUTH_REGS_ALL (CTX_PAUTH_REGS_END >> DWORD_SHIFT) #endif +#if CTX_INCLUDE_MPAM_REGS +# define CTX_MPAM_REGS_ALL (CTX_MPAM_REGS_END >> DWORD_SHIFT) +#endif /* * AArch64 general purpose register context structure. Usually x0-x18, @@ -401,6 +435,11 @@ DEFINE_REG_STRUCT(cve_2018_3639, CTX_CVE_2018_3639_ALL); DEFINE_REG_STRUCT(pauth, CTX_PAUTH_REGS_ALL); #endif +/* Registers associated to ARMv8.2 MPAM */ +#if CTX_INCLUDE_MPAM_REGS +DEFINE_REG_STRUCT(mpam, CTX_MPAM_REGS_ALL); +#endif + /* * Macros to access members of any of the above structures using their * offsets @@ -431,8 +470,23 @@ typedef struct cpu_context { #if CTX_INCLUDE_PAUTH_REGS pauth_t pauth_ctx; #endif +#if CTX_INCLUDE_MPAM_REGS + mpam_t mpam_ctx; +#endif } cpu_context_t; +/* + * Per-World Context. + * It stores registers whose values can be shared across CPUs. + */ +typedef struct per_world_context { + uint64_t ctx_cptr_el3; + uint64_t ctx_zcr_el3; + uint64_t ctx_mpam3_el3; +} per_world_context_t; + +extern per_world_context_t per_world_context[CPU_DATA_CONTEXT_NUM]; + /* Macros to access members of the 'cpu_context_t' structure */ #define get_el3state_ctx(h) (&((cpu_context_t *) h)->el3state_ctx) #if CTX_INCLUDE_FPREGS @@ -447,6 +501,9 @@ typedef struct cpu_context { #if CTX_INCLUDE_PAUTH_REGS # define get_pauth_ctx(h) (&((cpu_context_t *) h)->pauth_ctx) #endif +#if CTX_INCLUDE_MPAM_REGS +# define get_mpam_ctx(h) (&((cpu_context_t *) h)->mpam_ctx) +#endif /* * Compile time assertions related to the 'cpu_context' structure to @@ -473,6 +530,10 @@ CASSERT(CTX_CVE_2018_3639_OFFSET == __builtin_offsetof(cpu_context_t, cve_2018_3 CASSERT(CTX_PAUTH_REGS_OFFSET == __builtin_offsetof(cpu_context_t, pauth_ctx), assert_core_context_pauth_offset_mismatch); #endif +#if CTX_INCLUDE_MPAM_REGS +CASSERT(CTX_MPAM_REGS_OFFSET == __builtin_offsetof(cpu_context_t, mpam_ctx), + assert_core_context_mpam_offset_mismatch); +#endif /* * Helper macro to set the general purpose registers that correspond to diff --git a/atf-20240117-bacca82a8/include/lib/el3_runtime/context_debug.h b/atf-20240117-bacca82a8/include/lib/el3_runtime/context_debug.h new file mode 100644 index 000000000..51e77482d --- /dev/null +++ b/atf-20240117-bacca82a8/include/lib/el3_runtime/context_debug.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2023, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef CONTEXT_DEBUG_H +#define CONTEXT_DEBUG_H + +#if PLATFORM_REPORT_CTX_MEM_USE && defined(__aarch64__) +/******************************************************************************** + * Reports the allocated memory for every security state and then reports the + * total system-wide allocated memory. + *******************************************************************************/ +void report_ctx_memory_usage(void); +#else +static inline void report_ctx_memory_usage(void) {} +#endif /* PLATFORM_REPORT_CTX_MEM_USE */ + +#endif /* CONTEXT_DEBUG_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/el3_runtime/context_mgmt.h b/atf-20240117-bacca82a8/include/lib/el3_runtime/context_mgmt.h similarity index 92% rename from atf-20231013-0ea67d76a/include/lib/el3_runtime/context_mgmt.h rename to atf-20240117-bacca82a8/include/lib/el3_runtime/context_mgmt.h index aa76f3b68..f631125f0 100644 --- a/atf-20231013-0ea67d76a/include/lib/el3_runtime/context_mgmt.h +++ b/atf-20240117-bacca82a8/include/lib/el3_runtime/context_mgmt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -39,7 +39,10 @@ void cm_prepare_el3_exit_ns(void); #ifdef __aarch64__ #if IMAGE_BL31 void cm_manage_extensions_el3(void); +void manage_extensions_nonsecure_per_world(void); +void cm_el3_arch_init_per_world(per_world_context_t *per_world_ctx); #endif + #if CTX_INCLUDE_EL2_REGS void cm_el2_sysregs_context_save(uint32_t security_state); void cm_el2_sysregs_context_restore(uint32_t security_state); @@ -88,6 +91,7 @@ static inline void cm_set_next_context(void *context) void *cm_get_next_context(void); void cm_set_next_context(void *context); static inline void cm_manage_extensions_el3(void) {} +static inline void manage_extensions_nonsecure_per_world(void) {} #endif /* __aarch64__ */ #endif /* CONTEXT_MGMT_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/el3_runtime/cpu_data.h b/atf-20240117-bacca82a8/include/lib/el3_runtime/cpu_data.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/el3_runtime/cpu_data.h rename to atf-20240117-bacca82a8/include/lib/el3_runtime/cpu_data.h diff --git a/atf-20231013-0ea67d76a/include/lib/el3_runtime/pubsub.h b/atf-20240117-bacca82a8/include/lib/el3_runtime/pubsub.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/el3_runtime/pubsub.h rename to atf-20240117-bacca82a8/include/lib/el3_runtime/pubsub.h diff --git a/atf-20231013-0ea67d76a/include/lib/el3_runtime/pubsub_events.h b/atf-20240117-bacca82a8/include/lib/el3_runtime/pubsub_events.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/el3_runtime/pubsub_events.h rename to atf-20240117-bacca82a8/include/lib/el3_runtime/pubsub_events.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/amu.h b/atf-20240117-bacca82a8/include/lib/extensions/amu.h similarity index 81% rename from atf-20231013-0ea67d76a/include/lib/extensions/amu.h rename to atf-20240117-bacca82a8/include/lib/extensions/amu.h index 09d8deec0..a396b9918 100644 --- a/atf-20231013-0ea67d76a/include/lib/extensions/amu.h +++ b/atf-20240117-bacca82a8/include/lib/extensions/amu.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -19,9 +19,11 @@ void amu_enable(cpu_context_t *ctx); void amu_init_el3(void); void amu_init_el2_unused(void); +void amu_enable_per_world(per_world_context_t *per_world_ctx); #else void amu_enable(bool el2_unused); -#endif +#endif /* __aarch64__ */ + #else #if __aarch64__ void amu_enable(cpu_context_t *ctx) @@ -33,12 +35,15 @@ void amu_init_el3(void) void amu_init_el2_unused(void) { } +void amu_enable_per_world(per_world_context_t *per_world_ctx) +{ +} #else static inline void amu_enable(bool el2_unused) { } -#endif -#endif +#endif /*__aarch64__ */ +#endif /* ENABLE_FEAT_AMU */ #if ENABLE_AMU_AUXILIARY_COUNTERS /* diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/brbe.h b/atf-20240117-bacca82a8/include/lib/extensions/brbe.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/brbe.h rename to atf-20240117-bacca82a8/include/lib/extensions/brbe.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/mpam.h b/atf-20240117-bacca82a8/include/lib/extensions/mpam.h similarity index 58% rename from atf-20231013-0ea67d76a/include/lib/extensions/mpam.h rename to atf-20240117-bacca82a8/include/lib/extensions/mpam.h index e5438cec6..3dd565265 100644 --- a/atf-20231013-0ea67d76a/include/lib/extensions/mpam.h +++ b/atf-20240117-bacca82a8/include/lib/extensions/mpam.h @@ -9,16 +9,18 @@ #include -#if ENABLE_MPAM_FOR_LOWER_ELS -void mpam_init_el3(void); +#include + +#if ENABLE_FEAT_MPAM +void mpam_enable_per_world(per_world_context_t *per_world_ctx); void mpam_init_el2_unused(void); #else -static inline void mpam_init_el3(void) +static inline void mpam_enable_per_world(per_world_context_t *per_world_ctx) { } static inline void mpam_init_el2_unused(void) { } -#endif /* ENABLE_MPAM_FOR_LOWER_ELS */ +#endif /* ENABLE_FEAT_MPAM */ #endif /* MPAM_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/pauth.h b/atf-20240117-bacca82a8/include/lib/extensions/pauth.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/pauth.h rename to atf-20240117-bacca82a8/include/lib/extensions/pauth.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/pmuv3.h b/atf-20240117-bacca82a8/include/lib/extensions/pmuv3.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/pmuv3.h rename to atf-20240117-bacca82a8/include/lib/extensions/pmuv3.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/ras.h b/atf-20240117-bacca82a8/include/lib/extensions/ras.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/ras.h rename to atf-20240117-bacca82a8/include/lib/extensions/ras.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/ras_arch.h b/atf-20240117-bacca82a8/include/lib/extensions/ras_arch.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/ras_arch.h rename to atf-20240117-bacca82a8/include/lib/extensions/ras_arch.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/sme.h b/atf-20240117-bacca82a8/include/lib/extensions/sme.h similarity index 79% rename from atf-20231013-0ea67d76a/include/lib/extensions/sme.h rename to atf-20240117-bacca82a8/include/lib/extensions/sme.h index dbefdfc95..bd7948e63 100644 --- a/atf-20231013-0ea67d76a/include/lib/extensions/sme.h +++ b/atf-20240117-bacca82a8/include/lib/extensions/sme.h @@ -21,23 +21,31 @@ #define SME_SMCR_LEN_MAX U(0x1FF) #if ENABLE_SME_FOR_NS -void sme_enable(cpu_context_t *context); void sme_init_el3(void); void sme_init_el2_unused(void); +void sme_enable(cpu_context_t *context); void sme_disable(cpu_context_t *context); +void sme_enable_per_world(per_world_context_t *per_world_ctx); +void sme_disable_per_world(per_world_context_t *per_world_ctx); #else -static inline void sme_enable(cpu_context_t *context) -{ -} static inline void sme_init_el3(void) { } static inline void sme_init_el2_unused(void) { } +static inline void sme_enable(cpu_context_t *context) +{ +} static inline void sme_disable(cpu_context_t *context) { } +static inline void sme_enable_per_world(per_world_context_t *per_world_ctx) +{ +} +static inline void sme_disable_per_world(per_world_context_t *per_world_ctx) +{ +} #endif /* ENABLE_SME_FOR_NS */ #endif /* SME_H */ diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/spe.h b/atf-20240117-bacca82a8/include/lib/extensions/spe.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/spe.h rename to atf-20240117-bacca82a8/include/lib/extensions/spe.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/sve.h b/atf-20240117-bacca82a8/include/lib/extensions/sve.h similarity index 58% rename from atf-20231013-0ea67d76a/include/lib/extensions/sve.h rename to atf-20240117-bacca82a8/include/lib/extensions/sve.h index fc76a1602..947c905bd 100644 --- a/atf-20231013-0ea67d76a/include/lib/extensions/sve.h +++ b/atf-20240117-bacca82a8/include/lib/extensions/sve.h @@ -10,17 +10,17 @@ #include #if (ENABLE_SME_FOR_NS || ENABLE_SVE_FOR_NS) -void sve_enable(cpu_context_t *context); void sve_init_el2_unused(void); -void sve_disable(cpu_context_t *context); +void sve_enable_per_world(per_world_context_t *per_world_ctx); +void sve_disable_per_world(per_world_context_t *per_world_ctx); #else -static inline void sve_enable(cpu_context_t *context) -{ -} static inline void sve_init_el2_unused(void) { } -static inline void sve_disable(cpu_context_t *context) +static inline void sve_enable_per_world(per_world_context_t *per_world_ctx) +{ +} +static inline void sve_disable_per_world(per_world_context_t *per_world_ctx) { } #endif /* ( ENABLE_SME_FOR_NS | ENABLE_SVE_FOR_NS ) */ diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/sys_reg_trace.h b/atf-20240117-bacca82a8/include/lib/extensions/sys_reg_trace.h similarity index 66% rename from atf-20231013-0ea67d76a/include/lib/extensions/sys_reg_trace.h rename to atf-20240117-bacca82a8/include/lib/extensions/sys_reg_trace.h index beda88a46..700426717 100644 --- a/atf-20231013-0ea67d76a/include/lib/extensions/sys_reg_trace.h +++ b/atf-20240117-bacca82a8/include/lib/extensions/sys_reg_trace.h @@ -12,8 +12,8 @@ #if ENABLE_SYS_REG_TRACE_FOR_NS #if __aarch64__ -void sys_reg_trace_enable(cpu_context_t *context); -void sys_reg_trace_disable(cpu_context_t *context); +void sys_reg_trace_enable_per_world(per_world_context_t *per_world_ctx); +void sys_reg_trace_disable_per_world(per_world_context_t *per_world_ctx); void sys_reg_trace_init_el2_unused(void); #else void sys_reg_trace_init_el3(void); @@ -22,10 +22,10 @@ void sys_reg_trace_init_el3(void); #else /* !ENABLE_SYS_REG_TRACE_FOR_NS */ #if __aarch64__ -static inline void sys_reg_trace_enable(cpu_context_t *context) +static inline void sys_reg_trace_enable_per_world(per_world_context_t *per_world_ctx) { } -static inline void sys_reg_trace_disable(cpu_context_t *context) +static inline void sys_reg_trace_disable_per_world(per_world_context_t *per_world_ctx) { } static inline void sys_reg_trace_init_el2_unused(void) diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/trbe.h b/atf-20240117-bacca82a8/include/lib/extensions/trbe.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/trbe.h rename to atf-20240117-bacca82a8/include/lib/extensions/trbe.h diff --git a/atf-20231013-0ea67d76a/include/lib/extensions/trf.h b/atf-20240117-bacca82a8/include/lib/extensions/trf.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/extensions/trf.h rename to atf-20240117-bacca82a8/include/lib/extensions/trf.h diff --git a/atf-20231013-0ea67d76a/include/lib/fconf/fconf.h b/atf-20240117-bacca82a8/include/lib/fconf/fconf.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/fconf/fconf.h rename to atf-20240117-bacca82a8/include/lib/fconf/fconf.h diff --git a/atf-20231013-0ea67d76a/include/lib/fconf/fconf_amu_getter.h b/atf-20240117-bacca82a8/include/lib/fconf/fconf_amu_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/fconf/fconf_amu_getter.h rename to atf-20240117-bacca82a8/include/lib/fconf/fconf_amu_getter.h diff --git a/atf-20231013-0ea67d76a/include/lib/fconf/fconf_dyn_cfg_getter.h b/atf-20240117-bacca82a8/include/lib/fconf/fconf_dyn_cfg_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/fconf/fconf_dyn_cfg_getter.h rename to atf-20240117-bacca82a8/include/lib/fconf/fconf_dyn_cfg_getter.h diff --git a/atf-20231013-0ea67d76a/include/lib/fconf/fconf_mpmm_getter.h b/atf-20240117-bacca82a8/include/lib/fconf/fconf_mpmm_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/fconf/fconf_mpmm_getter.h rename to atf-20240117-bacca82a8/include/lib/fconf/fconf_mpmm_getter.h diff --git a/atf-20231013-0ea67d76a/include/lib/fconf/fconf_tbbr_getter.h b/atf-20240117-bacca82a8/include/lib/fconf/fconf_tbbr_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/fconf/fconf_tbbr_getter.h rename to atf-20240117-bacca82a8/include/lib/fconf/fconf_tbbr_getter.h diff --git a/atf-20231013-0ea67d76a/include/lib/gpt_rme/gpt_rme.h b/atf-20240117-bacca82a8/include/lib/gpt_rme/gpt_rme.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/gpt_rme/gpt_rme.h rename to atf-20240117-bacca82a8/include/lib/gpt_rme/gpt_rme.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch32/endian_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch32/endian_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch32/endian_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch32/endian_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch32/float.h b/atf-20240117-bacca82a8/include/lib/libc/aarch32/float.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch32/float.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch32/float.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch32/inttypes_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch32/inttypes_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch32/inttypes_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch32/inttypes_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch32/limits_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch32/limits_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch32/limits_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch32/limits_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch32/stddef_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch32/stddef_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch32/stddef_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch32/stddef_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch32/stdint_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch32/stdint_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch32/stdint_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch32/stdint_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch32/stdio_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch32/stdio_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch32/stdio_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch32/stdio_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/endian_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/endian_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/endian_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/endian_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/float.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/float.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/float.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/float.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/inttypes_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/inttypes_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/inttypes_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/inttypes_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/limits_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/limits_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/limits_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/limits_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/setjmp_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/setjmp_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/setjmp_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/setjmp_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/stddef_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/stddef_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/stddef_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/stddef_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/stdint_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/stdint_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/stdint_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/stdint_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/aarch64/stdio_.h b/atf-20240117-bacca82a8/include/lib/libc/aarch64/stdio_.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/aarch64/stdio_.h rename to atf-20240117-bacca82a8/include/lib/libc/aarch64/stdio_.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/arm_acle.h b/atf-20240117-bacca82a8/include/lib/libc/arm_acle.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/arm_acle.h rename to atf-20240117-bacca82a8/include/lib/libc/arm_acle.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/assert.h b/atf-20240117-bacca82a8/include/lib/libc/assert.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/assert.h rename to atf-20240117-bacca82a8/include/lib/libc/assert.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/cdefs.h b/atf-20240117-bacca82a8/include/lib/libc/cdefs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/cdefs.h rename to atf-20240117-bacca82a8/include/lib/libc/cdefs.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/endian.h b/atf-20240117-bacca82a8/include/lib/libc/endian.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/endian.h rename to atf-20240117-bacca82a8/include/lib/libc/endian.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/errno.h b/atf-20240117-bacca82a8/include/lib/libc/errno.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/errno.h rename to atf-20240117-bacca82a8/include/lib/libc/errno.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/inttypes.h b/atf-20240117-bacca82a8/include/lib/libc/inttypes.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/inttypes.h rename to atf-20240117-bacca82a8/include/lib/libc/inttypes.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/limits.h b/atf-20240117-bacca82a8/include/lib/libc/limits.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/limits.h rename to atf-20240117-bacca82a8/include/lib/libc/limits.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/setjmp.h b/atf-20240117-bacca82a8/include/lib/libc/setjmp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/setjmp.h rename to atf-20240117-bacca82a8/include/lib/libc/setjmp.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/stdarg.h b/atf-20240117-bacca82a8/include/lib/libc/stdarg.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/stdarg.h rename to atf-20240117-bacca82a8/include/lib/libc/stdarg.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/stdbool.h b/atf-20240117-bacca82a8/include/lib/libc/stdbool.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/stdbool.h rename to atf-20240117-bacca82a8/include/lib/libc/stdbool.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/stddef.h b/atf-20240117-bacca82a8/include/lib/libc/stddef.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/stddef.h rename to atf-20240117-bacca82a8/include/lib/libc/stddef.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/stdint.h b/atf-20240117-bacca82a8/include/lib/libc/stdint.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/stdint.h rename to atf-20240117-bacca82a8/include/lib/libc/stdint.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/stdio.h b/atf-20240117-bacca82a8/include/lib/libc/stdio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/stdio.h rename to atf-20240117-bacca82a8/include/lib/libc/stdio.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/stdlib.h b/atf-20240117-bacca82a8/include/lib/libc/stdlib.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/stdlib.h rename to atf-20240117-bacca82a8/include/lib/libc/stdlib.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/string.h b/atf-20240117-bacca82a8/include/lib/libc/string.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/string.h rename to atf-20240117-bacca82a8/include/lib/libc/string.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/sys/cdefs.h b/atf-20240117-bacca82a8/include/lib/libc/sys/cdefs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/sys/cdefs.h rename to atf-20240117-bacca82a8/include/lib/libc/sys/cdefs.h diff --git a/atf-20231013-0ea67d76a/include/lib/libc/time.h b/atf-20240117-bacca82a8/include/lib/libc/time.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libc/time.h rename to atf-20240117-bacca82a8/include/lib/libc/time.h diff --git a/atf-20231013-0ea67d76a/include/lib/libfdt/fdt.h b/atf-20240117-bacca82a8/include/lib/libfdt/fdt.h similarity index 98% rename from atf-20231013-0ea67d76a/include/lib/libfdt/fdt.h rename to atf-20240117-bacca82a8/include/lib/libfdt/fdt.h index eb9edb72f..c9acc0cb0 100644 --- a/atf-20231013-0ea67d76a/include/lib/libfdt/fdt.h +++ b/atf-20240117-bacca82a8/include/lib/libfdt/fdt.h @@ -35,14 +35,14 @@ struct fdt_reserve_entry { struct fdt_node_header { fdt32_t tag; - char name[0]; + char name[]; }; struct fdt_property { fdt32_t tag; fdt32_t len; fdt32_t nameoff; - char data[0]; + char data[]; }; #endif /* !__ASSEMBLER__*/ diff --git a/atf-20231013-0ea67d76a/include/lib/libfdt/libfdt.h b/atf-20240117-bacca82a8/include/lib/libfdt/libfdt.h similarity index 99% rename from atf-20231013-0ea67d76a/include/lib/libfdt/libfdt.h rename to atf-20240117-bacca82a8/include/lib/libfdt/libfdt.h index a7f432c80..d0a2ed274 100644 --- a/atf-20231013-0ea67d76a/include/lib/libfdt/libfdt.h +++ b/atf-20240117-bacca82a8/include/lib/libfdt/libfdt.h @@ -660,6 +660,13 @@ int fdt_next_property_offset(const void *fdt, int offset); const struct fdt_property *fdt_get_property_by_offset(const void *fdt, int offset, int *lenp); +static inline struct fdt_property *fdt_get_property_by_offset_w(void *fdt, + int offset, + int *lenp) +{ + return (struct fdt_property *)(uintptr_t) + fdt_get_property_by_offset(fdt, offset, lenp); +} /** * fdt_get_property_namelen - find a property based on substring diff --git a/atf-20231013-0ea67d76a/include/lib/libfdt/libfdt_env.h b/atf-20240117-bacca82a8/include/lib/libfdt/libfdt_env.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/libfdt/libfdt_env.h rename to atf-20240117-bacca82a8/include/lib/libfdt/libfdt_env.h diff --git a/atf-20231013-0ea67d76a/include/lib/mmio.h b/atf-20240117-bacca82a8/include/lib/mmio.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/mmio.h rename to atf-20240117-bacca82a8/include/lib/mmio.h diff --git a/atf-20231013-0ea67d76a/include/lib/mpmm/mpmm.h b/atf-20240117-bacca82a8/include/lib/mpmm/mpmm.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/mpmm/mpmm.h rename to atf-20240117-bacca82a8/include/lib/mpmm/mpmm.h diff --git a/atf-20231013-0ea67d76a/include/lib/object_pool.h b/atf-20240117-bacca82a8/include/lib/object_pool.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/object_pool.h rename to atf-20240117-bacca82a8/include/lib/object_pool.h diff --git a/atf-20231013-0ea67d76a/include/lib/optee_utils.h b/atf-20240117-bacca82a8/include/lib/optee_utils.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/optee_utils.h rename to atf-20240117-bacca82a8/include/lib/optee_utils.h diff --git a/atf-20231013-0ea67d76a/include/lib/pmf/aarch32/pmf_asm_macros.S b/atf-20240117-bacca82a8/include/lib/pmf/aarch32/pmf_asm_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/pmf/aarch32/pmf_asm_macros.S rename to atf-20240117-bacca82a8/include/lib/pmf/aarch32/pmf_asm_macros.S diff --git a/atf-20231013-0ea67d76a/include/lib/pmf/aarch64/pmf_asm_macros.S b/atf-20240117-bacca82a8/include/lib/pmf/aarch64/pmf_asm_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/pmf/aarch64/pmf_asm_macros.S rename to atf-20240117-bacca82a8/include/lib/pmf/aarch64/pmf_asm_macros.S diff --git a/atf-20231013-0ea67d76a/include/lib/pmf/pmf.h b/atf-20240117-bacca82a8/include/lib/pmf/pmf.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/pmf/pmf.h rename to atf-20240117-bacca82a8/include/lib/pmf/pmf.h diff --git a/atf-20231013-0ea67d76a/include/lib/pmf/pmf_helpers.h b/atf-20240117-bacca82a8/include/lib/pmf/pmf_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/pmf/pmf_helpers.h rename to atf-20240117-bacca82a8/include/lib/pmf/pmf_helpers.h diff --git a/atf-20231013-0ea67d76a/include/lib/psa/delegated_attestation.h b/atf-20240117-bacca82a8/include/lib/psa/delegated_attestation.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psa/delegated_attestation.h rename to atf-20240117-bacca82a8/include/lib/psa/delegated_attestation.h diff --git a/atf-20231013-0ea67d76a/include/lib/psa/measured_boot.h b/atf-20240117-bacca82a8/include/lib/psa/measured_boot.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psa/measured_boot.h rename to atf-20240117-bacca82a8/include/lib/psa/measured_boot.h diff --git a/atf-20231013-0ea67d76a/include/lib/psa/psa/client.h b/atf-20240117-bacca82a8/include/lib/psa/psa/client.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psa/psa/client.h rename to atf-20240117-bacca82a8/include/lib/psa/psa/client.h diff --git a/atf-20231013-0ea67d76a/include/lib/psa/psa/error.h b/atf-20240117-bacca82a8/include/lib/psa/psa/error.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psa/psa/error.h rename to atf-20240117-bacca82a8/include/lib/psa/psa/error.h diff --git a/atf-20231013-0ea67d76a/include/lib/psa/psa_manifest/sid.h b/atf-20240117-bacca82a8/include/lib/psa/psa_manifest/sid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psa/psa_manifest/sid.h rename to atf-20240117-bacca82a8/include/lib/psa/psa_manifest/sid.h diff --git a/atf-20231013-0ea67d76a/include/lib/psa/rss_crypto_defs.h b/atf-20240117-bacca82a8/include/lib/psa/rss_crypto_defs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psa/rss_crypto_defs.h rename to atf-20240117-bacca82a8/include/lib/psa/rss_crypto_defs.h diff --git a/atf-20231013-0ea67d76a/include/lib/psa/rss_platform_api.h b/atf-20240117-bacca82a8/include/lib/psa/rss_platform_api.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psa/rss_platform_api.h rename to atf-20240117-bacca82a8/include/lib/psa/rss_platform_api.h diff --git a/atf-20231013-0ea67d76a/include/lib/psci/psci.h b/atf-20240117-bacca82a8/include/lib/psci/psci.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psci/psci.h rename to atf-20240117-bacca82a8/include/lib/psci/psci.h diff --git a/atf-20231013-0ea67d76a/include/lib/psci/psci_lib.h b/atf-20240117-bacca82a8/include/lib/psci/psci_lib.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/psci/psci_lib.h rename to atf-20240117-bacca82a8/include/lib/psci/psci_lib.h diff --git a/atf-20231013-0ea67d76a/include/lib/runtime_instr.h b/atf-20240117-bacca82a8/include/lib/runtime_instr.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/runtime_instr.h rename to atf-20240117-bacca82a8/include/lib/runtime_instr.h diff --git a/atf-20231013-0ea67d76a/include/lib/semihosting.h b/atf-20240117-bacca82a8/include/lib/semihosting.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/semihosting.h rename to atf-20240117-bacca82a8/include/lib/semihosting.h diff --git a/atf-20231013-0ea67d76a/include/lib/smccc.h b/atf-20240117-bacca82a8/include/lib/smccc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/smccc.h rename to atf-20240117-bacca82a8/include/lib/smccc.h diff --git a/atf-20231013-0ea67d76a/include/lib/spinlock.h b/atf-20240117-bacca82a8/include/lib/spinlock.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/spinlock.h rename to atf-20240117-bacca82a8/include/lib/spinlock.h diff --git a/atf-20231013-0ea67d76a/include/lib/transfer_list.h b/atf-20240117-bacca82a8/include/lib/transfer_list.h similarity index 50% rename from atf-20231013-0ea67d76a/include/lib/transfer_list.h rename to atf-20240117-bacca82a8/include/lib/transfer_list.h index 54c864347..5ea5a41a9 100644 --- a/atf-20231013-0ea67d76a/include/lib/transfer_list.h +++ b/atf-20240117-bacca82a8/include/lib/transfer_list.h @@ -10,47 +10,57 @@ #include #include +#include #include -#define TRANSFER_LIST_SIGNATURE U(0x006ed0ff) -#define TRANSFER_LIST_VERSION U(0x0001) +#define TRANSFER_LIST_SIGNATURE U(0x4a0fb10b) +#define TRANSFER_LIST_VERSION U(0x0001) -// Init value of maximum alignment required by any TE data in the TL -// specified as a power of two -#define TRANSFER_LIST_INIT_MAX_ALIGN U(3) +/* + * Init value of maximum alignment required by any TE data in the TL + * specified as a power of two + */ +#define TRANSFER_LIST_INIT_MAX_ALIGN U(3) -// alignment required by TE header start address, in bytes -#define TRANSFER_LIST_GRANULE U(8) +/* Alignment required by TE header start address, in bytes */ +#define TRANSFER_LIST_GRANULE U(8) -// version of the register convention used. -// Set to 1 for both AArch64 and AArch32 according to fw handoff spec v0.9 +/* + * Version of the register convention used. + * Set to 1 for both AArch64 and AArch32 according to fw handoff spec v0.9 + */ #define REGISTER_CONVENTION_VERSION_MASK (1 << 24) #ifndef __ASSEMBLER__ +#define TL_FLAGS_HAS_CHECKSUM BIT(0) + enum transfer_list_tag_id { TL_TAG_EMPTY = 0, TL_TAG_FDT = 1, TL_TAG_HOB_BLOCK = 2, TL_TAG_HOB_LIST = 3, TL_TAG_ACPI_TABLE_AGGREGATE = 4, + TL_TAG_OPTEE_PAGABLE_PART = 0x100, }; enum transfer_list_ops { - TL_OPS_NON, // invalid for any operation - TL_OPS_ALL, // valid for all operations - TL_OPS_RO, // valid for read only - TL_OPS_CUS, // either abort or switch to special code to interpret + TL_OPS_NON, /* invalid for any operation */ + TL_OPS_ALL, /* valid for all operations */ + TL_OPS_RO, /* valid for read only */ + TL_OPS_CUS, /* abort or switch to special code to interpret */ }; struct transfer_list_header { - uint32_t signature; - uint8_t checksum; - uint8_t version; - uint8_t hdr_size; - uint8_t alignment; // max alignment of TE data - uint32_t size; // TL header + all TEs - uint32_t max_size; + uint32_t signature; + uint8_t checksum; + uint8_t version; + uint8_t hdr_size; + uint8_t alignment; /* max alignment of TE data */ + uint32_t size; /* TL header + all TEs */ + uint32_t max_size; + uint32_t flags; + uint32_t reserved; /* spare bytes */ /* * Commented out element used to visualize dynamic part of the * data structure. @@ -64,10 +74,10 @@ struct transfer_list_header { }; struct transfer_list_entry { - uint16_t tag_id; - uint8_t reserved0; // place holder - uint8_t hdr_size; - uint32_t data_size; + uint16_t tag_id; + uint8_t reserved0; /* place holder */ + uint8_t hdr_size; + uint32_t data_size; /* * Commented out element used to visualize dynamic part of the * data structure. @@ -80,11 +90,16 @@ struct transfer_list_entry { }; void transfer_list_dump(struct transfer_list_header *tl); +entry_point_info_t * +transfer_list_set_handoff_args(struct transfer_list_header *tl, + entry_point_info_t *ep_info); struct transfer_list_header *transfer_list_init(void *addr, size_t max_size); -struct transfer_list_header *transfer_list_relocate(struct transfer_list_header *tl, - void *addr, size_t max_size); -enum transfer_list_ops transfer_list_check_header(const struct transfer_list_header *tl); +struct transfer_list_header * +transfer_list_relocate(struct transfer_list_header *tl, void *addr, + size_t max_size); +enum transfer_list_ops +transfer_list_check_header(const struct transfer_list_header *tl); void transfer_list_update_checksum(struct transfer_list_header *tl); bool transfer_list_verify_checksum(const struct transfer_list_header *tl); @@ -94,18 +109,22 @@ bool transfer_list_set_data_size(struct transfer_list_header *tl, uint32_t new_data_size); void *transfer_list_entry_data(struct transfer_list_entry *entry); -bool transfer_list_rem(struct transfer_list_header *tl, struct transfer_list_entry *entry); +bool transfer_list_rem(struct transfer_list_header *tl, + struct transfer_list_entry *entry); struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl, - uint16_t tag_id, uint32_t data_size, + uint16_t tag_id, + uint32_t data_size, const void *data); -struct transfer_list_entry *transfer_list_add_with_align(struct transfer_list_header *tl, - uint16_t tag_id, uint32_t data_size, - const void *data, uint8_t alignment); +struct transfer_list_entry * +transfer_list_add_with_align(struct transfer_list_header *tl, uint16_t tag_id, + uint32_t data_size, const void *data, + uint8_t alignment); -struct transfer_list_entry *transfer_list_next(struct transfer_list_header *tl, - struct transfer_list_entry *last); +struct transfer_list_entry * +transfer_list_next(struct transfer_list_header *tl, + struct transfer_list_entry *last); struct transfer_list_entry *transfer_list_find(struct transfer_list_header *tl, uint16_t tag_id); diff --git a/atf-20231013-0ea67d76a/include/lib/utils.h b/atf-20240117-bacca82a8/include/lib/utils.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/utils.h rename to atf-20240117-bacca82a8/include/lib/utils.h diff --git a/atf-20231013-0ea67d76a/include/lib/utils_def.h b/atf-20240117-bacca82a8/include/lib/utils_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/utils_def.h rename to atf-20240117-bacca82a8/include/lib/utils_def.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_mpu/xlat_mpu.h b/atf-20240117-bacca82a8/include/lib/xlat_mpu/xlat_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_mpu/xlat_mpu.h rename to atf-20240117-bacca82a8/include/lib/xlat_mpu/xlat_mpu.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_mmu_helpers.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_mmu_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_mmu_helpers.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_mmu_helpers.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_arch.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_arch.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_arch.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_arch.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_compat.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_compat.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_compat.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_compat.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_defs.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_defs.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_defs.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_defs.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_v2.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_v2.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_v2.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_v2.h diff --git a/atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_v2_helpers.h b/atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_v2_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xlat_tables/xlat_tables_v2_helpers.h rename to atf-20240117-bacca82a8/include/lib/xlat_tables/xlat_tables_v2_helpers.h diff --git a/atf-20231013-0ea67d76a/include/lib/xz/tf_unxz.h b/atf-20240117-bacca82a8/include/lib/xz/tf_unxz.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/xz/tf_unxz.h rename to atf-20240117-bacca82a8/include/lib/xz/tf_unxz.h diff --git a/atf-20231013-0ea67d76a/include/lib/zlib/tf_gunzip.h b/atf-20240117-bacca82a8/include/lib/zlib/tf_gunzip.h similarity index 100% rename from atf-20231013-0ea67d76a/include/lib/zlib/tf_gunzip.h rename to atf-20240117-bacca82a8/include/lib/zlib/tf_gunzip.h diff --git a/atf-20231013-0ea67d76a/include/nmbm/nmbm-os.h b/atf-20240117-bacca82a8/include/nmbm/nmbm-os.h similarity index 100% rename from atf-20231013-0ea67d76a/include/nmbm/nmbm-os.h rename to atf-20240117-bacca82a8/include/nmbm/nmbm-os.h diff --git a/atf-20231013-0ea67d76a/include/nmbm/nmbm.h b/atf-20240117-bacca82a8/include/nmbm/nmbm.h similarity index 100% rename from atf-20231013-0ea67d76a/include/nmbm/nmbm.h rename to atf-20240117-bacca82a8/include/nmbm/nmbm.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/board/common/board_css_def.h b/atf-20240117-bacca82a8/include/plat/arm/board/common/board_css_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/board/common/board_css_def.h rename to atf-20240117-bacca82a8/include/plat/arm/board/common/board_css_def.h diff --git a/atf-20240117-bacca82a8/include/plat/arm/board/common/rotpk/rotpk_def.h b/atf-20240117-bacca82a8/include/plat/arm/board/common/rotpk/rotpk_def.h new file mode 100644 index 000000000..685c21a60 --- /dev/null +++ b/atf-20240117-bacca82a8/include/plat/arm/board/common/rotpk/rotpk_def.h @@ -0,0 +1,24 @@ + +/* + * Copyright (c) 2024, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ROTPK_DEF_H +#define ROTPK_DEF_H + +/* + * Definitions related to ROTPK + */ + +/* + * Root of trust key lengths + */ +#ifndef ARM_ROTPK_HEADER_LEN +#define ARM_ROTPK_HEADER_LEN 19 +#endif +#ifndef ARM_ROTPK_HASH_LEN +#define ARM_ROTPK_HASH_LEN 32 +#endif +#endif /* ROTPK_DEF_H */ diff --git a/atf-20231013-0ea67d76a/include/plat/arm/board/common/v2m_def.h b/atf-20240117-bacca82a8/include/plat/arm/board/common/v2m_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/board/common/v2m_def.h rename to atf-20240117-bacca82a8/include/plat/arm/board/common/v2m_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/board/fvp_r/fvp_r_bl1.h b/atf-20240117-bacca82a8/include/plat/arm/board/fvp_r/fvp_r_bl1.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/board/fvp_r/fvp_r_bl1.h rename to atf-20240117-bacca82a8/include/plat/arm/board/fvp_r/fvp_r_bl1.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/aarch64/arm_macros.S b/atf-20240117-bacca82a8/include/plat/arm/common/aarch64/arm_macros.S similarity index 88% rename from atf-20231013-0ea67d76a/include/plat/arm/common/aarch64/arm_macros.S rename to atf-20240117-bacca82a8/include/plat/arm/common/aarch64/arm_macros.S index d47e4e096..8aacfb0a9 100644 --- a/atf-20231013-0ea67d76a/include/plat/arm/common/aarch64/arm_macros.S +++ b/atf-20240117-bacca82a8/include/plat/arm/common/aarch64/arm_macros.S @@ -39,11 +39,17 @@ prefix: * --------------------------------------------- */ .macro arm_print_gic_regs - /* Check for GICv3 system register access */ + /* Check for GICv3/v4 system register access. + * ID_AA64PFR0_GIC indicates presence of the CPU + * system registers by either 0b0011 or 0xb0001. + * A value of 0b000 means CPU system registers aren't + * available and the code needs to use the memory + * mapped registers like in GICv2. + */ mrs x7, id_aa64pfr0_el1 ubfx x7, x7, #ID_AA64PFR0_GIC_SHIFT, #ID_AA64PFR0_GIC_WIDTH - cmp x7, #1 - b.ne print_gicv2 + cmp x7, #0 + b.eq print_gicv2 /* Check for SRE enable */ mrs x8, ICC_SRE_EL3 diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/aarch64/cci_macros.S b/atf-20240117-bacca82a8/include/plat/arm/common/aarch64/cci_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/aarch64/cci_macros.S rename to atf-20240117-bacca82a8/include/plat/arm/common/aarch64/cci_macros.S diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_config.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_config.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_config.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_config.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_def.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_def.h similarity index 98% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_def.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_def.h index 0ab0e8247..54b184d86 100644 --- a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_def.h +++ b/atf-20240117-bacca82a8/include/plat/arm/common/arm_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -19,13 +20,6 @@ * Definitions common to all ARM standard platforms *****************************************************************************/ -/* - * Root of trust key lengths - */ -#define ARM_ROTPK_HEADER_LEN 19 -#define ARM_ROTPK_HASH_LEN 32 -/* ARM_ROTPK_KEY_LEN includes DER header + raw key material */ -#define ARM_ROTPK_KEY_LEN 294 /* Special value used to verify platform parameters from BL2 to BL31 */ #define ARM_BL31_PLAT_PARAM_VAL ULL(0x0f1e2d3c4b5a6978) @@ -198,16 +192,7 @@ MEASURED_BOOT ARM_AP_TZC_DRAM1_SIZE - 1U) /* Define the Access permissions for Secure peripherals to NS_DRAM */ -#if ARM_CRYPTOCELL_INTEG -/* - * Allow Secure peripheral to read NS DRAM when integrated with CryptoCell. - * This is required by CryptoCell to authenticate BL33 which is loaded - * into the Non Secure DDR. - */ -#define ARM_TZC_NS_DRAM_S_ACCESS TZC_REGION_S_RD -#else #define ARM_TZC_NS_DRAM_S_ACCESS TZC_REGION_S_NONE -#endif #ifdef SPD_opteed /* @@ -776,7 +761,7 @@ MEASURED_BOOT #define PLAT_PERCPU_BAKERY_LOCK_SIZE (1 * CACHE_WRITEBACK_GRANULE) /* Priority levels for ARM platforms */ -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT #define PLAT_RAS_PRI 0x10 #endif #define PLAT_SDEI_CRITICAL_PRI 0x60 diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_dyn_cfg_helpers.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_dyn_cfg_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_dyn_cfg_helpers.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_dyn_cfg_helpers.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_fconf_getter.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_fconf_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_fconf_getter.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_fconf_getter.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_fconf_io_storage.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_fconf_io_storage.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_fconf_io_storage.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_fconf_io_storage.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_pas_def.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_pas_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_pas_def.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_pas_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_reclaim_init.ld.S b/atf-20240117-bacca82a8/include/plat/arm/common/arm_reclaim_init.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_reclaim_init.ld.S rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_reclaim_init.ld.S diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_sip_svc.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_sip_svc.h similarity index 66% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_sip_svc.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_sip_svc.h index 025d10efc..266092e30 100644 --- a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_sip_svc.h +++ b/atf-20240117-bacca82a8/include/plat/arm/common/arm_sip_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019,2021-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2019,2021-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -35,4 +35,21 @@ #define ARM_SIP_SVC_VERSION_MAJOR U(0x0) #define ARM_SIP_SVC_VERSION_MINOR U(0x2) +/* + * Arm SiP SMC calls that are primarily used for testing purposes. + */ +#if PLAT_TEST_SPM +#define ARM_SIP_SET_INTERRUPT_PENDING U(0x82000100) +#endif + +/* SiP handler specific to each Arm platform. */ +uintptr_t plat_arm_sip_handler(uint32_t smc_fid, + u_register_t x1, + u_register_t x2, + u_register_t x3, + u_register_t x4, + void *cookie, + void *handle, + u_register_t flags); + #endif /* ARM_SIP_SVC_H */ diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_spm_def.h b/atf-20240117-bacca82a8/include/plat/arm/common/arm_spm_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_spm_def.h rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_spm_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/arm_tzc_dram.ld.S b/atf-20240117-bacca82a8/include/plat/arm/common/arm_tzc_dram.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/arm_tzc_dram.ld.S rename to atf-20240117-bacca82a8/include/plat/arm/common/arm_tzc_dram.ld.S diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/fconf_arm_sp_getter.h b/atf-20240117-bacca82a8/include/plat/arm/common/fconf_arm_sp_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/fconf_arm_sp_getter.h rename to atf-20240117-bacca82a8/include/plat/arm/common/fconf_arm_sp_getter.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/fconf_ethosn_getter.h b/atf-20240117-bacca82a8/include/plat/arm/common/fconf_ethosn_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/fconf_ethosn_getter.h rename to atf-20240117-bacca82a8/include/plat/arm/common/fconf_ethosn_getter.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/fconf_nv_cntr_getter.h b/atf-20240117-bacca82a8/include/plat/arm/common/fconf_nv_cntr_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/fconf_nv_cntr_getter.h rename to atf-20240117-bacca82a8/include/plat/arm/common/fconf_nv_cntr_getter.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/fconf_sdei_getter.h b/atf-20240117-bacca82a8/include/plat/arm/common/fconf_sdei_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/fconf_sdei_getter.h rename to atf-20240117-bacca82a8/include/plat/arm/common/fconf_sdei_getter.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/fconf_sec_intr_config.h b/atf-20240117-bacca82a8/include/plat/arm/common/fconf_sec_intr_config.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/fconf_sec_intr_config.h rename to atf-20240117-bacca82a8/include/plat/arm/common/fconf_sec_intr_config.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/plat_arm.h b/atf-20240117-bacca82a8/include/plat/arm/common/plat_arm.h similarity index 96% rename from atf-20231013-0ea67d76a/include/plat/arm/common/plat_arm.h rename to atf-20240117-bacca82a8/include/plat/arm/common/plat_arm.h index 2fdbfb7d0..0fb06a662 100644 --- a/atf-20231013-0ea67d76a/include/plat/arm/common/plat_arm.h +++ b/atf-20240117-bacca82a8/include/plat/arm/common/plat_arm.h @@ -53,7 +53,7 @@ typedef struct arm_tzc_regions_info { PLAT_ARM_TZC_NS_DEV_ACCESS} #endif -#if SPM_MM +#if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) #define ARM_TZC_REGIONS_DEF \ {ARM_AP_TZC_DRAM1_BASE, ARM_EL3_TZC_DRAM1_END + ARM_L1_GPT_SIZE,\ TZC_REGION_S_RDWR, 0}, \ @@ -176,10 +176,17 @@ void arm_setup_romlib(void); #define STATE_SW_E_DENIED (-3) /* plat_get_rotpk_info() flags */ -#define ARM_ROTPK_REGS_ID 1 -#define ARM_ROTPK_DEVEL_RSA_ID 2 -#define ARM_ROTPK_DEVEL_ECDSA_ID 3 +#define ARM_ROTPK_REGS_ID 1 +#define ARM_ROTPK_DEVEL_RSA_ID 2 +#define ARM_ROTPK_DEVEL_ECDSA_ID 3 #define ARM_ROTPK_DEVEL_FULL_DEV_RSA_KEY_ID 4 +#define ARM_ROTPK_DEVEL_FULL_DEV_ECDSA_KEY_ID 5 + +#define ARM_USE_DEVEL_ROTPK \ + (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_RSA_ID) || \ + (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_ECDSA_ID) || \ + (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_FULL_DEV_RSA_KEY_ID) || \ + (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_FULL_DEV_ECDSA_KEY_ID) /* IO storage utility functions */ int arm_io_setup(void); diff --git a/atf-20231013-0ea67d76a/include/plat/arm/common/smccc_def.h b/atf-20240117-bacca82a8/include/plat/arm/common/smccc_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/common/smccc_def.h rename to atf-20240117-bacca82a8/include/plat/arm/common/smccc_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/css/common/aarch64/css_macros.S b/atf-20240117-bacca82a8/include/plat/arm/css/common/aarch64/css_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/css/common/aarch64/css_macros.S rename to atf-20240117-bacca82a8/include/plat/arm/css/common/aarch64/css_macros.S diff --git a/atf-20231013-0ea67d76a/include/plat/arm/css/common/css_def.h b/atf-20240117-bacca82a8/include/plat/arm/css/common/css_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/css/common/css_def.h rename to atf-20240117-bacca82a8/include/plat/arm/css/common/css_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/css/common/css_pm.h b/atf-20240117-bacca82a8/include/plat/arm/css/common/css_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/css/common/css_pm.h rename to atf-20240117-bacca82a8/include/plat/arm/css/common/css_pm.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/soc/common/soc_css.h b/atf-20240117-bacca82a8/include/plat/arm/soc/common/soc_css.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/soc/common/soc_css.h rename to atf-20240117-bacca82a8/include/plat/arm/soc/common/soc_css.h diff --git a/atf-20231013-0ea67d76a/include/plat/arm/soc/common/soc_css_def.h b/atf-20240117-bacca82a8/include/plat/arm/soc/common/soc_css_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/arm/soc/common/soc_css_def.h rename to atf-20240117-bacca82a8/include/plat/arm/soc/common/soc_css_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/brcm/common/bcm_console.h b/atf-20240117-bacca82a8/include/plat/brcm/common/bcm_console.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/brcm/common/bcm_console.h rename to atf-20240117-bacca82a8/include/plat/brcm/common/bcm_console.h diff --git a/atf-20231013-0ea67d76a/include/plat/brcm/common/bcm_elog.h b/atf-20240117-bacca82a8/include/plat/brcm/common/bcm_elog.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/brcm/common/bcm_elog.h rename to atf-20240117-bacca82a8/include/plat/brcm/common/bcm_elog.h diff --git a/atf-20231013-0ea67d76a/include/plat/brcm/common/brcm_def.h b/atf-20240117-bacca82a8/include/plat/brcm/common/brcm_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/brcm/common/brcm_def.h rename to atf-20240117-bacca82a8/include/plat/brcm/common/brcm_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/brcm/common/plat_brcm.h b/atf-20240117-bacca82a8/include/plat/brcm/common/plat_brcm.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/brcm/common/plat_brcm.h rename to atf-20240117-bacca82a8/include/plat/brcm/common/plat_brcm.h diff --git a/atf-20231013-0ea67d76a/include/plat/common/common_def.h b/atf-20240117-bacca82a8/include/plat/common/common_def.h similarity index 79% rename from atf-20231013-0ea67d76a/include/plat/common/common_def.h rename to atf-20240117-bacca82a8/include/plat/common/common_def.h index 1d3ac15f4..ecec5bc9d 100644 --- a/atf-20231013-0ea67d76a/include/plat/common/common_def.h +++ b/atf-20240117-bacca82a8/include/plat/common/common_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -12,6 +12,38 @@ #include +#ifdef __aarch64__ +#define SZ_32 UL(0x00000020) +#define SZ_64 UL(0x00000040) +#define SZ_128 UL(0x00000080) +#define SZ_256 UL(0x00000100) +#define SZ_512 UL(0x00000200) + +#define SZ_1K UL(0x00000400) +#define SZ_2K UL(0x00000800) +#define SZ_4K UL(0x00001000) +#define SZ_8K UL(0x00002000) +#define SZ_16K UL(0x00004000) +#define SZ_32K UL(0x00008000) +#define SZ_64K UL(0x00010000) +#define SZ_128K UL(0x00020000) +#define SZ_256K UL(0x00040000) +#define SZ_512K UL(0x00080000) + +#define SZ_1M UL(0x00100000) +#define SZ_2M UL(0x00200000) +#define SZ_4M UL(0x00400000) +#define SZ_8M UL(0x00800000) +#define SZ_16M UL(0x01000000) +#define SZ_32M UL(0x02000000) +#define SZ_64M UL(0x04000000) +#define SZ_128M UL(0x08000000) +#define SZ_256M UL(0x10000000) +#define SZ_512M UL(0x20000000) + +#define SZ_1G UL(0x40000000) +#define SZ_2G UL(0x80000000) +#else /* !__aarch64__ */ #define SZ_32 U(0x00000020) #define SZ_64 U(0x00000040) #define SZ_128 U(0x00000080) @@ -42,6 +74,7 @@ #define SZ_1G U(0x40000000) #define SZ_2G U(0x80000000) +#endif /* __aarch64__ */ /****************************************************************************** * Required platform porting definitions that are expected to be common to diff --git a/atf-20231013-0ea67d76a/include/plat/common/plat_drtm.h b/atf-20240117-bacca82a8/include/plat/common/plat_drtm.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/common/plat_drtm.h rename to atf-20240117-bacca82a8/include/plat/common/plat_drtm.h diff --git a/atf-20231013-0ea67d76a/include/plat/common/plat_trng.h b/atf-20240117-bacca82a8/include/plat/common/plat_trng.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/common/plat_trng.h rename to atf-20240117-bacca82a8/include/plat/common/plat_trng.h diff --git a/atf-20231013-0ea67d76a/include/plat/common/platform.h b/atf-20240117-bacca82a8/include/plat/common/platform.h similarity index 97% rename from atf-20231013-0ea67d76a/include/plat/common/platform.h rename to atf-20240117-bacca82a8/include/plat/common/platform.h index c92121f60..4d1b1c17c 100644 --- a/atf-20231013-0ea67d76a/include/plat/common/platform.h +++ b/atf-20240117-bacca82a8/include/plat/common/platform.h @@ -80,6 +80,20 @@ unsigned int plat_my_core_pos(void); int plat_core_pos_by_mpidr(u_register_t mpidr); int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size); +/******************************************************************************* + * Simple routine to determine whether a mpidr is valid or not. + ******************************************************************************/ +static inline bool is_valid_mpidr(u_register_t mpidr) +{ + int pos = plat_core_pos_by_mpidr(mpidr); + + if ((pos < 0) || ((unsigned int)pos >= PLATFORM_CORE_COUNT)) { + return false; + } + + return true; +} + #if STACK_PROTECTOR_ENABLED /* * Return a new value to be used for the stack protection's canary. diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/armada_common.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/armada_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/armada_common.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/armada_common.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/board_marvell_def.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/board_marvell_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/board_marvell_def.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/board_marvell_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/marvell_def.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/marvell_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/marvell_def.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/marvell_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/plat_marvell.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/plat_marvell.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a3k/common/plat_marvell.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a3k/common/plat_marvell.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/armada_common.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/armada_common.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/armada_common.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/armada_common.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/board_marvell_def.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/board_marvell_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/board_marvell_def.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/board_marvell_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/efuse_def.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/efuse_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/efuse_def.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/efuse_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/marvell_def.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/marvell_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/marvell_def.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/marvell_def.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/plat_marvell.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/plat_marvell.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/plat_marvell.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/plat_marvell.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/plat_pm_trace.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/plat_pm_trace.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/a8k/common/plat_pm_trace.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/a8k/common/plat_pm_trace.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/common/aarch64/cci_macros.S b/atf-20240117-bacca82a8/include/plat/marvell/armada/common/aarch64/cci_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/common/aarch64/cci_macros.S rename to atf-20240117-bacca82a8/include/plat/marvell/armada/common/aarch64/cci_macros.S diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/common/aarch64/marvell_macros.S b/atf-20240117-bacca82a8/include/plat/marvell/armada/common/aarch64/marvell_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/common/aarch64/marvell_macros.S rename to atf-20240117-bacca82a8/include/plat/marvell/armada/common/aarch64/marvell_macros.S diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/common/marvell_plat_priv.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/common/marvell_plat_priv.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/common/marvell_plat_priv.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/common/marvell_plat_priv.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/common/marvell_pm.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/common/marvell_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/common/marvell_pm.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/common/marvell_pm.h diff --git a/atf-20231013-0ea67d76a/include/plat/marvell/armada/common/mvebu.h b/atf-20240117-bacca82a8/include/plat/marvell/armada/common/mvebu.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/marvell/armada/common/mvebu.h rename to atf-20240117-bacca82a8/include/plat/marvell/armada/common/mvebu.h diff --git a/atf-20231013-0ea67d76a/include/plat/nuvoton/common/npcm845x_arm_def.h b/atf-20240117-bacca82a8/include/plat/nuvoton/common/npcm845x_arm_def.h similarity index 98% rename from atf-20231013-0ea67d76a/include/plat/nuvoton/common/npcm845x_arm_def.h rename to atf-20240117-bacca82a8/include/plat/nuvoton/common/npcm845x_arm_def.h index faddb88c2..5a44907f6 100644 --- a/atf-20231013-0ea67d76a/include/plat/nuvoton/common/npcm845x_arm_def.h +++ b/atf-20240117-bacca82a8/include/plat/nuvoton/common/npcm845x_arm_def.h @@ -149,16 +149,7 @@ ARM_AP_TZC_DRAM1_SIZE - 1U) /* Define the Access permissions for Secure peripherals to NS_DRAM */ -#if ARM_CRYPTOCELL_INTEG -/* - * Allow Secure peripheral to read NS DRAM when integrated with CryptoCell. - * This is required by CryptoCell to authenticate BL33 which is loaded - * into the Non Secure DDR. - */ -#define ARM_TZC_NS_DRAM_S_ACCESS TZC_REGION_S_RD -#else #define ARM_TZC_NS_DRAM_S_ACCESS TZC_REGION_S_NONE -#endif /* ARM_CRYPTOCELL_INTEG */ #ifdef SPD_opteed /* diff --git a/atf-20231013-0ea67d76a/include/plat/nuvoton/common/plat_macros.S b/atf-20240117-bacca82a8/include/plat/nuvoton/common/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/nuvoton/common/plat_macros.S rename to atf-20240117-bacca82a8/include/plat/nuvoton/common/plat_macros.S diff --git a/atf-20231013-0ea67d76a/include/plat/nuvoton/common/plat_npcm845x.h b/atf-20240117-bacca82a8/include/plat/nuvoton/common/plat_npcm845x.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/nuvoton/common/plat_npcm845x.h rename to atf-20240117-bacca82a8/include/plat/nuvoton/common/plat_npcm845x.h diff --git a/atf-20231013-0ea67d76a/include/plat/nuvoton/npcm845x/platform_def.h b/atf-20240117-bacca82a8/include/plat/nuvoton/npcm845x/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/include/plat/nuvoton/npcm845x/platform_def.h rename to atf-20240117-bacca82a8/include/plat/nuvoton/npcm845x/platform_def.h diff --git a/atf-20231013-0ea67d76a/include/services/arm_arch_svc.h b/atf-20240117-bacca82a8/include/services/arm_arch_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/arm_arch_svc.h rename to atf-20240117-bacca82a8/include/services/arm_arch_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/drtm_svc.h b/atf-20240117-bacca82a8/include/services/drtm_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/drtm_svc.h rename to atf-20240117-bacca82a8/include/services/drtm_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/el3_spmc_ffa_memory.h b/atf-20240117-bacca82a8/include/services/el3_spmc_ffa_memory.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/el3_spmc_ffa_memory.h rename to atf-20240117-bacca82a8/include/services/el3_spmc_ffa_memory.h diff --git a/atf-20231013-0ea67d76a/include/services/el3_spmc_logical_sp.h b/atf-20240117-bacca82a8/include/services/el3_spmc_logical_sp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/el3_spmc_logical_sp.h rename to atf-20240117-bacca82a8/include/services/el3_spmc_logical_sp.h diff --git a/atf-20231013-0ea67d76a/include/services/el3_spmd_logical_sp.h b/atf-20240117-bacca82a8/include/services/el3_spmd_logical_sp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/el3_spmd_logical_sp.h rename to atf-20240117-bacca82a8/include/services/el3_spmd_logical_sp.h diff --git a/atf-20231013-0ea67d76a/include/services/errata_abi_svc.h b/atf-20240117-bacca82a8/include/services/errata_abi_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/errata_abi_svc.h rename to atf-20240117-bacca82a8/include/services/errata_abi_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/ffa_svc.h b/atf-20240117-bacca82a8/include/services/ffa_svc.h similarity index 98% rename from atf-20231013-0ea67d76a/include/services/ffa_svc.h rename to atf-20240117-bacca82a8/include/services/ffa_svc.h index de56638c7..9ed6a8bc6 100644 --- a/atf-20231013-0ea67d76a/include/services/ffa_svc.h +++ b/atf-20240117-bacca82a8/include/services/ffa_svc.h @@ -34,7 +34,7 @@ #define FFA_VERSION_MAJOR U(1) #define FFA_VERSION_MAJOR_SHIFT 16 #define FFA_VERSION_MAJOR_MASK U(0x7FFF) -#define FFA_VERSION_MINOR U(1) +#define FFA_VERSION_MINOR U(2) #define FFA_VERSION_MINOR_SHIFT 0 #define FFA_VERSION_MINOR_MASK U(0xFFFF) #define FFA_VERSION_BIT31_MASK U(0x1u << 31) @@ -117,6 +117,10 @@ #define FFA_FNUM_SPM_ID_GET U(0x85) #define FFA_FNUM_MSG_SEND2 U(0x86) #define FFA_FNUM_SECONDARY_EP_REGISTER U(0x87) +#define FFA_FNUM_MEM_PERM_GET U(0x88) +#define FFA_FNUM_MEM_PERM_SET U(0x89) + +/* FF-A v1.2 */ #define FFA_FNUM_PARTITION_INFO_GET_REGS U(0x8B) #define FFA_FNUM_EL3_INTR_HANDLE U(0x8C) @@ -165,6 +169,8 @@ #define FFA_SPM_ID_GET FFA_FID(SMC_32, FFA_FNUM_SPM_ID_GET) #define FFA_NORMAL_WORLD_RESUME FFA_FID(SMC_32, FFA_FNUM_NORMAL_WORLD_RESUME) #define FFA_EL3_INTR_HANDLE FFA_FID(SMC_32, FFA_FNUM_EL3_INTR_HANDLE) +#define FFA_MEM_PERM_GET FFA_FID(SMC_32, FFA_FNUM_MEM_PERM_GET) +#define FFA_MEM_PERM_SET FFA_FID(SMC_32, FFA_FNUM_MEM_PERM_SET) /* FFA SMC64 FIDs */ #define FFA_ERROR_SMC64 FFA_FID(SMC_64, FFA_FNUM_ERROR) diff --git a/atf-20231013-0ea67d76a/include/services/pci_svc.h b/atf-20240117-bacca82a8/include/services/pci_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/pci_svc.h rename to atf-20240117-bacca82a8/include/services/pci_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/rmm_core_manifest.h b/atf-20240117-bacca82a8/include/services/rmm_core_manifest.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/rmm_core_manifest.h rename to atf-20240117-bacca82a8/include/services/rmm_core_manifest.h diff --git a/atf-20231013-0ea67d76a/include/services/rmmd_svc.h b/atf-20240117-bacca82a8/include/services/rmmd_svc.h similarity index 98% rename from atf-20231013-0ea67d76a/include/services/rmmd_svc.h rename to atf-20240117-bacca82a8/include/services/rmmd_svc.h index 55d778e43..a567d2855 100644 --- a/atf-20231013-0ea67d76a/include/services/rmmd_svc.h +++ b/atf-20240117-bacca82a8/include/services/rmmd_svc.h @@ -91,6 +91,10 @@ #define E_RMM_NOMEM -4 #define E_RMM_INVAL -5 +/* Return error codes from RMI SMCs */ +#define RMI_SUCCESS 0 +#define RMI_ERROR_INPUT 1 + /* Acceptable SHA sizes for Challenge object */ #define SHA256_DIGEST_SIZE 32U #define SHA384_DIGEST_SIZE 48U diff --git a/atf-20231013-0ea67d76a/include/services/sdei.h b/atf-20240117-bacca82a8/include/services/sdei.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/sdei.h rename to atf-20240117-bacca82a8/include/services/sdei.h diff --git a/atf-20231013-0ea67d76a/include/services/sdei_flags.h b/atf-20240117-bacca82a8/include/services/sdei_flags.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/sdei_flags.h rename to atf-20240117-bacca82a8/include/services/sdei_flags.h diff --git a/atf-20231013-0ea67d76a/include/services/spm_core_manifest.h b/atf-20240117-bacca82a8/include/services/spm_core_manifest.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/spm_core_manifest.h rename to atf-20240117-bacca82a8/include/services/spm_core_manifest.h diff --git a/atf-20231013-0ea67d76a/include/services/spm_mm_partition.h b/atf-20240117-bacca82a8/include/services/spm_mm_partition.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/spm_mm_partition.h rename to atf-20240117-bacca82a8/include/services/spm_mm_partition.h diff --git a/atf-20231013-0ea67d76a/include/services/spm_mm_svc.h b/atf-20240117-bacca82a8/include/services/spm_mm_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/spm_mm_svc.h rename to atf-20240117-bacca82a8/include/services/spm_mm_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/spmc_svc.h b/atf-20240117-bacca82a8/include/services/spmc_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/spmc_svc.h rename to atf-20240117-bacca82a8/include/services/spmc_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/spmd_svc.h b/atf-20240117-bacca82a8/include/services/spmd_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/spmd_svc.h rename to atf-20240117-bacca82a8/include/services/spmd_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/std_svc.h b/atf-20240117-bacca82a8/include/services/std_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/std_svc.h rename to atf-20240117-bacca82a8/include/services/std_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/trng_svc.h b/atf-20240117-bacca82a8/include/services/trng_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/trng_svc.h rename to atf-20240117-bacca82a8/include/services/trng_svc.h diff --git a/atf-20231013-0ea67d76a/include/services/trp/platform_trp.h b/atf-20240117-bacca82a8/include/services/trp/platform_trp.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/trp/platform_trp.h rename to atf-20240117-bacca82a8/include/services/trp/platform_trp.h diff --git a/atf-20231013-0ea67d76a/include/services/trp/trp_helpers.h b/atf-20240117-bacca82a8/include/services/trp/trp_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/include/services/trp/trp_helpers.h rename to atf-20240117-bacca82a8/include/services/trp/trp_helpers.h diff --git a/atf-20231013-0ea67d76a/include/tools_share/cca_oid.h b/atf-20240117-bacca82a8/include/tools_share/cca_oid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/tools_share/cca_oid.h rename to atf-20240117-bacca82a8/include/tools_share/cca_oid.h diff --git a/atf-20231013-0ea67d76a/include/tools_share/dualroot_oid.h b/atf-20240117-bacca82a8/include/tools_share/dualroot_oid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/tools_share/dualroot_oid.h rename to atf-20240117-bacca82a8/include/tools_share/dualroot_oid.h diff --git a/atf-20231013-0ea67d76a/include/tools_share/firmware_encrypted.h b/atf-20240117-bacca82a8/include/tools_share/firmware_encrypted.h similarity index 100% rename from atf-20231013-0ea67d76a/include/tools_share/firmware_encrypted.h rename to atf-20240117-bacca82a8/include/tools_share/firmware_encrypted.h diff --git a/atf-20231013-0ea67d76a/include/tools_share/firmware_image_package.h b/atf-20240117-bacca82a8/include/tools_share/firmware_image_package.h similarity index 100% rename from atf-20231013-0ea67d76a/include/tools_share/firmware_image_package.h rename to atf-20240117-bacca82a8/include/tools_share/firmware_image_package.h diff --git a/atf-20231013-0ea67d76a/include/tools_share/tbbr_oid.h b/atf-20240117-bacca82a8/include/tools_share/tbbr_oid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/tools_share/tbbr_oid.h rename to atf-20240117-bacca82a8/include/tools_share/tbbr_oid.h diff --git a/atf-20231013-0ea67d76a/include/tools_share/uuid.h b/atf-20240117-bacca82a8/include/tools_share/uuid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/tools_share/uuid.h rename to atf-20240117-bacca82a8/include/tools_share/uuid.h diff --git a/atf-20231013-0ea67d76a/include/tools_share/zero_oid.h b/atf-20240117-bacca82a8/include/tools_share/zero_oid.h similarity index 100% rename from atf-20231013-0ea67d76a/include/tools_share/zero_oid.h rename to atf-20240117-bacca82a8/include/tools_share/zero_oid.h diff --git a/atf-20231013-0ea67d76a/lib/aarch32/arm32_aeabi_divmod.c b/atf-20240117-bacca82a8/lib/aarch32/arm32_aeabi_divmod.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch32/arm32_aeabi_divmod.c rename to atf-20240117-bacca82a8/lib/aarch32/arm32_aeabi_divmod.c diff --git a/atf-20231013-0ea67d76a/lib/aarch32/arm32_aeabi_divmod_a32.S b/atf-20240117-bacca82a8/lib/aarch32/arm32_aeabi_divmod_a32.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch32/arm32_aeabi_divmod_a32.S rename to atf-20240117-bacca82a8/lib/aarch32/arm32_aeabi_divmod_a32.S diff --git a/atf-20231013-0ea67d76a/lib/aarch32/armclang_printf.S b/atf-20240117-bacca82a8/lib/aarch32/armclang_printf.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch32/armclang_printf.S rename to atf-20240117-bacca82a8/lib/aarch32/armclang_printf.S diff --git a/atf-20231013-0ea67d76a/lib/aarch32/cache_helpers.S b/atf-20240117-bacca82a8/lib/aarch32/cache_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch32/cache_helpers.S rename to atf-20240117-bacca82a8/lib/aarch32/cache_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/aarch32/misc_helpers.S b/atf-20240117-bacca82a8/lib/aarch32/misc_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch32/misc_helpers.S rename to atf-20240117-bacca82a8/lib/aarch32/misc_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/aarch64/armclang_printf.S b/atf-20240117-bacca82a8/lib/aarch64/armclang_printf.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch64/armclang_printf.S rename to atf-20240117-bacca82a8/lib/aarch64/armclang_printf.S diff --git a/atf-20231013-0ea67d76a/lib/aarch64/cache_helpers.S b/atf-20240117-bacca82a8/lib/aarch64/cache_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch64/cache_helpers.S rename to atf-20240117-bacca82a8/lib/aarch64/cache_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/aarch64/misc_helpers.S b/atf-20240117-bacca82a8/lib/aarch64/misc_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/aarch64/misc_helpers.S rename to atf-20240117-bacca82a8/lib/aarch64/misc_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/bl_aux_params/bl_aux_params.c b/atf-20240117-bacca82a8/lib/bl_aux_params/bl_aux_params.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/bl_aux_params/bl_aux_params.c rename to atf-20240117-bacca82a8/lib/bl_aux_params/bl_aux_params.c diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/LICENSE.TXT b/atf-20240117-bacca82a8/lib/compiler-rt/LICENSE.TXT similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/LICENSE.TXT rename to atf-20240117-bacca82a8/lib/compiler-rt/LICENSE.TXT diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_ldivmod.S b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_ldivmod.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_ldivmod.S rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_ldivmod.S diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_memcpy.S b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_memcpy.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_memcpy.S rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_memcpy.S diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_memset.S b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_memset.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_memset.S rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_memset.S diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_uldivmod.S b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_uldivmod.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/arm/aeabi_uldivmod.S rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/arm/aeabi_uldivmod.S diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/assembly.h b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/assembly.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/assembly.h rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/assembly.h diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/ctzdi2.c b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/ctzdi2.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/ctzdi2.c rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/ctzdi2.c diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/divdi3.c b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/divdi3.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/divdi3.c rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/divdi3.c diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/divmoddi4.c b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/divmoddi4.c similarity index 90% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/divmoddi4.c rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/divmoddi4.c index e7cbbb1aa..64bbb6934 100644 --- a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/divmoddi4.c +++ b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/divmoddi4.c @@ -18,8 +18,8 @@ COMPILER_RT_ABI di_int __divmoddi4(di_int a, di_int b, di_int *rem) { const int bits_in_dword_m1 = (int)(sizeof(di_int) * CHAR_BIT) - 1; di_int s_a = a >> bits_in_dword_m1; // s_a = a < 0 ? -1 : 0 di_int s_b = b >> bits_in_dword_m1; // s_b = b < 0 ? -1 : 0 - a = (a ^ s_a) - s_a; // negate if s_a == -1 - b = (b ^ s_b) - s_b; // negate if s_b == -1 + a = (du_int)(a ^ s_a) - s_a; // negate if s_a == -1 + b = (du_int)(b ^ s_b) - s_b; // negate if s_b == -1 s_b ^= s_a; // sign of quotient du_int r; di_int q = (__udivmoddi4(a, b, &r) ^ s_b) - s_b; // negate if s_b == -1 diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_div_impl.inc b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_div_impl.inc similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_div_impl.inc rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_div_impl.inc diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_endianness.h b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_endianness.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_endianness.h rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_endianness.h diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_lib.h b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_lib.h similarity index 99% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_lib.h rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_lib.h index fb791ebc4..04ea2d910 100644 --- a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_lib.h +++ b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_lib.h @@ -49,7 +49,7 @@ #define SYMBOL_NAME(name) XSTR(__USER_LABEL_PREFIX__) #name #if defined(__ELF__) || defined(__MINGW32__) || defined(__wasm__) || \ - defined(_AIX) + defined(_AIX) || defined(__CYGWIN__) #define COMPILER_RT_ALIAS(name, aliasname) \ COMPILER_RT_ABI __typeof(name) aliasname __attribute__((__alias__(#name))); #elif defined(__APPLE__) diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_math.h b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_math.h similarity index 87% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_math.h rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_math.h index 48b9580f5..74d3e311d 100644 --- a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_math.h +++ b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_math.h @@ -65,6 +65,11 @@ #define crt_copysign(x, y) __builtin_copysign((x), (y)) #define crt_copysignf(x, y) __builtin_copysignf((x), (y)) #define crt_copysignl(x, y) __builtin_copysignl((x), (y)) +#if __has_builtin(__builtin_copysignf128) +#define crt_copysignf128(x, y) __builtin_copysignf128((x), (y)) +#elif __has_builtin(__builtin_copysignq) || (defined(__GNUC__) && __GNUC__ >= 7) +#define crt_copysignf128(x, y) __builtin_copysignq((x), (y)) +#endif #endif #if defined(_MSC_VER) && !defined(__clang__) @@ -75,6 +80,11 @@ #define crt_fabs(x) __builtin_fabs((x)) #define crt_fabsf(x) __builtin_fabsf((x)) #define crt_fabsl(x) __builtin_fabsl((x)) +#if __has_builtin(__builtin_fabsf128) +#define crt_fabsf128(x) __builtin_fabsf128((x)) +#elif __has_builtin(__builtin_fabsq) || (defined(__GNUC__) && __GNUC__ >= 7) +#define crt_fabsf128(x) __builtin_fabsq((x)) +#endif #endif #if defined(_MSC_VER) && !defined(__clang__) diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_types.h b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_types.h similarity index 65% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_types.h rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_types.h index e94d3154c..18bf0a7f3 100644 --- a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_types.h +++ b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_types.h @@ -165,16 +165,80 @@ typedef struct { #define HAS_80_BIT_LONG_DOUBLE 0 #endif -#if CRT_HAS_FLOATING_POINT +#if HAS_80_BIT_LONG_DOUBLE +typedef long double xf_float; typedef union { uqwords u; - long double f; -} long_double_bits; + xf_float f; +} xf_bits; +#endif +#ifdef __powerpc64__ +// From https://gcc.gnu.org/wiki/Ieee128PowerPC: +// PowerPC64 uses the following suffixes: +// IFmode: IBM extended double +// KFmode: IEEE 128-bit floating point +// TFmode: Matches the default for long double. With -mabi=ieeelongdouble, +// it is IEEE 128-bit, with -mabi=ibmlongdouble IBM extended double +// Since compiler-rt only implements the tf set of libcalls, we use long double +// for the tf_float typedef. +typedef long double tf_float; +#define CRT_LDBL_128BIT +#define CRT_HAS_F128 +#if __LDBL_MANT_DIG__ == 113 && !defined(__LONG_DOUBLE_IBM128__) +#define CRT_HAS_IEEE_TF +#define CRT_LDBL_IEEE_F128 +#endif +#define TF_C(x) x##L +#elif __LDBL_MANT_DIG__ == 113 +// Use long double instead of __float128 if it matches the IEEE 128-bit format. +#define CRT_LDBL_128BIT +#define CRT_HAS_F128 +#define CRT_HAS_IEEE_TF +#define CRT_LDBL_IEEE_F128 +typedef long double tf_float; +#define TF_C(x) x##L +#elif defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__) +#define CRT_HAS___FLOAT128_KEYWORD +#define CRT_HAS_F128 +// NB: we assume the __float128 type uses IEEE representation. +#define CRT_HAS_IEEE_TF +typedef __float128 tf_float; +#define TF_C(x) x##Q +#endif + +#ifdef CRT_HAS_F128 +typedef union { + uqwords u; + tf_float f; +} tf_bits; +#endif + +// __(u)int128_t is currently needed to compile the *tf builtins as we would +// otherwise need to manually expand the bit manipulation on two 64-bit value. +#if defined(CRT_HAS_128BIT) && defined(CRT_HAS_F128) +#define CRT_HAS_TF_MODE +#endif + +#if CRT_HAS_FLOATING_POINT #if __STDC_VERSION__ >= 199901L typedef float _Complex Fcomplex; typedef double _Complex Dcomplex; typedef long double _Complex Lcomplex; +#if defined(CRT_LDBL_128BIT) +typedef Lcomplex Qcomplex; +#define CRT_HAS_NATIVE_COMPLEX_F128 +#elif defined(CRT_HAS___FLOAT128_KEYWORD) +#if defined(__clang_major__) && __clang_major__ > 10 +// Clang prior to 11 did not support __float128 _Complex. +typedef __float128 _Complex Qcomplex; +#define CRT_HAS_NATIVE_COMPLEX_F128 +#elif defined(__GNUC__) && __GNUC__ >= 7 +// GCC does not allow __float128 _Complex, but accepts _Float128 _Complex. +typedef _Float128 _Complex Qcomplex; +#define CRT_HAS_NATIVE_COMPLEX_F128 +#endif +#endif #define COMPLEX_REAL(x) __real__(x) #define COMPLEX_IMAGINARY(x) __imag__(x) @@ -194,5 +258,17 @@ typedef struct { #define COMPLEX_REAL(x) (x).real #define COMPLEX_IMAGINARY(x) (x).imaginary #endif + +#ifdef CRT_HAS_NATIVE_COMPLEX_F128 +#define COMPLEXTF_REAL(x) __real__(x) +#define COMPLEXTF_IMAGINARY(x) __imag__(x) +#elif defined(CRT_HAS_F128) +typedef struct { + tf_float real, imaginary; +} Qcomplex; +#define COMPLEXTF_REAL(x) (x).real +#define COMPLEXTF_IMAGINARY(x) (x).imaginary +#endif + #endif #endif // INT_TYPES_H diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_util.h b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_util.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/int_util.h rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/int_util.h diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/lshrdi3.c b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/lshrdi3.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/lshrdi3.c rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/lshrdi3.c diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/popcountdi2.c b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/popcountdi2.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/popcountdi2.c rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/popcountdi2.c diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/popcountsi2.c b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/popcountsi2.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/popcountsi2.c rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/popcountsi2.c diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/builtins/udivmoddi4.c b/atf-20240117-bacca82a8/lib/compiler-rt/builtins/udivmoddi4.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/builtins/udivmoddi4.c rename to atf-20240117-bacca82a8/lib/compiler-rt/builtins/udivmoddi4.c diff --git a/atf-20231013-0ea67d76a/lib/compiler-rt/compiler-rt.mk b/atf-20240117-bacca82a8/lib/compiler-rt/compiler-rt.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/compiler-rt/compiler-rt.mk rename to atf-20240117-bacca82a8/lib/compiler-rt/compiler-rt.mk diff --git a/atf-20231013-0ea67d76a/lib/coreboot/coreboot.mk b/atf-20240117-bacca82a8/lib/coreboot/coreboot.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/coreboot/coreboot.mk rename to atf-20240117-bacca82a8/lib/coreboot/coreboot.mk diff --git a/atf-20231013-0ea67d76a/lib/coreboot/coreboot_table.c b/atf-20240117-bacca82a8/lib/coreboot/coreboot_table.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/coreboot/coreboot_table.c rename to atf-20240117-bacca82a8/lib/coreboot/coreboot_table.c diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/aem_generic.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/aem_generic.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/aem_generic.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/aem_generic.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a12.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a12.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a12.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a12.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a15.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a15.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a15.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a15.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a17.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a17.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a17.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a17.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a32.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a32.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a32.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a32.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a5.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a5.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a5.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a5.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a53.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a53.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a53.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a53.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a57.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a57.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a57.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a57.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a7.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a7.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a7.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a7.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a72.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a72.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a72.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a72.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a9.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a9.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cortex_a9.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cortex_a9.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch32/cpu_helpers.S b/atf-20240117-bacca82a8/lib/cpus/aarch32/cpu_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch32/cpu_helpers.S rename to atf-20240117-bacca82a8/lib/cpus/aarch32/cpu_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/a64fx.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/a64fx.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/a64fx.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/a64fx.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/aem_generic.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/aem_generic.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/aem_generic.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/aem_generic.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a35.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a35.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a35.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a35.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a510.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a510.S similarity index 93% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a510.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a510.S index 6fce24e02..a59b92c15 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a510.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a510.S @@ -57,6 +57,30 @@ workaround_reset_end cortex_a510, ERRATUM(2042739) check_erratum_ls cortex_a510, ERRATUM(2042739), CPU_REV(0, 2) +workaround_reset_start cortex_a510, ERRATUM(2080326), ERRATA_A510_2080326 + /* Apply workaround */ + mov x0, #1 + msr S3_6_C15_C4_0, x0 + isb + + mov x0, #0x0100 + movk x0, #0x0E08, lsl #16 + msr S3_6_C15_C4_2, x0 + + mov x0, #0x0300 + movk x0, #0x0F1F, lsl #16 + movk x0, #0x0008, lsl #32 + msr S3_6_C15_C4_3, x0 + + mov x0, #0x03F1 + movk x0, #0x00C0, lsl #16 + msr S3_6_C15_C4_1, x0 + + isb +workaround_reset_end cortex_a510, ERRATUM(2080326) + +check_erratum_range cortex_a510, ERRATUM(2080326), CPU_REV(0, 2), CPU_REV(0, 2) + workaround_reset_start cortex_a510, ERRATUM(2172148), ERRATA_A510_2172148 /* * Force L2 allocation of transient lines by setting diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a520.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a520.S similarity index 80% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a520.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a520.S index 6c2f33e85..74ecbf7c9 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a520.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a520.S @@ -21,6 +21,17 @@ #error "Cortex A520 supports only AArch64. Compile with CTX_INCLUDE_AARCH32_REGS=0" #endif +workaround_reset_start cortex_a520, ERRATUM(2630792), ERRATA_A520_2630792 + sysreg_bit_set CORTEX_A520_CPUACTLR_EL1, BIT(38) +workaround_reset_end cortex_a520, ERRATUM(2630792) + +check_erratum_ls cortex_a520, ERRATUM(2630792), CPU_REV(0, 1) + +workaround_reset_start cortex_a520, ERRATUM(2858100), ERRATA_A520_2858100 + sysreg_bit_set CORTEX_A520_CPUACTLR_EL1, BIT(29) +workaround_reset_end cortex_a520, ERRATUM(2858100) + +check_erratum_ls cortex_a520, ERRATUM(2858100), CPU_REV(0, 1) /* ---------------------------------------------------- * HW will do the cache maintenance while powering down * ---------------------------------------------------- diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a53.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a53.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a53.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a53.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a55.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a55.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a55.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a55.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a57.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a57.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a57.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a57.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a65.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a65.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a65.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a65.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a65ae.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a65ae.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a65ae.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a65ae.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a710.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a710.S similarity index 92% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a710.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a710.S index eab5ada7f..b99fbb3c1 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a710.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a710.S @@ -80,14 +80,14 @@ workaround_reset_start cortex_a710, ERRATUM(2055002), ERRATA_A710_2055002 sysreg_bit_set CORTEX_A710_CPUACTLR_EL1, CORTEX_A710_CPUACTLR_EL1_BIT_46 workaround_reset_end cortex_a710, ERRATUM(2055002) -check_erratum_ls cortex_a710, ERRATUM(2055002), CPU_REV(2, 0) +check_erratum_range cortex_a710, ERRATUM(2055002), CPU_REV(1, 0), CPU_REV(2, 0) workaround_reset_start cortex_a710, ERRATUM(2058056), ERRATA_A710_2058056 sysreg_bitfield_insert CORTEX_A710_CPUECTLR2_EL1, CORTEX_A710_CPUECTLR2_EL1_PF_MODE_CNSRV, \ CPUECTLR2_EL1_PF_MODE_LSB, CPUECTLR2_EL1_PF_MODE_WIDTH workaround_reset_end cortex_a710, ERRATUM(2058056) -check_erratum_ls cortex_a710, ERRATUM(2058056), CPU_REV(2, 0) +check_erratum_ls cortex_a710, ERRATUM(2058056), CPU_REV(2, 1) workaround_reset_start cortex_a710, ERRATUM(2081180), ERRATA_A710_2081180 ldr x0,=0x3 @@ -178,6 +178,14 @@ workaround_reset_end cortex_a710, ERRATUM(2371105) check_erratum_ls cortex_a710, ERRATUM(2371105), CPU_REV(2, 0) +workaround_reset_start cortex_a710, ERRATUM(2742423), ERRATA_A710_2742423 + /* Set CPUACTLR5_EL1[56:55] to 2'b01 */ + sysreg_bit_set CORTEX_A710_CPUACTLR5_EL1, BIT(55) + sysreg_bit_clear CORTEX_A710_CPUACTLR5_EL1, BIT(56) +workaround_reset_end cortex_a710, ERRATUM(2742423) + +check_erratum_ls cortex_a710, ERRATUM(2742423), CPU_REV(2, 1) + workaround_runtime_start cortex_a710, ERRATUM(2768515), ERRATA_A710_2768515 /* dsb before isb of power down sequence */ dsb sy @@ -185,6 +193,12 @@ workaround_runtime_end cortex_a710, ERRATUM(2768515), NO_ISB check_erratum_ls cortex_a710, ERRATUM(2768515), CPU_REV(2, 1) +workaround_reset_start cortex_a710, ERRATUM(2778471), ERRATA_A710_2778471 + sysreg_bit_set CORTEX_A710_CPUACTLR3_EL1, BIT(47) +workaround_reset_end cortex_a710, ERRATUM(2778471) + +check_erratum_ls cortex_a710, ERRATUM(2778471), CPU_REV(2, 1) + workaround_reset_start cortex_a710, CVE(2022, 23960), WORKAROUND_CVE_2022_23960 #if IMAGE_BL31 /* diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a715.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a715.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a715.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a715.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a72.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a72.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a72.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a72.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a720.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a720.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a720.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a720.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a73.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a73.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a73.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a73.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a75.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a75.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a75.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a75.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a75_pubsub.c b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a75_pubsub.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a75_pubsub.c rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a75_pubsub.c diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a76.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a76.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a76.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a76.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a76ae.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a76ae.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a76ae.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a76ae.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a77.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a77.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a77.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a77.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78_ae.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78_ae.S similarity index 98% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78_ae.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78_ae.S index 94f6465c6..d3a3e5d88 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78_ae.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78_ae.S @@ -70,7 +70,7 @@ workaround_reset_start cortex_a78_ae, ERRATUM(2376748), ERRATA_A78_AE_2376748 sysreg_bit_set CORTEX_A78_AE_ACTLR2_EL1, CORTEX_A78_AE_ACTLR2_EL1_BIT_0 workaround_reset_end cortex_a78_ae, ERRATUM(2376748) -check_erratum_ls cortex_a78_ae, ERRATUM(2376748), CPU_REV(0, 1) +check_erratum_ls cortex_a78_ae, ERRATUM(2376748), CPU_REV(0, 2) workaround_reset_start cortex_a78_ae, ERRATUM(2395408), ERRATA_A78_AE_2395408 /* -------------------------------------------------------- diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78c.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78c.S similarity index 93% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78c.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78c.S index d19c69386..2e6e8b6a9 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_a78c.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_a78c.S @@ -72,6 +72,14 @@ workaround_reset_end cortex_a78c, ERRATUM(2395411) check_erratum_range cortex_a78c, ERRATUM(2395411), CPU_REV(0, 1), CPU_REV(0, 2) +workaround_reset_start cortex_a78c, ERRATUM(2743232), ERRATA_A78C_2743232 + /* Set CPUACTLR5_EL1[56:55] to 2'b01 */ + sysreg_bit_set CORTEX_A78C_ACTLR5_EL1, BIT(55) + sysreg_bit_clear CORTEX_A78C_ACTLR5_EL1, BIT(56) +workaround_reset_end cortex_a78c, ERRATUM(2743232) + +check_erratum_range cortex_a78c, ERRATUM(2743232), CPU_REV(0, 1), CPU_REV(0, 2) + workaround_runtime_start cortex_a78c, ERRATUM(2772121), ERRATA_A78C_2772121 /* dsb before isb of power down sequence */ dsb sy diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_blackhawk.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_blackhawk.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_blackhawk.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_blackhawk.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_chaberton.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_chaberton.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_chaberton.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_chaberton.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_gelas.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_gelas.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_gelas.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_gelas.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x1.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x1.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x1.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x1.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x2.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x2.S similarity index 91% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x2.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x2.S index 816a58f65..d018182cc 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x2.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x2.S @@ -50,7 +50,7 @@ workaround_reset_start cortex_x2, ERRATUM(2058056), ERRATA_X2_2058056 CORTEX_X2_CPUECTLR2_EL1_PF_MODE_SHIFT, CORTEX_X2_CPUECTLR2_EL1_PF_MODE_WIDTH workaround_reset_end cortex_x2, ERRATUM(2058056) -check_erratum_ls cortex_x2, ERRATUM(2058056), CPU_REV(2, 0) +check_erratum_ls cortex_x2, ERRATUM(2058056), CPU_REV(2, 1) workaround_reset_start cortex_x2, ERRATUM(2081180), ERRATA_X2_2081180 /* Apply instruction patching sequence */ @@ -118,6 +118,14 @@ workaround_reset_end cortex_x2, ERRATUM(2371105) check_erratum_ls cortex_x2, ERRATUM(2371105), CPU_REV(2, 0) +workaround_reset_start cortex_x2, ERRATUM(2742423), ERRATA_X2_2742423 + /* Set CPUACTLR5_EL1[56:55] to 2'b01 */ + sysreg_bit_set CORTEX_X2_CPUACTLR5_EL1, BIT(55) + sysreg_bit_clear CORTEX_X2_CPUACTLR5_EL1, BIT(56) +workaround_reset_end cortex_x2, ERRATUM(2742423) + +check_erratum_ls cortex_x2, ERRATUM(2742423), CPU_REV(2, 1) + workaround_reset_start cortex_x2, ERRATUM(2768515), ERRATA_X2_2768515 /* dsb before isb of power down sequence */ dsb sy @@ -125,6 +133,12 @@ workaround_reset_end cortex_x2, ERRATUM(2768515) check_erratum_ls cortex_x2, ERRATUM(2768515), CPU_REV(2, 1) +workaround_reset_start cortex_x2, ERRATUM(2778471), ERRATA_X2_2778471 + sysreg_bit_set CORTEX_X2_CPUACTLR3_EL1, BIT(47) +workaround_reset_end cortex_x2, ERRATUM(2778471) + +check_erratum_ls cortex_x2, ERRATUM(2778471), CPU_REV(2, 1) + workaround_reset_start cortex_x2, CVE(2022, 23960), WORKAROUND_CVE_2022_23960 #if IMAGE_BL31 /* diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x3.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x3.S similarity index 85% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x3.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x3.S index 0cb3b976b..7e9a7fcf6 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x3.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x3.S @@ -57,6 +57,20 @@ workaround_reset_end cortex_x3, ERRATUM(2742421) check_erratum_ls cortex_x3, ERRATUM(2742421), CPU_REV(1, 1) +workaround_runtime_start cortex_x3, ERRATUM(2743088), ERRATA_X3_2743088 + /* dsb before isb of power down sequence */ + dsb sy +workaround_runtime_end cortex_x3, ERRATUM(2743088), NO_ISB + +check_erratum_ls cortex_x3, ERRATUM(2743088), CPU_REV(1, 1) + +workaround_reset_start cortex_x3, ERRATUM(2779509), ERRATA_X3_2779509 + /* Set CPUACTLR3_EL1 bit 47 */ + sysreg_bit_set CORTEX_X3_CPUACTLR3_EL1, CORTEX_X3_CPUACTLR3_EL1_BIT_47 +workaround_reset_end cortex_x3, ERRATUM(2779509) + +check_erratum_ls cortex_x3, ERRATUM(2779509), CPU_REV(1, 1) + workaround_reset_start cortex_x3, CVE(2022, 23960), WORKAROUND_CVE_2022_23960 #if IMAGE_BL31 override_vector_table wa_cve_vbar_cortex_x3 @@ -75,12 +89,13 @@ cpu_reset_func_end cortex_x3 * ---------------------------------------------------- */ func cortex_x3_core_pwr_dwn -apply_erratum cortex_x3, ERRATUM(2313909), ERRATA_X3_2313909 + apply_erratum cortex_x3, ERRATUM(2313909), ERRATA_X3_2313909 /* --------------------------------------------------- * Enable CPU power down bit in power control register * --------------------------------------------------- */ sysreg_bit_set CORTEX_X3_CPUPWRCTLR_EL1, CORTEX_X3_CPUPWRCTLR_EL1_CORE_PWRDN_BIT + apply_erratum cortex_x3, ERRATUM(2743088), ERRATA_X3_2743088 isb ret endfunc cortex_x3_core_pwr_dwn diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x4.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x4.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cortex_x4.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cortex_x4.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cpu_helpers.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cpu_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cpu_helpers.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cpu_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cpuamu.c b/atf-20240117-bacca82a8/lib/cpus/aarch64/cpuamu.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cpuamu.c rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cpuamu.c diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/cpuamu_helpers.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/cpuamu_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/cpuamu_helpers.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/cpuamu_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/denver.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/denver.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/denver.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/denver.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/dsu_helpers.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/dsu_helpers.S similarity index 96% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/dsu_helpers.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/dsu_helpers.S index a34b9a676..8e5b4598c 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/dsu_helpers.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/dsu_helpers.S @@ -151,13 +151,22 @@ endfunc errata_dsu_936184_wa * This function is called from both assembly and C environment. So it * follows AAPCS. * - * Clobbers: x0-x3 + * Clobbers: x0-x4 * ----------------------------------------------------------------------- */ .globl check_errata_dsu_2313941 .globl errata_dsu_2313941_wa func check_errata_dsu_2313941 + mov x4, x30 + bl is_scu_present_in_dsu + cmp x0, xzr + /* Default error status */ + mov x0, #ERRATA_NOT_APPLIES + + /* If SCU is not present, return without applying patch */ + b.eq 1f + mov x2, #ERRATA_APPLIES mov x3, #ERRATA_NOT_APPLIES @@ -170,7 +179,8 @@ func check_errata_dsu_2313941 mov x1, #(0x31 << CLUSTERIDR_REV_SHIFT) cmp x0, x1 csel x0, x2, x3, LS - ret +1: + ret x4 endfunc check_errata_dsu_2313941 /* -------------------------------------------------- diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/generic.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/generic.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/generic.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/generic.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_e1.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_e1.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_e1.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_e1.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_hermes.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_hermes.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_hermes.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_hermes.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n1.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n1.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n1.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n1.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n1_pubsub.c b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n1_pubsub.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n1_pubsub.c rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n1_pubsub.c diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n2.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n2.S similarity index 92% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n2.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n2.S index ead390800..a85d95682 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n2.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n2.S @@ -165,6 +165,23 @@ workaround_runtime_end neoverse_n2, ERRATUM(2326639) check_erratum_ls neoverse_n2, ERRATUM(2326639), CPU_REV(0, 0) +workaround_runtime_start neoverse_n2, ERRATUM(2340933), ERRATA_N2_2340933 + /* Set bit 61 in CPUACTLR5_EL1 */ + sysreg_bit_set NEOVERSE_N2_CPUACTLR5_EL1, BIT(61) +workaround_runtime_end neoverse_n2, ERRATUM(2340933) + +check_erratum_ls neoverse_n2, ERRATUM(2340933), CPU_REV(0, 0) + +workaround_runtime_start neoverse_n2, ERRATUM(2346952), ERRATA_N2_2346952 + /* Set TXREQ to STATIC and full L2 TQ size */ + mrs x1, NEOVERSE_N2_CPUECTLR2_EL1 + mov x0, #CPUECTLR2_EL1_TXREQ_STATIC_FULL + bfi x1, x0, #CPUECTLR2_EL1_TXREQ_LSB, #CPUECTLR2_EL1_TXREQ_WIDTH + msr NEOVERSE_N2_CPUECTLR2_EL1, x1 +workaround_runtime_end neoverse_n2, ERRATUM(2346952) + +check_erratum_ls neoverse_n2, ERRATUM(2346952), CPU_REV(0, 2) + workaround_reset_start neoverse_n2, ERRATUM(2376738), ERRATA_N2_2376738 /* Set CPUACTLR2_EL1[0] to 1 to force PLDW/PFRM * ST to behave like PLD/PFRM LD and not cause @@ -235,9 +252,9 @@ cpu_reset_func_start neoverse_n2 #if ENABLE_FEAT_AMU /* Make sure accesses from EL0/EL1 and EL2 are not trapped to EL3 */ - sysreg_bit_set cptr_el3, TAM_BIT + sysreg_bit_clear cptr_el3, TAM_BIT /* Make sure accesses from EL0/EL1 are not trapped to EL2 */ - sysreg_bit_set cptr_el2, TAM_BIT + sysreg_bit_clear cptr_el2, TAM_BIT /* No need to enable the counters as this would be done at el3 exit */ #endif diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n_common.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n_common.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_n_common.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_n_common.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_poseidon.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_poseidon.S similarity index 90% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_poseidon.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_poseidon.S index 3b3245d8e..54c2ff9a2 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_poseidon.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_poseidon.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, Arm Limited. All rights reserved. + * Copyright (c) 2022-2024, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -81,6 +81,10 @@ func neoverse_poseidon_cpu_reg_dump ret endfunc neoverse_poseidon_cpu_reg_dump -declare_cpu_ops neoverse_poseidon, NEOVERSE_POSEIDON_MIDR, \ +declare_cpu_ops neoverse_poseidon, NEOVERSE_POSEIDON_VNAE_MIDR, \ + neoverse_poseidon_reset_func, \ + neoverse_poseidon_core_pwr_dwn + +declare_cpu_ops neoverse_poseidon, NEOVERSE_POSEIDON_V_MIDR, \ neoverse_poseidon_reset_func, \ neoverse_poseidon_core_pwr_dwn diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_v1.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_v1.S similarity index 95% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_v1.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_v1.S index 35d2c480f..c2fbb1110 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_v1.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_v1.S @@ -161,7 +161,7 @@ workaround_reset_start neoverse_v1, ERRATUM(2108267), ERRATA_V1_2108267 msr NEOVERSE_V1_CPUECTLR_EL1, x1 workaround_reset_end neoverse_v1, ERRATUM(2108267) -check_erratum_ls neoverse_v1, ERRATUM(2108267), CPU_REV(1, 1) +check_erratum_ls neoverse_v1, ERRATUM(2108267), CPU_REV(1, 2) workaround_reset_start neoverse_v1, ERRATUM(2139242), ERRATA_V1_2139242 mov x0, #0x3 @@ -194,7 +194,14 @@ workaround_reset_start neoverse_v1, ERRATUM(2294912), ERRATA_V1_2294912 sysreg_bit_set NEOVERSE_V1_ACTLR2_EL1, NEOVERSE_V1_ACTLR2_EL1_BIT_0 workaround_reset_end neoverse_v1, ERRATUM(2294912) -check_erratum_ls neoverse_v1, ERRATUM(2294912), CPU_REV(1, 1) +check_erratum_ls neoverse_v1, ERRATUM(2294912), CPU_REV(1, 2) + +workaround_runtime_start neoverse_v1, ERRATUM(2348377), ERRATA_V1_2348377 + /* Set bit 61 in CPUACTLR5_EL1 */ + sysreg_bit_set NEOVERSE_V1_ACTLR5_EL1, NEOVERSE_V1_ACTLR5_EL1_BIT_61 +workaround_runtime_end neoverse_v1, ERRATUM(2348377) + +check_erratum_ls neoverse_v1, ERRATUM(2348377), CPU_REV(1, 1) workaround_reset_start neoverse_v1, ERRATUM(2372203), ERRATA_V1_2372203 /* Set bit 40 in ACTLR2_EL1 */ diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_v2.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_v2.S similarity index 81% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_v2.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_v2.S index bfd088d50..d4b3a96cd 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/aarch64/neoverse_v2.S +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/neoverse_v2.S @@ -29,6 +29,25 @@ workaround_reset_end neoverse_v2, ERRATUM(2331132) check_erratum_ls neoverse_v2, ERRATUM(2331132), CPU_REV(0, 2) +workaround_reset_start neoverse_v2, ERRATUM(2618597), ERRATA_V2_2618597 + /* Disable retention control for WFI and WFE. */ + mrs x0, NEOVERSE_V2_CPUPWRCTLR_EL1 + bfi x0, xzr, #NEOVERSE_V2_CPUPWRCTLR_EL1_WFI_RET_CTRL_SHIFT, \ + #NEOVERSE_V2_CPUPWRCTLR_EL1_WFI_RET_CTRL_WIDTH + bfi x0, xzr, #NEOVERSE_V2_CPUPWRCTLR_EL1_WFE_RET_CTRL_SHIFT, \ + #NEOVERSE_V2_CPUPWRCTLR_EL1_WFE_RET_CTRL_WIDTH + msr NEOVERSE_V2_CPUPWRCTLR_EL1, x0 +workaround_reset_end neoverse_v2, ERRATUM(2618597) + +check_erratum_ls neoverse_v2, ERRATUM(2618597), CPU_REV(0, 1) + +workaround_reset_start neoverse_v2, ERRATUM(2662553), ERRATA_V2_2662553 + sysreg_bitfield_insert NEOVERSE_V2_CPUECTLR2_EL1, NEOVERSE_V2_CPUECTLR2_EL1_TXREQ_STATIC_FULL, \ + NEOVERSE_V2_CPUECTLR2_EL1_TXREQ_LSB, NEOVERSE_V2_CPUECTLR2_EL1_TXREQ_WIDTH +workaround_reset_end neoverse_v2, ERRATUM(2662553) + +check_erratum_ls neoverse_v2, ERRATUM(2662553), CPU_REV(0, 1) + workaround_reset_start neoverse_v2, ERRATUM(2719105), ERRATA_V2_2719105 sysreg_bit_set NEOVERSE_V2_CPUACTLR2_EL1, NEOVERSE_V2_CPUACTLR2_EL1_BIT_0 workaround_reset_end neoverse_v2, ERRATUM(2719105) diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/nevis.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/nevis.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/nevis.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/nevis.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/qemu_max.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/qemu_max.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/qemu_max.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/qemu_max.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/rainier.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/rainier.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/rainier.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/rainier.S diff --git a/atf-20240117-bacca82a8/lib/cpus/aarch64/travis.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/travis.S new file mode 100644 index 000000000..2abefe944 --- /dev/null +++ b/atf-20240117-bacca82a8/lib/cpus/aarch64/travis.S @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include +#include + +/* Hardware handled coherency */ +#if HW_ASSISTED_COHERENCY == 0 +#error "Travis must be compiled with HW_ASSISTED_COHERENCY enabled" +#endif + +/* 64-bit only core */ +#if CTX_INCLUDE_AARCH32_REGS == 1 +#error "Travis supports only AArch64. Compile with CTX_INCLUDE_AARCH32_REGS=0" +#endif + +cpu_reset_func_start travis + /* ---------------------------------------------------- + * Disable speculative loads + * ---------------------------------------------------- + */ + msr SSBS, xzr +cpu_reset_func_end travis + +func travis_core_pwr_dwn +#if ENABLE_SME_FOR_NS + /* --------------------------------------------------- + * Disable SME if enabled and supported + * --------------------------------------------------- + */ + mrs x0, ID_AA64PFR1_EL1 + ubfx x0, x0, #ID_AA64PFR1_EL1_SME_SHIFT, \ + #ID_AA64PFR1_EL1_SME_WIDTH + cmp x0, #ID_AA64PFR1_EL1_SME_NOT_SUPPORTED + b.eq 1f + msr TRAVIS_SVCRSM, xzr + msr TRAVIS_SVCRZA, xzr +1: +#endif + /* --------------------------------------------------- + * Enable CPU power down bit in power control register + * --------------------------------------------------- + */ + sysreg_bit_set TRAVIS_IMP_CPUPWRCTLR_EL1, \ + TRAVIS_IMP_CPUPWRCTLR_EL1_CORE_PWRDN_EN_BIT + isb + ret +endfunc travis_core_pwr_dwn + +errata_report_shim travis + +.section .rodata.travis_regs, "aS" +travis_regs: /* The ASCII list of register names to be reported */ + .asciz "cpuectlr_el1", "" + +func travis_cpu_reg_dump + adr x6, travis_regs + mrs x8, TRAVIS_IMP_CPUECTLR_EL1 + ret +endfunc travis_cpu_reg_dump + +declare_cpu_ops travis, TRAVIS_MIDR, \ + travis_reset_func, \ + travis_core_pwr_dwn diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2017_5715_mmu.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2017_5715_mmu.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2017_5715_mmu.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2017_5715_mmu.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2022_23960_bhb.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2022_23960_bhb.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2022_23960_bhb.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2022_23960_bhb.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2022_23960_bhb_vector.S b/atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2022_23960_bhb_vector.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/aarch64/wa_cve_2022_23960_bhb_vector.S rename to atf-20240117-bacca82a8/lib/cpus/aarch64/wa_cve_2022_23960_bhb_vector.S diff --git a/atf-20231013-0ea67d76a/lib/cpus/cpu-ops.mk b/atf-20240117-bacca82a8/lib/cpus/cpu-ops.mk similarity index 91% rename from atf-20231013-0ea67d76a/lib/cpus/cpu-ops.mk rename to atf-20240117-bacca82a8/lib/cpus/cpu-ops.mk index e12795f81..0ad5e7819 100644 --- a/atf-20231013-0ea67d76a/lib/cpus/cpu-ops.mk +++ b/atf-20240117-bacca82a8/lib/cpus/cpu-ops.mk @@ -352,7 +352,7 @@ CPU_FLAG_LIST += ERRATA_A78_AE_1941500 CPU_FLAG_LIST += ERRATA_A78_AE_1951502 # Flag to apply erratum 2376748 workaround during reset. This erratum applies -# to revisions r0p0 and r0p1 of the A78 AE cpu. It is still open. +# to revisions r0p0, r0p1 and r0p2 of the A78 AE cpu. It is still open. CPU_FLAG_LIST += ERRATA_A78_AE_2376748 # Flag to apply erratum 2395408 workaround during reset. This erratum applies @@ -393,6 +393,10 @@ CPU_FLAG_LIST += ERRATA_A78C_2395411 # It is still open. CPU_FLAG_LIST += ERRATA_A78C_2712575 +# Flag to apply erratum 2743232 workaround during reset. This erratum applies +# to revisions r0p1 and r0p2 of the A78C cpu. It is still open. +CPU_FLAG_LIST += ERRATA_A78C_2743232 + # Flag to apply erratum 2772121 workaround during powerdown. This erratum # applies to revisions r0p0, r0p1 and r0p2 of the A78C cpu. It is still open. CPU_FLAG_LIST += ERRATA_A78C_2772121 @@ -517,9 +521,13 @@ CPU_FLAG_LIST += ERRATA_V1_2108267 CPU_FLAG_LIST += ERRATA_V1_2216392 # Flag to apply erratum 2294912 workaround during reset. This erratum applies -# to revisions r0p0, r1p0, and r1p1 of the Neoverse V1 cpu and is still open. +# to revisions r0p0, r1p0, and r1p1 and r1p2 of the Neoverse V1 cpu and is still open. CPU_FLAG_LIST += ERRATA_V1_2294912 +# Flag to apply erratum 2348377 workaround during reset. This erratum applies +# to revisions r0p0, r1p0 and r1p1 of the Neoverse V1 cpu and is fixed in r1p2. +CPU_FLAG_LIST += ERRATA_V1_2348377 + # Flag to apply erratum 2372203 workaround during reset. This erratum applies # to revisions r0p0, r1p0 and r1p1 of the Neoverse V1 cpu and is still open. CPU_FLAG_LIST += ERRATA_V1_2372203 @@ -557,7 +565,8 @@ CPU_FLAG_LIST += ERRATA_A710_2081180 CPU_FLAG_LIST += ERRATA_A710_2083908 # Flag to apply erratum 2058056 workaround during reset. This erratum applies -# to revisions r0p0, r1p0 and r2p0 of the Cortex-A710 cpu and is still open. +# to revisions r0p0, r1p0, r2p0 and r2p1 of the Cortex-A710 cpu and is still +# open. CPU_FLAG_LIST += ERRATA_A710_2058056 # Flag to apply erratum 2055002 workaround during reset. This erratum applies @@ -606,11 +615,21 @@ CPU_FLAG_LIST += ERRATA_A710_2371105 # and is still open. CPU_FLAG_LIST += ERRATA_A710_2701952 +# Flag to apply erratum 2742423 workaround during reset. This erratum applies +# to revision r0p0, r1p0, r2p0 and r2p1 of the Cortex-A710 cpu and is still +# open. +CPU_FLAG_LIST += ERRATA_A710_2742423 + # Flag to apply erratum 2768515 workaround during power down. This erratum # applies to revision r0p0, r1p0, r2p0 and r2p1 of the Cortex-A710 cpu and is # still open. CPU_FLAG_LIST += ERRATA_A710_2768515 +# Flag to apply erratum 2778471 workaround during reset. This erratum applies +# to revisions r0p0, r1p0, r2p0, r2p1 of the Cortex-A710 cpu and is still +# open. +CPU_FLAG_LIST += ERRATA_A710_2778471 + # Flag to apply erratum 2002655 workaround during reset. This erratum applies # to revisions r0p0 of the Neoverse-N2 cpu and is fixed in r0p1. CPU_FLAG_LIST += ERRATA_N2_2002655 @@ -655,10 +674,18 @@ CPU_FLAG_LIST += ERRATA_N2_2242400 # to revision r0p0 of the Neoverse N2 cpu and is fixed in r0p1. CPU_FLAG_LIST += ERRATA_N2_2280757 -# Flag to apply erraturm 2326639 workaroud during powerdown. This erratum +# Flag to apply erratum 2326639 workaroud during powerdown. This erratum # applies to revision r0p0 of the Neoverse N2 cpu and is fixed in r0p1. CPU_FLAG_LIST += ERRATA_N2_2326639 +# Flag to apply erratum 2340933 workaroud during reset. This erratum +# applies to revision r0p0 of the Neoverse N2 cpu and is fixed in r0p1. +CPU_FLAG_LIST += ERRATA_N2_2340933 + +# Flag to apply erratum 2346952 workaround during reset. This erratum applies +# to r0p0, r0p1, r0p2 of the Neoverse N2 cpu, it is fixed in r0p3. +CPU_FLAG_LIST += ERRATA_N2_2346952 + # Flag to apply erratum 2376738 workaround during reset. This erratum applies # to revision r0p0, r0p1, r0p2, r0p3 of the Neoverse N2 cpu and is still open. CPU_FLAG_LIST += ERRATA_N2_2376738 @@ -689,7 +716,7 @@ CPU_FLAG_LIST += ERRATA_N2_2779511 CPU_FLAG_LIST += ERRATA_X2_2002765 # Flag to apply erratum 2058056 workaround during reset. This erratum applies -# to revisions r0p0, r1p0, and r2p0 of the Cortex-X2 cpu and is still open. +# to revisions r0p0, r1p0, r2p0 and r2p1 of the Cortex-X2 cpu and is still open. CPU_FLAG_LIST += ERRATA_X2_2058056 # Flag to apply erratum 2083908 workaround during reset. This erratum applies @@ -729,11 +756,19 @@ CPU_FLAG_LIST += ERRATA_X2_2371105 # and is still open. CPU_FLAG_LIST += ERRATA_X2_2701952 +# Flag to apply erratum 2742423 workaround during reset. This erratum applies +# to revisions r0p0, r1p0, r2p0 and r2p1 of the Cortex-X2 cpu and is still open. +CPU_FLAG_LIST += ERRATA_X2_2742423 + # Flag to apply erratum 2768515 workaround during power down. This erratum # applies to revision r0p0, r1p0, r2p0 and r2p1 of the Cortex-X2 cpu and is # still open. CPU_FLAG_LIST += ERRATA_X2_2768515 +# Flag to apply erratum 2778471 workaround during reset. This erratum applies +# to revisions r0p0, r1p0, r2p0, r2p1 of the Cortex-X2 cpu and it is still open. +CPU_FLAG_LIST += ERRATA_X2_2778471 + # Flag to apply erratum 2070301 workaround on reset. This erratum applies # to revisions r0p0, r1p0, r1p1 and r1p2 of the Cortex-X3 cpu and is # still open. @@ -751,6 +786,14 @@ CPU_FLAG_LIST += ERRATA_X3_2615812 # to revisions r0p0, r1p0 and r1p1 of the Cortex-X3 cpu, it is fixed in r1p2. CPU_FLAG_LIST += ERRATA_X3_2742421 +# Flag to apply erratum 2743088 workaround on powerdown. This erratum applies +# to revisions r0p0, r1p0 and r1p1 of the Cortex-X3 cpu, it is fixed in r1p2. +CPU_FLAG_LIST += ERRATA_X3_2743088 + +# Flag to apply erratum 2779509 workaround on reset. This erratum applies +# to revisions r0p0, r1p0, r1p1 of the Cortex-X3 cpu, it is fixed in r1p2. +CPU_FLAG_LIST += ERRATA_X3_2779509 + # Flag to apply erratum 1922240 workaround during reset. This erratum applies # to revision r0p0 of the Cortex-A510 cpu and is fixed in r0p1. CPU_FLAG_LIST += ERRATA_A510_1922240 @@ -769,6 +812,11 @@ CPU_FLAG_LIST += ERRATA_A510_2042739 # present in r0p0 and r0p1 but there is no workaround for those revisions. CPU_FLAG_LIST += ERRATA_A510_2041909 +# Flag to aply erratum 2080326 workaround during reset. This erratum applies +# to revision r0p2 of the Cortex-A510 cpu and is fixed in r0p3. The issue is +# also present in r0p0 and r0p1 but there is no workaround for those revisions. +CPU_FLAG_LIST += ERRATA_A510_2080326 + # Flag to apply erratum 2250311 workaround during reset. This erratum applies # to revisions r0p0, r0p1, r0p2, r0p3 and r1p0, and is fixed in r1p1. CPU_FLAG_LIST += ERRATA_A510_2250311 @@ -799,10 +847,26 @@ CPU_FLAG_LIST += ERRATA_A510_2666669 # Cortex-A510 cpu and is fixed in r1p3. CPU_FLAG_LIST += ERRATA_A510_2684597 +# Flag to apply erratum 2630792 workaround during reset. This erratum applies +# to revisions r0p0, r0p1 of the Cortex-A520 cpu and is still open. +CPU_FLAG_LIST += ERRATA_A520_2630792 + +# Flag to apply erratum 2858100 workaround during reset. This erratum +# applies to revision r0p0 and r0p1 of the Cortex-A520 cpu and is still open. +CPU_FLAG_LIST += ERRATA_A520_2858100 + # Flag to apply erratum 2331132 workaround during reset. This erratum applies # to revisions r0p0, r0p1 and r0p2. It is still open. CPU_FLAG_LIST += ERRATA_V2_2331132 +# Flag to apply erratum 2618597 workaround during reset. This erratum applies +# to revisions r0p0 and r0p1. It is fixed in r0p2. +CPU_FLAG_LIST += ERRATA_V2_2618597 + +# Flag to apply erratum 2662553 workaround during reset. This erratum applies +# to revisions r0p0 and r0p1. It is fixed in r0p2. +CPU_FLAG_LIST += ERRATA_V2_2662553 + # Flag to apply erratum 2719103 workaround for non-arm interconnect ip. This # erratum applies to revisions r0p0, rop1. Fixed in r0p2. CPU_FLAG_LIST += ERRATA_V2_2719103 diff --git a/atf-20231013-0ea67d76a/lib/cpus/errata_report.c b/atf-20240117-bacca82a8/lib/cpus/errata_report.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/cpus/errata_report.c rename to atf-20240117-bacca82a8/lib/cpus/errata_report.c diff --git a/atf-20231013-0ea67d76a/lib/debugfs/blobs.h b/atf-20240117-bacca82a8/lib/debugfs/blobs.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/blobs.h rename to atf-20240117-bacca82a8/lib/debugfs/blobs.h diff --git a/atf-20231013-0ea67d76a/lib/debugfs/debugfs.mk b/atf-20240117-bacca82a8/lib/debugfs/debugfs.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/debugfs.mk rename to atf-20240117-bacca82a8/lib/debugfs/debugfs.mk diff --git a/atf-20231013-0ea67d76a/lib/debugfs/debugfs_smc.c b/atf-20240117-bacca82a8/lib/debugfs/debugfs_smc.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/debugfs_smc.c rename to atf-20240117-bacca82a8/lib/debugfs/debugfs_smc.c diff --git a/atf-20231013-0ea67d76a/lib/debugfs/dev.c b/atf-20240117-bacca82a8/lib/debugfs/dev.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/dev.c rename to atf-20240117-bacca82a8/lib/debugfs/dev.c diff --git a/atf-20231013-0ea67d76a/lib/debugfs/dev.h b/atf-20240117-bacca82a8/lib/debugfs/dev.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/dev.h rename to atf-20240117-bacca82a8/lib/debugfs/dev.h diff --git a/atf-20231013-0ea67d76a/lib/debugfs/devc.c b/atf-20240117-bacca82a8/lib/debugfs/devc.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/devc.c rename to atf-20240117-bacca82a8/lib/debugfs/devc.c diff --git a/atf-20231013-0ea67d76a/lib/debugfs/devfip.c b/atf-20240117-bacca82a8/lib/debugfs/devfip.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/devfip.c rename to atf-20240117-bacca82a8/lib/debugfs/devfip.c diff --git a/atf-20231013-0ea67d76a/lib/debugfs/devroot.c b/atf-20240117-bacca82a8/lib/debugfs/devroot.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/debugfs/devroot.c rename to atf-20240117-bacca82a8/lib/debugfs/devroot.c diff --git a/atf-20231013-0ea67d76a/lib/el3_runtime/aarch32/context_mgmt.c b/atf-20240117-bacca82a8/lib/el3_runtime/aarch32/context_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/el3_runtime/aarch32/context_mgmt.c rename to atf-20240117-bacca82a8/lib/el3_runtime/aarch32/context_mgmt.c diff --git a/atf-20231013-0ea67d76a/lib/el3_runtime/aarch32/cpu_data.S b/atf-20240117-bacca82a8/lib/el3_runtime/aarch32/cpu_data.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/el3_runtime/aarch32/cpu_data.S rename to atf-20240117-bacca82a8/lib/el3_runtime/aarch32/cpu_data.S diff --git a/atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/context.S b/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context.S similarity index 88% rename from atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/context.S rename to atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context.S index 290a93a8a..389c0869a 100644 --- a/atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/context.S +++ b/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context.S @@ -350,6 +350,45 @@ endfunc fpregs_context_restore #endif /* ENABLE_FEAT_DIT */ .endm /* set_unset_pstate_bits */ +/*------------------------------------------------------------------------- + * This macro checks the ENABLE_FEAT_MPAM state, performs ID register + * check to see if the platform supports MPAM extension and restores MPAM3 + * register value if it is FEAT_STATE_ENABLED/FEAT_STATE_CHECKED. + * + * This is particularly more complicated because we can't check + * if the platform supports MPAM by looking for status of a particular bit + * in the MDCR_EL3 or CPTR_EL3 register like other extensions. + * ------------------------------------------------------------------------ + */ + + .macro restore_mpam3_el3 +#if ENABLE_FEAT_MPAM +#if ENABLE_FEAT_MPAM == 2 + + mrs x8, id_aa64pfr0_el1 + lsr x8, x8, #(ID_AA64PFR0_MPAM_SHIFT) + and x8, x8, #(ID_AA64PFR0_MPAM_MASK) + mrs x7, id_aa64pfr1_el1 + lsr x7, x7, #(ID_AA64PFR1_MPAM_FRAC_SHIFT) + and x7, x7, #(ID_AA64PFR1_MPAM_FRAC_MASK) + orr x7, x7, x8 + cbz x7, no_mpam +#endif + /* ----------------------------------------------------------- + * Restore MPAM3_EL3 register as per context state + * Currently we only enable MPAM for NS world and trap to EL3 + * for MPAM access in lower ELs of Secure and Realm world + * x9 holds address of the per_world context + * ----------------------------------------------------------- + */ + + ldr x17, [x9, #CTX_MPAM3_EL3] + msr S3_6_C10_C5_0, x17 /* mpam3_el3 */ + +no_mpam: +#endif + .endm /* restore_mpam3_el3 */ + /* ------------------------------------------------------------------ * The following macro is used to save and restore all the general * purpose and ARMv8.3-PAuth (if enabled) registers. @@ -533,6 +572,25 @@ func save_and_update_ptw_el1_sys_regs ret endfunc save_and_update_ptw_el1_sys_regs +/* ----------------------------------------------------------------- +* The below macro returns the address of the per_world context for +* the security state, retrieved through "get_security_state" macro. +* The per_world context address is returned in the register argument. +* Clobbers: x9, x10 +* ------------------------------------------------------------------ +*/ + +.macro get_per_world_context _reg:req + ldr x10, [sp, #CTX_EL3STATE_OFFSET + CTX_SCR_EL3] + get_security_state x9, x10 + mov_imm x10, (CTX_PERWORLD_EL3STATE_END - CTX_CPTR_EL3) + mul x9, x9, x10 + adrp x10, per_world_context + add x10, x10, :lo12:per_world_context + add x9, x9, x10 + mov \_reg, x9 +.endm + /* ------------------------------------------------------------------ * This routine assumes that the SP_EL3 is pointing to a valid * context structure from where the gp regs and other special @@ -563,7 +621,11 @@ func el3_exit * Synchronization is required before zcr_el3 is addressed. * ---------------------------------------------------------- */ - ldp x19, x20, [sp, #CTX_EL3STATE_OFFSET + CTX_CPTR_EL3] + + /* The address of the per_world context is stored in x9 */ + get_per_world_context x9 + + ldp x19, x20, [x9, #CTX_CPTR_EL3] msr cptr_el3, x19 #if IMAGE_BL31 @@ -573,6 +635,9 @@ func el3_exit isb msr S3_6_C1_C2_0, x20 /* zcr_el3 */ sve_not_enabled: + + restore_mpam3_el3 + #endif /* IMAGE_BL31 */ #if IMAGE_BL31 && DYNAMIC_WORKAROUND_CVE_2018_3639 @@ -586,23 +651,9 @@ sve_not_enabled: 1: #endif /* IMAGE_BL31 && DYNAMIC_WORKAROUND_CVE_2018_3639 */ -/* - * This is a hot path, so we don't want to do some actual FEAT_RAS runtime - * detection here. The "esb" is a cheaper variant, so using "dsb" in the - * ENABLE_FEAT_RAS==2 case is not ideal, but won't hurt. - */ -#if IMAGE_BL31 && ENABLE_FEAT_RAS == 1 - /* ---------------------------------------------------------- - * Issue Error Synchronization Barrier to synchronize SErrors - * before exiting EL3. We're running with EAs unmasked, so - * any synchronized errors would be taken immediately; - * therefore no need to inspect DISR_EL1 register. - * ---------------------------------------------------------- - */ - esb -#else - dsb sy -#endif /* IMAGE_BL31 && ENABLE_FEAT_RAS */ +#if IMAGE_BL31 + synchronize_errors +#endif /* IMAGE_BL31 */ /* ---------------------------------------------------------- * Restore SPSR_EL3, ELR_EL3 and SCR_EL3 prior to ERET @@ -626,7 +677,8 @@ sve_not_enabled: ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] #ifdef IMAGE_BL31 - str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_IS_IN_EL3] + /* Clear the EL3 flag as we are exiting el3 */ + str xzr, [sp, #CTX_EL3STATE_OFFSET + CTX_NESTED_EA_FLAG] #endif /* IMAGE_BL31 */ exception_return diff --git a/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context_debug.c b/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context_debug.c new file mode 100644 index 000000000..9ffa29772 --- /dev/null +++ b/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context_debug.c @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2023, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +#include +#include +#include +#include + +/******************************************************************************** + * Function that returns the corresponding string constant for a security state + * index. + *******************************************************************************/ +static const char *get_context_name_by_idx(unsigned int security_state_idx) +{ + assert(security_state_idx < CPU_CONTEXT_NUM); + static const char * const state_names[] = { + "Secure", + "Non Secure" +#if ENABLE_RME + , "Realm" +#endif /* ENABLE_RME */ + }; + return state_names[security_state_idx]; +} + +#if CTX_INCLUDE_EL2_REGS +#define PRINT_MEM_USAGE_SEPARATOR() \ + do { \ + printf("+-----------+-----------+-----------" \ + "+-----------+-----------+-----------+\n"); \ + } while (false) +#else +#define PRINT_MEM_USAGE_SEPARATOR() \ + do { \ + printf("+-----------+-----------" \ + "+-----------+-----------+-----------+\n"); \ + } while (false) +#endif /* CTX_INCLUDE_EL2_REGS */ + +#define NAME_PLACEHOLDER_LEN 14 + +#define PRINT_DASH(n) \ + for (; n > 0; n--) { \ + putchar('-'); \ + } + +/******************************************************************************** + * This function prints the allocated memory for a specific security state. + * Values are grouped by exception level and core. The memory usage for the + * global context and the total memory for the security state are also computed. + *******************************************************************************/ +static size_t report_allocated_memory(unsigned int security_state_idx) +{ + size_t core_total = 0U; + size_t el3_total = 0U; +#if CTX_INCLUDE_EL2_REGS + size_t el2_total = 0U; +#endif /* CTX_INCLUDE_EL2_REGS */ + size_t el1_total = 0U; + size_t other_total = 0U; + size_t total = 0U; + size_t per_world_ctx_size = 0U; + + PRINT_MEM_USAGE_SEPARATOR(); + printf("| Core | EL3 "); +#if CTX_INCLUDE_EL2_REGS + printf("| EL2 "); +#endif /* CTX_INCLUDE_EL2_REGS */ + printf("| EL1 | Other | Total |\n"); + + /* Compute memory usage for each core's context */ + for (unsigned int i = 0U; i < PLATFORM_CORE_COUNT; i++) { + size_t size_other = 0U; + size_t el3_size = 0U; +#if CTX_INCLUDE_EL2_REGS + size_t el2_size = 0U; +#endif /* CTX_INCLUDE_EL2_REGS */ + size_t el1_size = 0U; + + PRINT_MEM_USAGE_SEPARATOR(); + cpu_context_t *ctx = (cpu_context_t *)cm_get_context_by_index(i, + security_state_idx); + core_total = sizeof(*ctx); + el3_size = sizeof(ctx->el3state_ctx); +#if CTX_INCLUDE_EL2_REGS + el2_size = sizeof(ctx->el2_sysregs_ctx); +#endif /* CTX_INCLUDE_EL2_REGS */ + el1_size = sizeof(ctx->el1_sysregs_ctx); + + size_other = core_total - el3_size - el1_size; + printf("| %9u | %8luB ", i, el3_size); +#if CTX_INCLUDE_EL2_REGS + size_other -= el2_size; + printf("| %8luB ", el2_size); +#endif /* CTX_INCLUDE_EL2_REGS */ + printf("| %8luB | %8luB | %8luB |\n", el1_size, size_other, core_total); + + el3_total += el3_size; +#if CTX_INCLUDE_EL2_REGS + el2_total += el2_size; +#endif /* CTX_INCLUDE_EL2_REGS */ + el1_total += el1_size; + other_total += size_other; + total += core_total; + } + PRINT_MEM_USAGE_SEPARATOR(); + PRINT_MEM_USAGE_SEPARATOR(); + printf("| All | %8luB ", el3_total); +#if CTX_INCLUDE_EL2_REGS + printf("| %8luB ", el2_total); +#endif /* CTX_INCLUDE_EL2_REGS */ + printf("| %8luB | %8luB | %8luB |\n", el1_total, other_total, total); + PRINT_MEM_USAGE_SEPARATOR(); + printf("\n"); + + /* Compute memory usage for the global context */ + per_world_ctx_size = sizeof(per_world_context[security_state_idx]); + + total += per_world_ctx_size; + + printf("Per-world context: %luB\n\n", per_world_ctx_size); + + printf("TOTAL: %luB\n", total); + + return total; +} + +/******************************************************************************** + * Reports the allocated memory for every security state and then reports the + * total system-wide allocated memory. + *******************************************************************************/ +void report_ctx_memory_usage(void) +{ + INFO("Context memory allocation:\n"); + + size_t total = 0U; + + for (unsigned int i = 0U; i < CPU_CONTEXT_NUM; i++) { + const char *context_name = get_context_name_by_idx(i); + size_t len = 0U; + + printf("Memory usage for %s:\n", context_name); + total += report_allocated_memory(i); + printf("------------------------" +#if CTX_INCLUDE_EL2_REGS + "------" +#endif /* CTX_INCLUDE_EL2_REGS */ + ); + len = NAME_PLACEHOLDER_LEN - printf("End %s", context_name); + PRINT_DASH(len); + printf( +#if CTX_INCLUDE_EL2_REGS + "------" +#endif /* CTX_INCLUDE_EL2_REGS */ + "-----------------------\n\n"); + } + + printf("Total context memory allocated: %luB\n\n", total); +} diff --git a/atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/context_mgmt.c b/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context_mgmt.c similarity index 91% rename from atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/context_mgmt.c rename to atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context_mgmt.c index 3a7e50f73..9ba4d098a 100644 --- a/atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/context_mgmt.c +++ b/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/context_mgmt.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -38,8 +39,12 @@ CASSERT(((TWED_DELAY & ~SCR_TWEDEL_MASK) == 0U), assert_twed_delay_value_check); #endif /* ENABLE_FEAT_TWED */ +per_world_context_t per_world_context[CPU_DATA_CONTEXT_NUM]; +static bool has_secure_perworld_init; + static void manage_extensions_nonsecure(cpu_context_t *ctx); static void manage_extensions_secure(cpu_context_t *ctx); +static void manage_extensions_secure_per_world(void); static void setup_el1_context(cpu_context_t *ctx, const struct entry_point_info *ep) { @@ -146,6 +151,18 @@ static void setup_secure_context(cpu_context_t *ctx, const struct entry_point_in #endif manage_extensions_secure(ctx); + + /** + * manage_extensions_secure_per_world api has to be executed once, + * as the registers getting initialised, maintain constant value across + * all the cpus for the secure world. + * Henceforth, this check ensures that the registers are initialised once + * and avoids re-initialization from multiple cores. + */ + if (!has_secure_perworld_init) { + manage_extensions_secure_per_world(); + } + } #if ENABLE_RME @@ -301,7 +318,6 @@ static void setup_ns_context(cpu_context_t *ctx, const struct entry_point_info * ******************************************************************************/ static void setup_context_common(cpu_context_t *ctx, const entry_point_info_t *ep) { - u_register_t cptr_el3; u_register_t scr_el3; el3_state_t *state; gp_regs_t *gp_regs; @@ -424,21 +440,6 @@ static void setup_context_common(cpu_context_t *ctx, const entry_point_info_t *e scr_el3 |= SCR_GCSEn_BIT; } - /* - * Initialise CPTR_EL3, setting all fields rather than relying on hw. - * All fields are architecturally UNKNOWN on reset. - * - * CPTR_EL3.TFP: Set to zero so that accesses to the V- or Z- registers - * by Advanced SIMD, floating-point or SVE instructions (if - * implemented) do not trap to EL3. - * - * CPTR_EL3.TCPAC: Set to zero so that accesses to CPACR_EL1, - * CPTR_EL2,CPACR, or HCPTR do not trap to EL3. - */ - cptr_el3 = CPTR_EL3_RESET_VAL & ~(TFP_BIT | TCPAC_BIT); - - write_ctx_reg(state, CTX_CPTR_EL3, cptr_el3); - /* * SCR_EL3.HCE: Enable HVC instructions if next execution state is * AArch64 and next EL is EL2, or if next execution state is AArch32 and @@ -578,10 +579,6 @@ void cm_manage_extensions_el3(void) sme_init_el3(); } - if (is_feat_mpam_supported()) { - mpam_init_el3(); - } - if (is_feat_trbe_supported()) { trbe_init_el3(); } @@ -598,6 +595,121 @@ void cm_manage_extensions_el3(void) } #endif /* IMAGE_BL31 */ +/****************************************************************************** + * Function to initialise the registers with the RESET values in the context + * memory, which are maintained per world. + ******************************************************************************/ +#if IMAGE_BL31 +void cm_el3_arch_init_per_world(per_world_context_t *per_world_ctx) +{ + /* + * Initialise CPTR_EL3, setting all fields rather than relying on hw. + * + * CPTR_EL3.TFP: Set to zero so that accesses to the V- or Z- registers + * by Advanced SIMD, floating-point or SVE instructions (if + * implemented) do not trap to EL3. + * + * CPTR_EL3.TCPAC: Set to zero so that accesses to CPACR_EL1, + * CPTR_EL2,CPACR, or HCPTR do not trap to EL3. + */ + uint64_t cptr_el3 = CPTR_EL3_RESET_VAL & ~(TCPAC_BIT | TFP_BIT); + + per_world_ctx->ctx_cptr_el3 = cptr_el3; + + /* + * Initialize MPAM3_EL3 to its default reset value + * + * MPAM3_EL3_RESET_VAL sets the MPAM3_EL3.TRAPLOWER bit that forces + * all lower ELn MPAM3_EL3 register access to, trap to EL3 + */ + + per_world_ctx->ctx_mpam3_el3 = MPAM3_EL3_RESET_VAL; +} +#endif /* IMAGE_BL31 */ + +/******************************************************************************* + * Initialise per_world_context for Non-Secure world. + * This function enables the architecture extensions, which have same value + * across the cores for the non-secure world. + ******************************************************************************/ +#if IMAGE_BL31 +void manage_extensions_nonsecure_per_world(void) +{ + cm_el3_arch_init_per_world(&per_world_context[CPU_CONTEXT_NS]); + + if (is_feat_sme_supported()) { + sme_enable_per_world(&per_world_context[CPU_CONTEXT_NS]); + } + + if (is_feat_sve_supported()) { + sve_enable_per_world(&per_world_context[CPU_CONTEXT_NS]); + } + + if (is_feat_amu_supported()) { + amu_enable_per_world(&per_world_context[CPU_CONTEXT_NS]); + } + + if (is_feat_sys_reg_trace_supported()) { + sys_reg_trace_enable_per_world(&per_world_context[CPU_CONTEXT_NS]); + } + + if (is_feat_mpam_supported()) { + mpam_enable_per_world(&per_world_context[CPU_CONTEXT_NS]); + } +} +#endif /* IMAGE_BL31 */ + +/******************************************************************************* + * Initialise per_world_context for Secure world. + * This function enables the architecture extensions, which have same value + * across the cores for the secure world. + ******************************************************************************/ +static void manage_extensions_secure_per_world(void) +{ +#if IMAGE_BL31 + cm_el3_arch_init_per_world(&per_world_context[CPU_CONTEXT_SECURE]); + + if (is_feat_sme_supported()) { + + if (ENABLE_SME_FOR_SWD) { + /* + * Enable SME, SVE, FPU/SIMD in secure context, SPM must ensure + * SME, SVE, and FPU/SIMD context properly managed. + */ + sme_enable_per_world(&per_world_context[CPU_CONTEXT_SECURE]); + } else { + /* + * Disable SME, SVE, FPU/SIMD in secure context so non-secure + * world can safely use the associated registers. + */ + sme_disable_per_world(&per_world_context[CPU_CONTEXT_SECURE]); + } + } + if (is_feat_sve_supported()) { + if (ENABLE_SVE_FOR_SWD) { + /* + * Enable SVE and FPU in secure context, SPM must ensure + * that the SVE and FPU register contexts are properly managed. + */ + sve_enable_per_world(&per_world_context[CPU_CONTEXT_SECURE]); + } else { + /* + * Disable SVE and FPU in secure context so non-secure world + * can safely use them. + */ + sve_disable_per_world(&per_world_context[CPU_CONTEXT_SECURE]); + } + } + + /* NS can access this but Secure shouldn't */ + if (is_feat_sys_reg_trace_supported()) { + sys_reg_trace_disable_per_world(&per_world_context[CPU_CONTEXT_SECURE]); + } + + has_secure_perworld_init = true; +#endif /* IMAGE_BL31 */ +} + /******************************************************************************* * Enable architecture extensions on first entry to Non-secure world. ******************************************************************************/ @@ -608,19 +720,10 @@ static void manage_extensions_nonsecure(cpu_context_t *ctx) amu_enable(ctx); } - /* Enable SVE and FPU/SIMD */ - if (is_feat_sve_supported()) { - sve_enable(ctx); - } - if (is_feat_sme_supported()) { sme_enable(ctx); } - if (is_feat_sys_reg_trace_supported()) { - sys_reg_trace_enable(ctx); - } - pmuv3_enable(ctx); #endif /* IMAGE_BL31 */ } @@ -639,6 +742,7 @@ static __unused void enable_pauth_el2(void) write_hcr_el2(hcr_el2); } +#if INIT_UNUSED_NS_EL2 /******************************************************************************* * Enable architecture extensions in-place at EL2 on first entry to Non-secure * world when EL2 is empty and unused. @@ -685,6 +789,7 @@ static void manage_extensions_nonsecure_el2_unused(void) #endif /* ENABLE_PAUTH */ #endif /* IMAGE_BL31 */ } +#endif /* INIT_UNUSED_NS_EL2 */ /******************************************************************************* * Enable architecture extensions on first entry to Secure world. @@ -692,23 +797,6 @@ static void manage_extensions_nonsecure_el2_unused(void) static void manage_extensions_secure(cpu_context_t *ctx) { #if IMAGE_BL31 - if (is_feat_sve_supported()) { - if (ENABLE_SVE_FOR_SWD) { - /* - * Enable SVE and FPU in secure context, secure manager must - * ensure that the SVE and FPU register contexts are properly - * managed. - */ - sve_enable(ctx); - } else { - /* - * Disable SVE and FPU in secure context so non-secure world - * can safely use them. - */ - sve_disable(ctx); - } - } - if (is_feat_sme_supported()) { if (ENABLE_SME_FOR_SWD) { /* @@ -725,11 +813,6 @@ static void manage_extensions_secure(cpu_context_t *ctx) sme_disable(ctx); } } - - /* NS can access this but Secure shouldn't */ - if (is_feat_sys_reg_trace_supported()) { - sys_reg_trace_disable(ctx); - } #endif /* IMAGE_BL31 */ } @@ -759,8 +842,9 @@ void cm_init_my_context(const entry_point_info_t *ep) } /* EL2 present but unused, need to disable safely. SCTLR_EL2 can be ignored */ -static __unused void init_nonsecure_el2_unused(cpu_context_t *ctx) +static void init_nonsecure_el2_unused(cpu_context_t *ctx) { +#if INIT_UNUSED_NS_EL2 u_register_t hcr_el2 = HCR_RESET_VAL; u_register_t mdcr_el2; u_register_t scr_el3; @@ -859,6 +943,7 @@ static __unused void init_nonsecure_el2_unused(cpu_context_t *ctx) write_cnthp_ctl_el2(CNTHP_CTL_RESET_VAL & ~(CNTHP_CTL_ENABLE_BIT)); manage_extensions_nonsecure_el2_unused(); +#endif /* INIT_UNUSED_NS_EL2 */ } /******************************************************************************* @@ -963,7 +1048,9 @@ static void el2_sysregs_context_restore_fgt(el2_sysregs_t *ctx) write_hfgwtr_el2(read_ctx_reg(ctx, CTX_HFGWTR_EL2)); } -static void el2_sysregs_context_save_mpam(el2_sysregs_t *ctx) +#if CTX_INCLUDE_MPAM_REGS + +static void el2_sysregs_context_save_mpam(mpam_t *ctx) { u_register_t mpam_idr = read_mpamidr_el1(); @@ -1014,7 +1101,10 @@ static void el2_sysregs_context_save_mpam(el2_sysregs_t *ctx) } } -static void el2_sysregs_context_restore_mpam(el2_sysregs_t *ctx) +#endif /* CTX_INCLUDE_MPAM_REGS */ + +#if CTX_INCLUDE_MPAM_REGS +static void el2_sysregs_context_restore_mpam(mpam_t *ctx) { u_register_t mpam_idr = read_mpamidr_el1(); @@ -1052,6 +1142,7 @@ static void el2_sysregs_context_restore_mpam(el2_sysregs_t *ctx) break; } } +#endif /* CTX_INCLUDE_MPAM_REGS */ /* ----------------------------------------------------- * The following registers are not added: @@ -1179,9 +1270,13 @@ void cm_el2_sysregs_context_save(uint32_t security_state) #if CTX_INCLUDE_MTE_REGS write_ctx_reg(el2_sysregs_ctx, CTX_TFSR_EL2, read_tfsr_el2()); #endif + +#if CTX_INCLUDE_MPAM_REGS if (is_feat_mpam_supported()) { - el2_sysregs_context_save_mpam(el2_sysregs_ctx); + mpam_t *mpam_ctx = get_mpam_ctx(ctx); + el2_sysregs_context_save_mpam(mpam_ctx); } +#endif if (is_feat_fgt_supported()) { el2_sysregs_context_save_fgt(el2_sysregs_ctx); @@ -1252,9 +1347,13 @@ void cm_el2_sysregs_context_restore(uint32_t security_state) #if CTX_INCLUDE_MTE_REGS write_tfsr_el2(read_ctx_reg(el2_sysregs_ctx, CTX_TFSR_EL2)); #endif + +#if CTX_INCLUDE_MPAM_REGS if (is_feat_mpam_supported()) { - el2_sysregs_context_restore_mpam(el2_sysregs_ctx); + mpam_t *mpam_ctx = get_mpam_ctx(ctx); + el2_sysregs_context_restore_mpam(mpam_ctx); } +#endif if (is_feat_fgt_supported()) { el2_sysregs_context_restore_fgt(el2_sysregs_ctx); diff --git a/atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/cpu_data.S b/atf-20240117-bacca82a8/lib/el3_runtime/aarch64/cpu_data.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/el3_runtime/aarch64/cpu_data.S rename to atf-20240117-bacca82a8/lib/el3_runtime/aarch64/cpu_data.S diff --git a/atf-20231013-0ea67d76a/lib/el3_runtime/cpu_data_array.c b/atf-20240117-bacca82a8/lib/el3_runtime/cpu_data_array.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/el3_runtime/cpu_data_array.c rename to atf-20240117-bacca82a8/lib/el3_runtime/cpu_data_array.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/amu/aarch32/amu.c b/atf-20240117-bacca82a8/lib/extensions/amu/aarch32/amu.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/amu/aarch32/amu.c rename to atf-20240117-bacca82a8/lib/extensions/amu/aarch32/amu.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/amu/aarch32/amu_helpers.S b/atf-20240117-bacca82a8/lib/extensions/amu/aarch32/amu_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/amu/aarch32/amu_helpers.S rename to atf-20240117-bacca82a8/lib/extensions/amu/aarch32/amu_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/extensions/amu/aarch64/amu.c b/atf-20240117-bacca82a8/lib/extensions/amu/aarch64/amu.c similarity index 98% rename from atf-20231013-0ea67d76a/lib/extensions/amu/aarch64/amu.c rename to atf-20240117-bacca82a8/lib/extensions/amu/aarch64/amu.c index 53bdb5504..cb9a0f26e 100644 --- a/atf-20231013-0ea67d76a/lib/extensions/amu/aarch64/amu.c +++ b/atf-20240117-bacca82a8/lib/extensions/amu/aarch64/amu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -180,15 +180,6 @@ static __unused bool amu_group1_supported(void) */ void amu_enable(cpu_context_t *ctx) { - /* - * Set CPTR_EL3.TAM to zero so that any accesses to the Activity Monitor - * registers do not trap to EL3. - */ - u_register_t cptr_el3 = read_ctx_reg(get_el3state_ctx(ctx), CTX_CPTR_EL3); - - cptr_el3 &= ~TAM_BIT; - write_ctx_reg(get_el3state_ctx(ctx), CTX_CPTR_EL3, cptr_el3); - /* Initialize FEAT_AMUv1p1 features if present. */ if (is_feat_amuv1p1_supported()) { /* @@ -199,6 +190,18 @@ void amu_enable(cpu_context_t *ctx) } } +void amu_enable_per_world(per_world_context_t *per_world_ctx) +{ + /* + * Set CPTR_EL3.TAM to zero so that any accesses to the Activity Monitor + * registers do not trap to EL3. + */ + uint64_t cptr_el3 = per_world_ctx->ctx_cptr_el3; + + cptr_el3 &= ~TAM_BIT; + per_world_ctx->ctx_cptr_el3 = cptr_el3; +} + void amu_init_el3(void) { uint64_t group0_impl_ctr = read_amcgcr_el0_cg0nc(); diff --git a/atf-20231013-0ea67d76a/lib/extensions/amu/aarch64/amu_helpers.S b/atf-20240117-bacca82a8/lib/extensions/amu/aarch64/amu_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/amu/aarch64/amu_helpers.S rename to atf-20240117-bacca82a8/lib/extensions/amu/aarch64/amu_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/extensions/amu/amu.mk b/atf-20240117-bacca82a8/lib/extensions/amu/amu.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/amu/amu.mk rename to atf-20240117-bacca82a8/lib/extensions/amu/amu.mk diff --git a/atf-20231013-0ea67d76a/lib/extensions/amu/amu_private.h b/atf-20240117-bacca82a8/lib/extensions/amu/amu_private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/amu/amu_private.h rename to atf-20240117-bacca82a8/lib/extensions/amu/amu_private.h diff --git a/atf-20231013-0ea67d76a/lib/extensions/brbe/brbe.c b/atf-20240117-bacca82a8/lib/extensions/brbe/brbe.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/brbe/brbe.c rename to atf-20240117-bacca82a8/lib/extensions/brbe/brbe.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/mpam/mpam.c b/atf-20240117-bacca82a8/lib/extensions/mpam/mpam.c similarity index 68% rename from atf-20231013-0ea67d76a/lib/extensions/mpam/mpam.c rename to atf-20240117-bacca82a8/lib/extensions/mpam/mpam.c index 6462c9748..5285b96de 100644 --- a/atf-20231013-0ea67d76a/lib/extensions/mpam/mpam.c +++ b/atf-20240117-bacca82a8/lib/extensions/mpam/mpam.c @@ -11,14 +11,19 @@ #include #include -void mpam_init_el3(void) +void mpam_enable_per_world(per_world_context_t *per_world_ctx) { + u_register_t mpam3_el3; + /* * Enable MPAM, and disable trapping to EL3 when lower ELs access their - * own MPAM registers. + * own MPAM registers */ - write_mpam3_el3(MPAM3_EL3_MPAMEN_BIT); + mpam3_el3 = per_world_ctx->ctx_mpam3_el3; + mpam3_el3 = (mpam3_el3 | MPAM3_EL3_MPAMEN_BIT) & + ~(MPAM3_EL3_TRAPLOWER_BIT); + per_world_ctx->ctx_mpam3_el3 = mpam3_el3; } /* diff --git a/atf-20231013-0ea67d76a/lib/extensions/pauth/pauth_helpers.S b/atf-20240117-bacca82a8/lib/extensions/pauth/pauth_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/pauth/pauth_helpers.S rename to atf-20240117-bacca82a8/lib/extensions/pauth/pauth_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/extensions/pmuv3/aarch32/pmuv3.c b/atf-20240117-bacca82a8/lib/extensions/pmuv3/aarch32/pmuv3.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/pmuv3/aarch32/pmuv3.c rename to atf-20240117-bacca82a8/lib/extensions/pmuv3/aarch32/pmuv3.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/pmuv3/aarch64/pmuv3.c b/atf-20240117-bacca82a8/lib/extensions/pmuv3/aarch64/pmuv3.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/pmuv3/aarch64/pmuv3.c rename to atf-20240117-bacca82a8/lib/extensions/pmuv3/aarch64/pmuv3.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/ras/ras_common.c b/atf-20240117-bacca82a8/lib/extensions/ras/ras_common.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/ras/ras_common.c rename to atf-20240117-bacca82a8/lib/extensions/ras/ras_common.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/ras/std_err_record.c b/atf-20240117-bacca82a8/lib/extensions/ras/std_err_record.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/ras/std_err_record.c rename to atf-20240117-bacca82a8/lib/extensions/ras/std_err_record.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/sme/sme.c b/atf-20240117-bacca82a8/lib/extensions/sme/sme.c similarity index 88% rename from atf-20231013-0ea67d76a/lib/extensions/sme/sme.c rename to atf-20240117-bacca82a8/lib/extensions/sme/sme.c index d705b64ba..b1409b95d 100644 --- a/atf-20231013-0ea67d76a/lib/extensions/sme/sme.c +++ b/atf-20240117-bacca82a8/lib/extensions/sme/sme.c @@ -22,17 +22,22 @@ void sme_enable(cpu_context_t *context) /* Get the context state. */ state = get_el3state_ctx(context); - /* Enable SME in CPTR_EL3. */ - reg = read_ctx_reg(state, CTX_CPTR_EL3); - reg |= ESM_BIT; - write_ctx_reg(state, CTX_CPTR_EL3, reg); - /* Set the ENTP2 bit in SCR_EL3 to enable access to TPIDR2_EL0. */ reg = read_ctx_reg(state, CTX_SCR_EL3); reg |= SCR_ENTP2_BIT; write_ctx_reg(state, CTX_SCR_EL3, reg); } +void sme_enable_per_world(per_world_context_t *per_world_ctx) +{ + u_register_t reg; + + /* Enable SME in CPTR_EL3. */ + reg = per_world_ctx->ctx_cptr_el3; + reg |= ESM_BIT; + per_world_ctx->ctx_cptr_el3 = reg; +} + void sme_init_el3(void) { u_register_t cptr_el3 = read_cptr_el3(); @@ -43,7 +48,7 @@ void sme_init_el3(void) isb(); /* - * Set the max LEN value and FA64 bit. This register is set up globally + * Set the max LEN value and FA64 bit. This register is set up per_world * to be the least restrictive, then lower ELs can restrict as needed * using SMCR_EL2 and SMCR_EL1. */ @@ -87,15 +92,20 @@ void sme_disable(cpu_context_t *context) /* Get the context state. */ state = get_el3state_ctx(context); - /* Disable SME, SVE, and FPU since they all share registers. */ - reg = read_ctx_reg(state, CTX_CPTR_EL3); - reg &= ~ESM_BIT; /* Trap SME */ - reg &= ~CPTR_EZ_BIT; /* Trap SVE */ - reg |= TFP_BIT; /* Trap FPU/SIMD */ - write_ctx_reg(state, CTX_CPTR_EL3, reg); - /* Disable access to TPIDR2_EL0. */ reg = read_ctx_reg(state, CTX_SCR_EL3); reg &= ~SCR_ENTP2_BIT; write_ctx_reg(state, CTX_SCR_EL3, reg); } + +void sme_disable_per_world(per_world_context_t *per_world_ctx) +{ + u_register_t reg; + + /* Disable SME, SVE, and FPU since they all share registers. */ + reg = per_world_ctx->ctx_cptr_el3; + reg &= ~ESM_BIT; /* Trap SME */ + reg &= ~CPTR_EZ_BIT; /* Trap SVE */ + reg |= TFP_BIT; /* Trap FPU/SIMD */ + per_world_ctx->ctx_cptr_el3 = reg; +} diff --git a/atf-20231013-0ea67d76a/lib/extensions/spe/spe.c b/atf-20240117-bacca82a8/lib/extensions/spe/spe.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/spe/spe.c rename to atf-20240117-bacca82a8/lib/extensions/spe/spe.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/sve/sve.c b/atf-20240117-bacca82a8/lib/extensions/sve/sve.c similarity index 68% rename from atf-20231013-0ea67d76a/lib/extensions/sve/sve.c rename to atf-20240117-bacca82a8/lib/extensions/sve/sve.c index eb4ac8d73..143717e33 100644 --- a/atf-20231013-0ea67d76a/lib/extensions/sve/sve.c +++ b/atf-20240117-bacca82a8/lib/extensions/sve/sve.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -22,19 +22,17 @@ CASSERT((SVE_VECTOR_LEN % 128) == 0, assert_sve_vl_granule); */ #define CONVERT_SVE_LENGTH(x) (((x / 128) - 1)) -void sve_enable(cpu_context_t *context) +void sve_enable_per_world(per_world_context_t *per_world_ctx) { u_register_t cptr_el3; - cptr_el3 = read_ctx_reg(get_el3state_ctx(context), CTX_CPTR_EL3); - /* Enable access to SVE functionality for all ELs. */ + cptr_el3 = per_world_ctx->ctx_cptr_el3; cptr_el3 = (cptr_el3 | CPTR_EZ_BIT) & ~(TFP_BIT); - write_ctx_reg(get_el3state_ctx(context), CTX_CPTR_EL3, cptr_el3); + per_world_ctx->ctx_cptr_el3 = cptr_el3; /* Restrict maximum SVE vector length (SVE_VECTOR_LEN+1) * 128. */ - write_ctx_reg(get_el3state_ctx(context), CTX_ZCR_EL3, - (ZCR_EL3_LEN_MASK & CONVERT_SVE_LENGTH(SVE_VECTOR_LEN))); + per_world_ctx->ctx_zcr_el3 = (ZCR_EL3_LEN_MASK & CONVERT_SVE_LENGTH(SVE_VECTOR_LEN)); } void sve_init_el2_unused(void) @@ -47,17 +45,13 @@ void sve_init_el2_unused(void) write_cptr_el2(read_cptr_el2() & ~CPTR_EL2_TFP_BIT); } -void sve_disable(cpu_context_t *context) +void sve_disable_per_world(per_world_context_t *per_world_ctx) { u_register_t reg; - el3_state_t *state; - - /* Get the context state. */ - state = get_el3state_ctx(context); /* Disable SVE and FPU since they share registers. */ - reg = read_ctx_reg(state, CTX_CPTR_EL3); + reg = per_world_ctx->ctx_cptr_el3; reg &= ~CPTR_EZ_BIT; /* Trap SVE */ reg |= TFP_BIT; /* Trap FPU/SIMD */ - write_ctx_reg(state, CTX_CPTR_EL3, reg); + per_world_ctx->ctx_cptr_el3 = reg; } diff --git a/atf-20231013-0ea67d76a/lib/extensions/sys_reg_trace/aarch32/sys_reg_trace.c b/atf-20240117-bacca82a8/lib/extensions/sys_reg_trace/aarch32/sys_reg_trace.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/sys_reg_trace/aarch32/sys_reg_trace.c rename to atf-20240117-bacca82a8/lib/extensions/sys_reg_trace/aarch32/sys_reg_trace.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/sys_reg_trace/aarch64/sys_reg_trace.c b/atf-20240117-bacca82a8/lib/extensions/sys_reg_trace/aarch64/sys_reg_trace.c similarity index 73% rename from atf-20231013-0ea67d76a/lib/extensions/sys_reg_trace/aarch64/sys_reg_trace.c rename to atf-20240117-bacca82a8/lib/extensions/sys_reg_trace/aarch64/sys_reg_trace.c index 134956689..2170763a8 100644 --- a/atf-20231013-0ea67d76a/lib/extensions/sys_reg_trace/aarch64/sys_reg_trace.c +++ b/atf-20240117-bacca82a8/lib/extensions/sys_reg_trace/aarch64/sys_reg_trace.c @@ -10,29 +10,27 @@ #include #include -void sys_reg_trace_enable(cpu_context_t *ctx) +void sys_reg_trace_enable_per_world(per_world_context_t *per_world_ctx) { /* * CPTR_EL3.TTA: Set to zero so that System register accesses to the * trace registers do not trap to EL3. */ - uint64_t val = read_ctx_reg(get_el3state_ctx(ctx), CTX_CPTR_EL3); - + uint64_t val = per_world_ctx->ctx_cptr_el3; val &= ~(TTA_BIT); - write_ctx_reg(get_el3state_ctx(ctx), CTX_CPTR_EL3, val); + per_world_ctx->ctx_cptr_el3 = val; } -void sys_reg_trace_disable(cpu_context_t *ctx) +void sys_reg_trace_disable_per_world(per_world_context_t *per_world_ctx) { /* * CPTR_EL3.TTA: Set to one so that System register accesses to the * trace registers trap to EL3, unless it is trapped by CPACR.TRCDIS, * CPACR_EL1.TTA, or CPTR_EL2.TTA */ - uint64_t val = read_ctx_reg(get_el3state_ctx(ctx), CTX_CPTR_EL3); - + uint64_t val = per_world_ctx->ctx_cptr_el3; val |= TTA_BIT; - write_ctx_reg(get_el3state_ctx(ctx), CTX_CPTR_EL3, val); + per_world_ctx->ctx_cptr_el3 = val; } void sys_reg_trace_init_el2_unused(void) diff --git a/atf-20231013-0ea67d76a/lib/extensions/trbe/trbe.c b/atf-20240117-bacca82a8/lib/extensions/trbe/trbe.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/trbe/trbe.c rename to atf-20240117-bacca82a8/lib/extensions/trbe/trbe.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/trf/aarch32/trf.c b/atf-20240117-bacca82a8/lib/extensions/trf/aarch32/trf.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/trf/aarch32/trf.c rename to atf-20240117-bacca82a8/lib/extensions/trf/aarch32/trf.c diff --git a/atf-20231013-0ea67d76a/lib/extensions/trf/aarch64/trf.c b/atf-20240117-bacca82a8/lib/extensions/trf/aarch64/trf.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/extensions/trf/aarch64/trf.c rename to atf-20240117-bacca82a8/lib/extensions/trf/aarch64/trf.c diff --git a/atf-20231013-0ea67d76a/lib/fconf/fconf.c b/atf-20240117-bacca82a8/lib/fconf/fconf.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/fconf/fconf.c rename to atf-20240117-bacca82a8/lib/fconf/fconf.c diff --git a/atf-20231013-0ea67d76a/lib/fconf/fconf.mk b/atf-20240117-bacca82a8/lib/fconf/fconf.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/fconf/fconf.mk rename to atf-20240117-bacca82a8/lib/fconf/fconf.mk diff --git a/atf-20231013-0ea67d76a/lib/fconf/fconf_amu_getter.c b/atf-20240117-bacca82a8/lib/fconf/fconf_amu_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/fconf/fconf_amu_getter.c rename to atf-20240117-bacca82a8/lib/fconf/fconf_amu_getter.c diff --git a/atf-20231013-0ea67d76a/lib/fconf/fconf_cot_getter.c b/atf-20240117-bacca82a8/lib/fconf/fconf_cot_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/fconf/fconf_cot_getter.c rename to atf-20240117-bacca82a8/lib/fconf/fconf_cot_getter.c diff --git a/atf-20231013-0ea67d76a/lib/fconf/fconf_dyn_cfg_getter.c b/atf-20240117-bacca82a8/lib/fconf/fconf_dyn_cfg_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/fconf/fconf_dyn_cfg_getter.c rename to atf-20240117-bacca82a8/lib/fconf/fconf_dyn_cfg_getter.c diff --git a/atf-20231013-0ea67d76a/lib/fconf/fconf_mpmm_getter.c b/atf-20240117-bacca82a8/lib/fconf/fconf_mpmm_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/fconf/fconf_mpmm_getter.c rename to atf-20240117-bacca82a8/lib/fconf/fconf_mpmm_getter.c diff --git a/atf-20231013-0ea67d76a/lib/fconf/fconf_tbbr_getter.c b/atf-20240117-bacca82a8/lib/fconf/fconf_tbbr_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/fconf/fconf_tbbr_getter.c rename to atf-20240117-bacca82a8/lib/fconf/fconf_tbbr_getter.c diff --git a/atf-20231013-0ea67d76a/lib/gpt_rme/gpt_rme.c b/atf-20240117-bacca82a8/lib/gpt_rme/gpt_rme.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/gpt_rme/gpt_rme.c rename to atf-20240117-bacca82a8/lib/gpt_rme/gpt_rme.c diff --git a/atf-20231013-0ea67d76a/lib/gpt_rme/gpt_rme.mk b/atf-20240117-bacca82a8/lib/gpt_rme/gpt_rme.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/gpt_rme/gpt_rme.mk rename to atf-20240117-bacca82a8/lib/gpt_rme/gpt_rme.mk diff --git a/atf-20231013-0ea67d76a/lib/gpt_rme/gpt_rme_private.h b/atf-20240117-bacca82a8/lib/gpt_rme/gpt_rme_private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/gpt_rme/gpt_rme_private.h rename to atf-20240117-bacca82a8/lib/gpt_rme/gpt_rme_private.h diff --git a/atf-20231013-0ea67d76a/lib/libc/aarch32/memset.S b/atf-20240117-bacca82a8/lib/libc/aarch32/memset.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/aarch32/memset.S rename to atf-20240117-bacca82a8/lib/libc/aarch32/memset.S diff --git a/atf-20231013-0ea67d76a/lib/libc/aarch64/memset.S b/atf-20240117-bacca82a8/lib/libc/aarch64/memset.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/aarch64/memset.S rename to atf-20240117-bacca82a8/lib/libc/aarch64/memset.S diff --git a/atf-20231013-0ea67d76a/lib/libc/aarch64/setjmp.S b/atf-20240117-bacca82a8/lib/libc/aarch64/setjmp.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/aarch64/setjmp.S rename to atf-20240117-bacca82a8/lib/libc/aarch64/setjmp.S diff --git a/atf-20231013-0ea67d76a/lib/libc/abort.c b/atf-20240117-bacca82a8/lib/libc/abort.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/abort.c rename to atf-20240117-bacca82a8/lib/libc/abort.c diff --git a/atf-20231013-0ea67d76a/lib/libc/assert.c b/atf-20240117-bacca82a8/lib/libc/assert.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/assert.c rename to atf-20240117-bacca82a8/lib/libc/assert.c diff --git a/atf-20231013-0ea67d76a/lib/libc/exit.c b/atf-20240117-bacca82a8/lib/libc/exit.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/exit.c rename to atf-20240117-bacca82a8/lib/libc/exit.c diff --git a/atf-20231013-0ea67d76a/lib/libc/libc.mk b/atf-20240117-bacca82a8/lib/libc/libc.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/libc.mk rename to atf-20240117-bacca82a8/lib/libc/libc.mk diff --git a/atf-20231013-0ea67d76a/lib/libc/libc_asm.mk b/atf-20240117-bacca82a8/lib/libc/libc_asm.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/libc_asm.mk rename to atf-20240117-bacca82a8/lib/libc/libc_asm.mk diff --git a/atf-20231013-0ea67d76a/lib/libc/memchr.c b/atf-20240117-bacca82a8/lib/libc/memchr.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/memchr.c rename to atf-20240117-bacca82a8/lib/libc/memchr.c diff --git a/atf-20231013-0ea67d76a/lib/libc/memcmp.c b/atf-20240117-bacca82a8/lib/libc/memcmp.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/memcmp.c rename to atf-20240117-bacca82a8/lib/libc/memcmp.c diff --git a/atf-20231013-0ea67d76a/lib/libc/memcpy.c b/atf-20240117-bacca82a8/lib/libc/memcpy.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/memcpy.c rename to atf-20240117-bacca82a8/lib/libc/memcpy.c diff --git a/atf-20231013-0ea67d76a/lib/libc/memcpy_s.c b/atf-20240117-bacca82a8/lib/libc/memcpy_s.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/memcpy_s.c rename to atf-20240117-bacca82a8/lib/libc/memcpy_s.c diff --git a/atf-20231013-0ea67d76a/lib/libc/memmove.c b/atf-20240117-bacca82a8/lib/libc/memmove.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/memmove.c rename to atf-20240117-bacca82a8/lib/libc/memmove.c diff --git a/atf-20231013-0ea67d76a/lib/libc/memrchr.c b/atf-20240117-bacca82a8/lib/libc/memrchr.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/memrchr.c rename to atf-20240117-bacca82a8/lib/libc/memrchr.c diff --git a/atf-20231013-0ea67d76a/lib/libc/memset.c b/atf-20240117-bacca82a8/lib/libc/memset.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/memset.c rename to atf-20240117-bacca82a8/lib/libc/memset.c diff --git a/atf-20231013-0ea67d76a/lib/libc/printf.c b/atf-20240117-bacca82a8/lib/libc/printf.c similarity index 92% rename from atf-20231013-0ea67d76a/lib/libc/printf.c rename to atf-20240117-bacca82a8/lib/libc/printf.c index 6931a7ea1..a85634562 100644 --- a/atf-20231013-0ea67d76a/lib/libc/printf.c +++ b/atf-20240117-bacca82a8/lib/libc/printf.c @@ -95,6 +95,7 @@ static int unsigned_num_print(unsigned long long int unum, unsigned int radix, * * The following padding specifiers are supported by this print * %0NN - Left-pad the number with 0s (NN is a decimal number) + * %NN - Left-pad the number with spaces (NN is a decimal number) * * The print exits on all other formats specifiers other than valid * combinations of the above specifiers. @@ -182,6 +183,27 @@ loop: padn = 0; fmt++; + for (;;) { + char ch = *fmt; + if ((ch < '0') || (ch > '9')) { + goto loop; + } + padn = (padn * 10) + (ch - '0'); + fmt++; + } + assert(0); /* Unreachable */ + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + padc = ' '; + padn = 0; + for (;;) { char ch = *fmt; if ((ch < '0') || (ch > '9')) { diff --git a/atf-20231013-0ea67d76a/lib/libc/putchar.c b/atf-20240117-bacca82a8/lib/libc/putchar.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/putchar.c rename to atf-20240117-bacca82a8/lib/libc/putchar.c diff --git a/atf-20231013-0ea67d76a/lib/libc/puts.c b/atf-20240117-bacca82a8/lib/libc/puts.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/puts.c rename to atf-20240117-bacca82a8/lib/libc/puts.c diff --git a/atf-20231013-0ea67d76a/lib/libc/snprintf.c b/atf-20240117-bacca82a8/lib/libc/snprintf.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/snprintf.c rename to atf-20240117-bacca82a8/lib/libc/snprintf.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strchr.c b/atf-20240117-bacca82a8/lib/libc/strchr.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strchr.c rename to atf-20240117-bacca82a8/lib/libc/strchr.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strcmp.c b/atf-20240117-bacca82a8/lib/libc/strcmp.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strcmp.c rename to atf-20240117-bacca82a8/lib/libc/strcmp.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strlcat.c b/atf-20240117-bacca82a8/lib/libc/strlcat.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strlcat.c rename to atf-20240117-bacca82a8/lib/libc/strlcat.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strlcpy.c b/atf-20240117-bacca82a8/lib/libc/strlcpy.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strlcpy.c rename to atf-20240117-bacca82a8/lib/libc/strlcpy.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strlen.c b/atf-20240117-bacca82a8/lib/libc/strlen.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strlen.c rename to atf-20240117-bacca82a8/lib/libc/strlen.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strncmp.c b/atf-20240117-bacca82a8/lib/libc/strncmp.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strncmp.c rename to atf-20240117-bacca82a8/lib/libc/strncmp.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strnlen.c b/atf-20240117-bacca82a8/lib/libc/strnlen.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strnlen.c rename to atf-20240117-bacca82a8/lib/libc/strnlen.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strrchr.c b/atf-20240117-bacca82a8/lib/libc/strrchr.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strrchr.c rename to atf-20240117-bacca82a8/lib/libc/strrchr.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strtok.c b/atf-20240117-bacca82a8/lib/libc/strtok.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strtok.c rename to atf-20240117-bacca82a8/lib/libc/strtok.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strtol.c b/atf-20240117-bacca82a8/lib/libc/strtol.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strtol.c rename to atf-20240117-bacca82a8/lib/libc/strtol.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strtoll.c b/atf-20240117-bacca82a8/lib/libc/strtoll.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strtoll.c rename to atf-20240117-bacca82a8/lib/libc/strtoll.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strtoul.c b/atf-20240117-bacca82a8/lib/libc/strtoul.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strtoul.c rename to atf-20240117-bacca82a8/lib/libc/strtoul.c diff --git a/atf-20231013-0ea67d76a/lib/libc/strtoull.c b/atf-20240117-bacca82a8/lib/libc/strtoull.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libc/strtoull.c rename to atf-20240117-bacca82a8/lib/libc/strtoull.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt.c b/atf-20240117-bacca82a8/lib/libfdt/fdt.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_addresses.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_addresses.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_addresses.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_addresses.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_empty_tree.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_empty_tree.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_empty_tree.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_empty_tree.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_overlay.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_overlay.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_overlay.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_overlay.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_ro.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_ro.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_ro.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_ro.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_rw.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_rw.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_rw.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_rw.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_strerror.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_strerror.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_strerror.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_strerror.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_sw.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_sw.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_sw.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_sw.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/fdt_wip.c b/atf-20240117-bacca82a8/lib/libfdt/fdt_wip.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/fdt_wip.c rename to atf-20240117-bacca82a8/lib/libfdt/fdt_wip.c diff --git a/atf-20231013-0ea67d76a/lib/libfdt/libfdt.mk b/atf-20240117-bacca82a8/lib/libfdt/libfdt.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/libfdt.mk rename to atf-20240117-bacca82a8/lib/libfdt/libfdt.mk diff --git a/atf-20231013-0ea67d76a/lib/libfdt/libfdt_internal.h b/atf-20240117-bacca82a8/lib/libfdt/libfdt_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/libfdt/libfdt_internal.h rename to atf-20240117-bacca82a8/lib/libfdt/libfdt_internal.h diff --git a/atf-20231013-0ea67d76a/lib/locks/bakery/bakery_lock_coherent.c b/atf-20240117-bacca82a8/lib/locks/bakery/bakery_lock_coherent.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/locks/bakery/bakery_lock_coherent.c rename to atf-20240117-bacca82a8/lib/locks/bakery/bakery_lock_coherent.c diff --git a/atf-20231013-0ea67d76a/lib/locks/bakery/bakery_lock_normal.c b/atf-20240117-bacca82a8/lib/locks/bakery/bakery_lock_normal.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/locks/bakery/bakery_lock_normal.c rename to atf-20240117-bacca82a8/lib/locks/bakery/bakery_lock_normal.c diff --git a/atf-20231013-0ea67d76a/lib/locks/exclusive/aarch32/spinlock.S b/atf-20240117-bacca82a8/lib/locks/exclusive/aarch32/spinlock.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/locks/exclusive/aarch32/spinlock.S rename to atf-20240117-bacca82a8/lib/locks/exclusive/aarch32/spinlock.S diff --git a/atf-20231013-0ea67d76a/lib/locks/exclusive/aarch64/spinlock.S b/atf-20240117-bacca82a8/lib/locks/exclusive/aarch64/spinlock.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/locks/exclusive/aarch64/spinlock.S rename to atf-20240117-bacca82a8/lib/locks/exclusive/aarch64/spinlock.S diff --git a/atf-20231013-0ea67d76a/lib/mpmm/mpmm.c b/atf-20240117-bacca82a8/lib/mpmm/mpmm.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/mpmm/mpmm.c rename to atf-20240117-bacca82a8/lib/mpmm/mpmm.c diff --git a/atf-20231013-0ea67d76a/lib/mpmm/mpmm.mk b/atf-20240117-bacca82a8/lib/mpmm/mpmm.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/mpmm/mpmm.mk rename to atf-20240117-bacca82a8/lib/mpmm/mpmm.mk diff --git a/atf-20231013-0ea67d76a/lib/nmbm/nmbm-core.c b/atf-20240117-bacca82a8/lib/nmbm/nmbm-core.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/nmbm/nmbm-core.c rename to atf-20240117-bacca82a8/lib/nmbm/nmbm-core.c diff --git a/atf-20231013-0ea67d76a/lib/nmbm/nmbm-debug.h b/atf-20240117-bacca82a8/lib/nmbm/nmbm-debug.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/nmbm/nmbm-debug.h rename to atf-20240117-bacca82a8/lib/nmbm/nmbm-debug.h diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/footer.hbs b/atf-20240117-bacca82a8/lib/nmbm/nmbm-debug.inl similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/footer.hbs rename to atf-20240117-bacca82a8/lib/nmbm/nmbm-debug.inl diff --git a/atf-20231013-0ea67d76a/lib/nmbm/nmbm-libs.c b/atf-20240117-bacca82a8/lib/nmbm/nmbm-libs.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/nmbm/nmbm-libs.c rename to atf-20240117-bacca82a8/lib/nmbm/nmbm-libs.c diff --git a/atf-20231013-0ea67d76a/lib/nmbm/nmbm-private.h b/atf-20240117-bacca82a8/lib/nmbm/nmbm-private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/nmbm/nmbm-private.h rename to atf-20240117-bacca82a8/lib/nmbm/nmbm-private.h diff --git a/atf-20231013-0ea67d76a/lib/nmbm/nmbm.mk b/atf-20240117-bacca82a8/lib/nmbm/nmbm.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/nmbm/nmbm.mk rename to atf-20240117-bacca82a8/lib/nmbm/nmbm.mk diff --git a/atf-20231013-0ea67d76a/lib/optee/optee_utils.c b/atf-20240117-bacca82a8/lib/optee/optee_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/optee/optee_utils.c rename to atf-20240117-bacca82a8/lib/optee/optee_utils.c diff --git a/atf-20231013-0ea67d76a/lib/pmf/pmf_main.c b/atf-20240117-bacca82a8/lib/pmf/pmf_main.c similarity index 99% rename from atf-20231013-0ea67d76a/lib/pmf/pmf_main.c rename to atf-20240117-bacca82a8/lib/pmf/pmf_main.c index bf0ad8388..b33f49c82 100644 --- a/atf-20231013-0ea67d76a/lib/pmf/pmf_main.c +++ b/atf-20240117-bacca82a8/lib/pmf/pmf_main.c @@ -165,7 +165,7 @@ int pmf_get_timestamp_smc(unsigned int tid, /* Search for registered service. */ svc_desc = get_service(tid); - if ((svc_desc == NULL) || (plat_core_pos_by_mpidr(mpidr) < 0)) { + if (svc_desc == NULL) { *ts_value = 0; return -EINVAL; } else { diff --git a/atf-20231013-0ea67d76a/lib/pmf/pmf_smc.c b/atf-20240117-bacca82a8/lib/pmf/pmf_smc.c similarity index 93% rename from atf-20231013-0ea67d76a/lib/pmf/pmf_smc.c rename to atf-20240117-bacca82a8/lib/pmf/pmf_smc.c index 71486dfcb..f3dd11276 100644 --- a/atf-20231013-0ea67d76a/lib/pmf/pmf_smc.c +++ b/atf-20240117-bacca82a8/lib/pmf/pmf_smc.c @@ -26,6 +26,10 @@ uintptr_t pmf_smc_handler(unsigned int smc_fid, int rc; unsigned long long ts_value; + /* Determine if the cpu exists of not */ + if (!is_valid_mpidr(x2)) + return PSCI_E_INVALID_PARAMS; + if (((smc_fid >> FUNCID_CC_SHIFT) & FUNCID_CC_MASK) == SMC_32) { x1 = (uint32_t)x1; diff --git a/atf-20240117-bacca82a8/lib/psa/delegated_attestation.c b/atf-20240117-bacca82a8/lib/psa/delegated_attestation.c new file mode 100644 index 000000000..81e26215f --- /dev/null +++ b/atf-20240117-bacca82a8/lib/psa/delegated_attestation.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2022-2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + */ + +#include +#include +#include + +psa_status_t +rss_delegated_attest_get_delegated_key(uint8_t ecc_curve, + uint32_t key_bits, + uint8_t *key_buf, + size_t key_buf_size, + size_t *key_size, + uint32_t hash_algo) +{ + psa_status_t status; + psa_invec in_vec[] = { + {&ecc_curve, sizeof(ecc_curve)}, + {&key_bits, sizeof(key_bits)}, + {&hash_algo, sizeof(hash_algo)} + }; + psa_outvec out_vec[] = { + {key_buf, key_buf_size} + }; + + if (key_size == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + status = psa_call(RSS_DELEGATED_SERVICE_HANDLE, + RSS_DELEGATED_ATTEST_GET_DELEGATED_KEY, + in_vec, IOVEC_LEN(in_vec), + out_vec, IOVEC_LEN(out_vec)); + if (status == PSA_SUCCESS) { + *key_size = out_vec[0].len; + } + + return status; +} + +psa_status_t +rss_delegated_attest_get_token(const uint8_t *dak_pub_hash, + size_t dak_pub_hash_size, + uint8_t *token_buf, + size_t token_buf_size, + size_t *token_size) +{ + psa_status_t status; + psa_invec in_vec[] = { + {dak_pub_hash, dak_pub_hash_size} + }; + psa_outvec out_vec[] = { + {token_buf, token_buf_size} + }; + + if (token_size == NULL) { + return PSA_ERROR_INVALID_ARGUMENT; + } + + status = psa_call(RSS_DELEGATED_SERVICE_HANDLE, + RSS_DELEGATED_ATTEST_GET_PLATFORM_TOKEN, + in_vec, IOVEC_LEN(in_vec), + out_vec, IOVEC_LEN(out_vec)); + if (status == PSA_SUCCESS) { + *token_size = out_vec[0].len; + } + + return status; +} diff --git a/atf-20231013-0ea67d76a/lib/psa/measured_boot.c b/atf-20240117-bacca82a8/lib/psa/measured_boot.c similarity index 79% rename from atf-20231013-0ea67d76a/lib/psa/measured_boot.c rename to atf-20240117-bacca82a8/lib/psa/measured_boot.c index c359e9f85..38990b57a 100644 --- a/atf-20231013-0ea67d76a/lib/psa/measured_boot.c +++ b/atf-20240117-bacca82a8/lib/psa/measured_boot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Arm Limited. All rights reserved. + * Copyright (c) 2022-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * @@ -61,7 +61,6 @@ static void log_measurement(uint8_t index, INFO(" - locking : %s\n", lock_measurement ? "true" : "false"); } -#if !PLAT_RSS_NOT_SUPPORTED psa_status_t rss_measured_boot_extend_measurement(uint8_t index, const uint8_t *signer_id, @@ -175,47 +174,3 @@ psa_status_t rss_measured_boot_read_measurement(uint8_t index, return status; } - -#else /* !PLAT_RSS_NOT_SUPPORTED */ - -psa_status_t -rss_measured_boot_extend_measurement(uint8_t index, - const uint8_t *signer_id, - size_t signer_id_size, - const uint8_t *version, - size_t version_size, - uint32_t measurement_algo, - const uint8_t *sw_type, - size_t sw_type_size, - const uint8_t *measurement_value, - size_t measurement_value_size, - bool lock_measurement) -{ - log_measurement(index, signer_id, signer_id_size, - version, version_size, sw_type, sw_type_size, - measurement_algo, measurement_value, - measurement_value_size, lock_measurement); - - return PSA_SUCCESS; -} - -psa_status_t rss_measured_boot_read_measurement(uint8_t index, - uint8_t *signer_id, - size_t signer_id_size, - size_t *signer_id_len, - uint8_t *version, - size_t version_size, - size_t *version_len, - uint32_t *measurement_algo, - uint8_t *sw_type, - size_t sw_type_size, - size_t *sw_type_len, - uint8_t *measurement_value, - size_t measurement_value_size, - size_t *measurement_value_len, - bool *is_locked) -{ - return PSA_SUCCESS; -} - -#endif /* !PLAT_RSS_NOT_SUPPORTED */ diff --git a/atf-20231013-0ea67d76a/lib/psa/measured_boot_private.h b/atf-20240117-bacca82a8/lib/psa/measured_boot_private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/psa/measured_boot_private.h rename to atf-20240117-bacca82a8/lib/psa/measured_boot_private.h diff --git a/atf-20231013-0ea67d76a/lib/psa/rss_platform.c b/atf-20240117-bacca82a8/lib/psa/rss_platform.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/psa/rss_platform.c rename to atf-20240117-bacca82a8/lib/psa/rss_platform.c diff --git a/atf-20231013-0ea67d76a/lib/psci/aarch32/psci_helpers.S b/atf-20240117-bacca82a8/lib/psci/aarch32/psci_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/aarch32/psci_helpers.S rename to atf-20240117-bacca82a8/lib/psci/aarch32/psci_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/psci/aarch64/psci_helpers.S b/atf-20240117-bacca82a8/lib/psci/aarch64/psci_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/aarch64/psci_helpers.S rename to atf-20240117-bacca82a8/lib/psci/aarch64/psci_helpers.S diff --git a/atf-20231013-0ea67d76a/lib/psci/aarch64/runtime_errata.S b/atf-20240117-bacca82a8/lib/psci/aarch64/runtime_errata.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/aarch64/runtime_errata.S rename to atf-20240117-bacca82a8/lib/psci/aarch64/runtime_errata.S diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_common.c b/atf-20240117-bacca82a8/lib/psci/psci_common.c similarity index 99% rename from atf-20231013-0ea67d76a/lib/psci/psci_common.c rename to atf-20240117-bacca82a8/lib/psci/psci_common.c index 70bf77e2d..f9de432b2 100644 --- a/atf-20231013-0ea67d76a/lib/psci/psci_common.c +++ b/atf-20240117-bacca82a8/lib/psci/psci_common.c @@ -817,20 +817,6 @@ void psci_release_pwr_domain_locks(unsigned int end_pwrlvl, } } -/******************************************************************************* - * Simple routine to determine whether a mpidr is valid or not. - ******************************************************************************/ -int psci_validate_mpidr(u_register_t mpidr) -{ - int pos = plat_core_pos_by_mpidr(mpidr); - - if ((pos < 0) || ((unsigned int)pos >= PLATFORM_CORE_COUNT)) { - return PSCI_E_INVALID_PARAMS; - } - - return PSCI_E_SUCCESS; -} - /******************************************************************************* * This function determines the full entrypoint information for the requested * PSCI entrypoint on power on/resume and returns it. diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_lib.mk b/atf-20240117-bacca82a8/lib/psci/psci_lib.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/psci_lib.mk rename to atf-20240117-bacca82a8/lib/psci/psci_lib.mk diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_main.c b/atf-20240117-bacca82a8/lib/psci/psci_main.c similarity index 97% rename from atf-20231013-0ea67d76a/lib/psci/psci_main.c rename to atf-20240117-bacca82a8/lib/psci/psci_main.c index 326f125b6..a01553128 100644 --- a/atf-20231013-0ea67d76a/lib/psci/psci_main.c +++ b/atf-20240117-bacca82a8/lib/psci/psci_main.c @@ -29,9 +29,8 @@ int psci_cpu_on(u_register_t target_cpu, int rc; entry_point_info_t ep; - /* Determine if the cpu exists of not */ - rc = psci_validate_mpidr(target_cpu); - if (rc != PSCI_E_SUCCESS) + /* Validate the target CPU */ + if (!is_valid_mpidr(target_cpu)) return PSCI_E_INVALID_PARAMS; /* Validate the entry point and get the entry_point_info */ @@ -245,19 +244,18 @@ int psci_cpu_off(void) int psci_affinity_info(u_register_t target_affinity, unsigned int lowest_affinity_level) { - int ret; unsigned int target_idx; + /* Validate the target affinity */ + if (!is_valid_mpidr(target_affinity)) + return PSCI_E_INVALID_PARAMS; + /* We dont support level higher than PSCI_CPU_PWR_LVL */ if (lowest_affinity_level > PSCI_CPU_PWR_LVL) return PSCI_E_INVALID_PARAMS; /* Calculate the cpu index of the target */ - ret = plat_core_pos_by_mpidr(target_affinity); - if (ret == -1) { - return PSCI_E_INVALID_PARAMS; - } - target_idx = (unsigned int)ret; + target_idx = (unsigned int) plat_core_pos_by_mpidr(target_affinity); /* * Generic management: @@ -285,6 +283,10 @@ int psci_migrate(u_register_t target_cpu) int rc; u_register_t resident_cpu_mpidr; + /* Validate the target cpu */ + if (!is_valid_mpidr(target_cpu)) + return PSCI_E_INVALID_PARAMS; + rc = psci_spd_migrate_info(&resident_cpu_mpidr); if (rc != PSCI_TOS_UP_MIG_CAP) return (rc == PSCI_TOS_NOT_UP_MIG_CAP) ? @@ -298,8 +300,7 @@ int psci_migrate(u_register_t target_cpu) return PSCI_E_NOT_PRESENT; /* Check the validity of the specified target cpu */ - rc = psci_validate_mpidr(target_cpu); - if (rc != PSCI_E_SUCCESS) + if (!is_valid_mpidr(target_cpu)) return PSCI_E_INVALID_PARAMS; assert((psci_spd_pm != NULL) && (psci_spd_pm->svc_migrate != NULL)); @@ -339,8 +340,7 @@ int psci_node_hw_state(u_register_t target_cpu, int rc; /* Validate target_cpu */ - rc = psci_validate_mpidr(target_cpu); - if (rc != PSCI_E_SUCCESS) + if (!is_valid_mpidr(target_cpu)) return PSCI_E_INVALID_PARAMS; /* Validate power_level against PLAT_MAX_PWR_LVL */ diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_mem_protect.c b/atf-20240117-bacca82a8/lib/psci/psci_mem_protect.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/psci_mem_protect.c rename to atf-20240117-bacca82a8/lib/psci/psci_mem_protect.c diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_off.c b/atf-20240117-bacca82a8/lib/psci/psci_off.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/psci_off.c rename to atf-20240117-bacca82a8/lib/psci/psci_off.c diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_on.c b/atf-20240117-bacca82a8/lib/psci/psci_on.c similarity index 96% rename from atf-20231013-0ea67d76a/lib/psci/psci_on.c rename to atf-20240117-bacca82a8/lib/psci/psci_on.c index 31875ff3d..b2797749f 100644 --- a/atf-20231013-0ea67d76a/lib/psci/psci_on.c +++ b/atf-20240117-bacca82a8/lib/psci/psci_on.c @@ -61,15 +61,7 @@ int psci_cpu_on_start(u_register_t target_cpu, { int rc; aff_info_state_t target_aff_state; - int ret = plat_core_pos_by_mpidr(target_cpu); - unsigned int target_idx; - - /* Calling function must supply valid input arguments */ - assert(ret >= 0); - assert((unsigned int)ret < PLATFORM_CORE_COUNT); - assert(ep != NULL); - - target_idx = (unsigned int)ret; + unsigned int target_idx = (unsigned int)plat_core_pos_by_mpidr(target_cpu); /* * This function must only be called on platforms where the diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_private.h b/atf-20240117-bacca82a8/lib/psci/psci_private.h similarity index 99% rename from atf-20231013-0ea67d76a/lib/psci/psci_private.h rename to atf-20240117-bacca82a8/lib/psci/psci_private.h index 04f93bd08..2eb4a9b70 100644 --- a/atf-20231013-0ea67d76a/lib/psci/psci_private.h +++ b/atf-20240117-bacca82a8/lib/psci/psci_private.h @@ -286,7 +286,6 @@ extern const spd_pm_ops_t *psci_spd_pm; int psci_validate_power_state(unsigned int power_state, psci_power_state_t *state_info); void psci_query_sys_suspend_pwrstate(psci_power_state_t *state_info); -int psci_validate_mpidr(u_register_t mpidr); void psci_init_req_local_pwr_states(void); #if PSCI_OS_INIT_MODE void psci_update_req_local_pwr_states(unsigned int end_pwrlvl, diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_setup.c b/atf-20240117-bacca82a8/lib/psci/psci_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/psci_setup.c rename to atf-20240117-bacca82a8/lib/psci/psci_setup.c diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_stat.c b/atf-20240117-bacca82a8/lib/psci/psci_stat.c similarity index 97% rename from atf-20231013-0ea67d76a/lib/psci/psci_stat.c rename to atf-20240117-bacca82a8/lib/psci/psci_stat.c index ad88d0708..bedb816df 100644 --- a/atf-20231013-0ea67d76a/lib/psci/psci_stat.c +++ b/atf-20240117-bacca82a8/lib/psci/psci_stat.c @@ -181,10 +181,8 @@ static int psci_get_stat(u_register_t target_cpu, unsigned int power_state, psci_power_state_t state_info = { {PSCI_LOCAL_STATE_RUN} }; plat_local_state_t local_state; - /* Validate the target_cpu parameter and determine the cpu index */ + /* Determine the cpu index */ target_idx = (unsigned int) plat_core_pos_by_mpidr(target_cpu); - if (target_idx == (unsigned int) -1) - return PSCI_E_INVALID_PARAMS; /* Validate the power_state parameter */ if (psci_plat_pm_ops->translate_power_state_by_mpidr == NULL) @@ -228,6 +226,11 @@ u_register_t psci_stat_residency(u_register_t target_cpu, unsigned int power_state) { psci_stat_t psci_stat; + + /* Validate the target cpu */ + if (!is_valid_mpidr(target_cpu)) + return 0; + int rc = psci_get_stat(target_cpu, power_state, &psci_stat); if (rc == PSCI_E_SUCCESS) @@ -241,6 +244,11 @@ u_register_t psci_stat_count(u_register_t target_cpu, unsigned int power_state) { psci_stat_t psci_stat; + + /* Validate the target cpu */ + if (!is_valid_mpidr(target_cpu)) + return 0; + int rc = psci_get_stat(target_cpu, power_state, &psci_stat); if (rc == PSCI_E_SUCCESS) diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_suspend.c b/atf-20240117-bacca82a8/lib/psci/psci_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/psci_suspend.c rename to atf-20240117-bacca82a8/lib/psci/psci_suspend.c diff --git a/atf-20231013-0ea67d76a/lib/psci/psci_system_off.c b/atf-20240117-bacca82a8/lib/psci/psci_system_off.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/psci/psci_system_off.c rename to atf-20240117-bacca82a8/lib/psci/psci_system_off.c diff --git a/atf-20231013-0ea67d76a/lib/romlib/Makefile b/atf-20240117-bacca82a8/lib/romlib/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/Makefile rename to atf-20240117-bacca82a8/lib/romlib/Makefile diff --git a/atf-20231013-0ea67d76a/lib/romlib/gen_combined_bl1_romlib.sh b/atf-20240117-bacca82a8/lib/romlib/gen_combined_bl1_romlib.sh similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/gen_combined_bl1_romlib.sh rename to atf-20240117-bacca82a8/lib/romlib/gen_combined_bl1_romlib.sh diff --git a/atf-20231013-0ea67d76a/lib/romlib/init.s b/atf-20240117-bacca82a8/lib/romlib/init.s similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/init.s rename to atf-20240117-bacca82a8/lib/romlib/init.s diff --git a/atf-20231013-0ea67d76a/lib/romlib/jmptbl.i b/atf-20240117-bacca82a8/lib/romlib/jmptbl.i similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/jmptbl.i rename to atf-20240117-bacca82a8/lib/romlib/jmptbl.i diff --git a/atf-20231013-0ea67d76a/lib/romlib/romlib.ld.S b/atf-20240117-bacca82a8/lib/romlib/romlib.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/romlib.ld.S rename to atf-20240117-bacca82a8/lib/romlib/romlib.ld.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/romlib_generator.py b/atf-20240117-bacca82a8/lib/romlib/romlib_generator.py similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/romlib_generator.py rename to atf-20240117-bacca82a8/lib/romlib/romlib_generator.py diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_function.S b/atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_function.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_function.S rename to atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_function.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_function_bti.S b/atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_function_bti.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_function_bti.S rename to atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_function_bti.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_reserved.S b/atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_reserved.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_reserved.S rename to atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_reserved.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_reserved_bti.S b/atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_reserved_bti.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_entry_reserved_bti.S rename to atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_entry_reserved_bti.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_glob_var.S b/atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_glob_var.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_glob_var.S rename to atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_glob_var.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_header.S b/atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_header.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/jmptbl_header.S rename to atf-20240117-bacca82a8/lib/romlib/templates/jmptbl_header.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/wrapper.S b/atf-20240117-bacca82a8/lib/romlib/templates/wrapper.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/wrapper.S rename to atf-20240117-bacca82a8/lib/romlib/templates/wrapper.S diff --git a/atf-20231013-0ea67d76a/lib/romlib/templates/wrapper_bti.S b/atf-20240117-bacca82a8/lib/romlib/templates/wrapper_bti.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/romlib/templates/wrapper_bti.S rename to atf-20240117-bacca82a8/lib/romlib/templates/wrapper_bti.S diff --git a/atf-20231013-0ea67d76a/lib/semihosting/aarch32/semihosting_call.S b/atf-20240117-bacca82a8/lib/semihosting/aarch32/semihosting_call.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/semihosting/aarch32/semihosting_call.S rename to atf-20240117-bacca82a8/lib/semihosting/aarch32/semihosting_call.S diff --git a/atf-20231013-0ea67d76a/lib/semihosting/aarch64/semihosting_call.S b/atf-20240117-bacca82a8/lib/semihosting/aarch64/semihosting_call.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/semihosting/aarch64/semihosting_call.S rename to atf-20240117-bacca82a8/lib/semihosting/aarch64/semihosting_call.S diff --git a/atf-20231013-0ea67d76a/lib/semihosting/semihosting.c b/atf-20240117-bacca82a8/lib/semihosting/semihosting.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/semihosting/semihosting.c rename to atf-20240117-bacca82a8/lib/semihosting/semihosting.c diff --git a/atf-20231013-0ea67d76a/lib/stack_protector/aarch32/asm_stack_protector.S b/atf-20240117-bacca82a8/lib/stack_protector/aarch32/asm_stack_protector.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/stack_protector/aarch32/asm_stack_protector.S rename to atf-20240117-bacca82a8/lib/stack_protector/aarch32/asm_stack_protector.S diff --git a/atf-20231013-0ea67d76a/lib/stack_protector/aarch64/asm_stack_protector.S b/atf-20240117-bacca82a8/lib/stack_protector/aarch64/asm_stack_protector.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/stack_protector/aarch64/asm_stack_protector.S rename to atf-20240117-bacca82a8/lib/stack_protector/aarch64/asm_stack_protector.S diff --git a/atf-20231013-0ea67d76a/lib/stack_protector/stack_protector.c b/atf-20240117-bacca82a8/lib/stack_protector/stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/stack_protector/stack_protector.c rename to atf-20240117-bacca82a8/lib/stack_protector/stack_protector.c diff --git a/atf-20231013-0ea67d76a/lib/stack_protector/stack_protector.mk b/atf-20240117-bacca82a8/lib/stack_protector/stack_protector.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/stack_protector/stack_protector.mk rename to atf-20240117-bacca82a8/lib/stack_protector/stack_protector.mk diff --git a/atf-20231013-0ea67d76a/lib/transfer_list/transfer_list.c b/atf-20240117-bacca82a8/lib/transfer_list/transfer_list.c similarity index 71% rename from atf-20231013-0ea67d76a/lib/transfer_list/transfer_list.c rename to atf-20240117-bacca82a8/lib/transfer_list/transfer_list.c index e38bf7426..63969e972 100644 --- a/atf-20231013-0ea67d76a/lib/transfer_list/transfer_list.c +++ b/atf-20240117-bacca82a8/lib/transfer_list/transfer_list.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include #include @@ -20,28 +21,65 @@ void transfer_list_dump(struct transfer_list_header *tl) if (!tl) { return; } - NOTICE("Dump transfer list:\n"); - NOTICE("signature 0x%x\n", tl->signature); - NOTICE("checksum 0x%x\n", tl->checksum); - NOTICE("version 0x%x\n", tl->version); - NOTICE("hdr_size 0x%x\n", tl->hdr_size); - NOTICE("alignment 0x%x\n", tl->alignment); - NOTICE("size 0x%x\n", tl->size); - NOTICE("max_size 0x%x\n", tl->max_size); + INFO("Dump transfer list:\n"); + INFO("signature 0x%x\n", tl->signature); + INFO("checksum 0x%x\n", tl->checksum); + INFO("version 0x%x\n", tl->version); + INFO("hdr_size 0x%x\n", tl->hdr_size); + INFO("alignment 0x%x\n", tl->alignment); + INFO("size 0x%x\n", tl->size); + INFO("max_size 0x%x\n", tl->max_size); + INFO("flags 0x%x\n", tl->flags); while (true) { te = transfer_list_next(tl, te); if (!te) { break; } - NOTICE("Entry %d:\n", i++); - NOTICE("tag_id 0x%x\n", te->tag_id); - NOTICE("hdr_size 0x%x\n", te->hdr_size); - NOTICE("data_size 0x%x\n", te->data_size); - NOTICE("data_addr 0x%lx\n", - (unsigned long)transfer_list_entry_data(te)); + INFO("Entry %d:\n", i++); + INFO("tag_id 0x%x\n", te->tag_id); + INFO("hdr_size 0x%x\n", te->hdr_size); + INFO("data_size 0x%x\n", te->data_size); + INFO("data_addr 0x%lx\n", + (unsigned long)transfer_list_entry_data(te)); } } +/******************************************************************************* + * Set the handoff arguments according to the transfer list payload + * Return pointer to the entry point info if arguments are set properly + * or NULL if not + ******************************************************************************/ +entry_point_info_t * +transfer_list_set_handoff_args(struct transfer_list_header *tl, + entry_point_info_t *ep_info) +{ + struct transfer_list_entry *te = NULL; + void *dt = NULL; + + if (!ep_info || !tl || transfer_list_check_header(tl) == TL_OPS_NON) { + return NULL; + } + + te = transfer_list_find(tl, TL_TAG_FDT); + dt = transfer_list_entry_data(te); + + ep_info->args.arg1 = TRANSFER_LIST_SIGNATURE | + REGISTER_CONVENTION_VERSION_MASK; + ep_info->args.arg3 = (uintptr_t)tl; + + if (GET_RW(ep_info->spsr) == MODE_RW_32) { + /* aarch32 */ + ep_info->args.arg0 = 0; + ep_info->args.arg2 = (uintptr_t)dt; + } else { + /* aarch64 */ + ep_info->args.arg0 = (uintptr_t)dt; + ep_info->args.arg2 = 0; + } + + return ep_info; +} + /******************************************************************************* * Creating a transfer list in a reserved memory region specified * Compliant to 2.4.5 of Firmware handoff specification (v0.9) @@ -65,9 +103,10 @@ struct transfer_list_header *transfer_list_init(void *addr, size_t max_size) tl->signature = TRANSFER_LIST_SIGNATURE; tl->version = TRANSFER_LIST_VERSION; tl->hdr_size = sizeof(*tl); - tl->alignment = TRANSFER_LIST_INIT_MAX_ALIGN; // initial max align - tl->size = sizeof(*tl); // initial size is the size of header + tl->alignment = TRANSFER_LIST_INIT_MAX_ALIGN; /* initial max align */ + tl->size = sizeof(*tl); /* initial size is the size of header */ tl->max_size = max_size; + tl->flags = TL_FLAGS_HAS_CHECKSUM; transfer_list_update_checksum(tl); @@ -77,11 +116,11 @@ struct transfer_list_header *transfer_list_init(void *addr, size_t max_size) /******************************************************************************* * Relocating a transfer list to a reserved memory region specified * Compliant to 2.4.6 of Firmware handoff specification (v0.9) - * Return true on success or false on error + * Return pointer to the relocated transfer list or NULL on error ******************************************************************************/ -struct transfer_list_header *transfer_list_relocate( - struct transfer_list_header *tl, - void *addr, size_t max_size) +struct transfer_list_header * +transfer_list_relocate(struct transfer_list_header *tl, void *addr, + size_t max_size) { uintptr_t new_addr, align_mask, align_off; struct transfer_list_header *new_tl; @@ -101,7 +140,7 @@ struct transfer_list_header *transfer_list_relocate( new_max_size = max_size - (new_addr - (uintptr_t)addr); - // the new space is not sufficient for the tl + /* the new space is not sufficient for the tl */ if (tl->size > new_max_size) { return NULL; } @@ -120,37 +159,39 @@ struct transfer_list_header *transfer_list_relocate( * Compliant to 2.4.1 of Firmware handoff specification (v0.9) * Return transfer list operation status code ******************************************************************************/ -enum transfer_list_ops transfer_list_check_header( - const struct transfer_list_header *tl) +enum transfer_list_ops +transfer_list_check_header(const struct transfer_list_header *tl) { if (!tl) { return TL_OPS_NON; } if (tl->signature != TRANSFER_LIST_SIGNATURE) { - ERROR("Bad transfer list signature %#"PRIx32"\n", + ERROR("Bad transfer list signature %#" PRIx32 "\n", tl->signature); return TL_OPS_NON; } if (!tl->max_size) { - ERROR("Bad transfer list max size %#"PRIx32"\n", + ERROR("Bad transfer list max size %#" PRIx32 "\n", tl->max_size); return TL_OPS_NON; } if (tl->size > tl->max_size) { - ERROR("Bad transfer list size %#"PRIx32"\n", tl->size); + ERROR("Bad transfer list size %#" PRIx32 "\n", tl->size); return TL_OPS_NON; } if (tl->hdr_size != sizeof(struct transfer_list_header)) { - ERROR("Bad transfer list header size %#"PRIx32"\n", tl->hdr_size); + ERROR("Bad transfer list header size %#" PRIx32 "\n", + tl->hdr_size); return TL_OPS_NON; } if (!transfer_list_verify_checksum(tl)) { - ERROR("Bad transfer list checksum %#"PRIx32"\n", tl->checksum); + ERROR("Bad transfer list checksum %#" PRIx32 "\n", + tl->checksum); return TL_OPS_NON; } @@ -190,14 +231,13 @@ struct transfer_list_entry *transfer_list_next(struct transfer_list_header *tl, if (last) { va = (uintptr_t)last; - // check if the total size overflow - if (add_overflow(last->hdr_size, - last->data_size, &sz)) { + /* check if the total size overflow */ + if (add_overflow(last->hdr_size, last->data_size, &sz)) { return NULL; } - // roundup to the next entry - if (add_with_round_up_overflow(va, sz, - TRANSFER_LIST_GRANULE, &va)) { + /* roundup to the next entry */ + if (add_with_round_up_overflow(va, sz, TRANSFER_LIST_GRANULE, + &va)) { return NULL; } } else { @@ -207,9 +247,8 @@ struct transfer_list_entry *transfer_list_next(struct transfer_list_header *tl, te = (struct transfer_list_entry *)va; if (va + sizeof(*te) > tl_ev || te->hdr_size < sizeof(*te) || - add_overflow(te->hdr_size, te->data_size, &sz) || - add_overflow(va, sz, &ev) || - ev > tl_ev) { + add_overflow(te->hdr_size, te->data_size, &sz) || + add_overflow(va, sz, &ev) || ev > tl_ev) { return NULL; } @@ -226,10 +265,6 @@ static uint8_t calc_byte_sum(const struct transfer_list_header *tl) uint8_t cs = 0; size_t n = 0; - if (!tl) { - return 0; - } - for (n = 0; n < tl->size; n++) { cs += b[n]; } @@ -245,7 +280,7 @@ void transfer_list_update_checksum(struct transfer_list_header *tl) { uint8_t cs; - if (!tl) { + if (!tl || !(tl->flags & TL_FLAGS_HAS_CHECKSUM)) { return; } @@ -262,6 +297,14 @@ void transfer_list_update_checksum(struct transfer_list_header *tl) ******************************************************************************/ bool transfer_list_verify_checksum(const struct transfer_list_header *tl) { + if (!tl) { + return false; + } + + if (!(tl->flags & TL_FLAGS_HAS_CHECKSUM)) { + return true; + } + return !calc_byte_sum(tl); } @@ -284,27 +327,31 @@ bool transfer_list_set_data_size(struct transfer_list_header *tl, } tl_old_ev = (uintptr_t)tl + tl->size; - // calculate the old and new end of TE - // both must be roundup to align with TRANSFER_LIST_GRANULE + /* + * calculate the old and new end of TE + * both must be roundup to align with TRANSFER_LIST_GRANULE + */ if (add_overflow(te->hdr_size, te->data_size, &sz) || - add_with_round_up_overflow((uintptr_t)te, sz, - TRANSFER_LIST_GRANULE, &old_ev)) { + add_with_round_up_overflow((uintptr_t)te, sz, TRANSFER_LIST_GRANULE, + &old_ev)) { return false; } if (add_overflow(te->hdr_size, new_data_size, &sz) || - add_with_round_up_overflow((uintptr_t)te, sz, - TRANSFER_LIST_GRANULE, &new_ev)) { + add_with_round_up_overflow((uintptr_t)te, sz, TRANSFER_LIST_GRANULE, + &new_ev)) { return false; } if (new_ev > old_ev) { - // move distance should be roundup - // to meet the requirement of TE data max alignment - // ensure that the increased size doesn't exceed - // the max size of TL + /* + * move distance should be roundup + * to meet the requirement of TE data max alignment + * ensure that the increased size doesn't exceed + * the max size of TL + */ mov_dis = new_ev - old_ev; - if (round_up_overflow(mov_dis, 1 << tl->alignment, - &mov_dis) || tl->size + mov_dis > tl->max_size) { + if (round_up_overflow(mov_dis, 1 << tl->alignment, &mov_dis) || + tl->size + mov_dis > tl->max_size) { return false; } ru_new_ev = old_ev + mov_dis; @@ -316,7 +363,7 @@ bool transfer_list_set_data_size(struct transfer_list_header *tl, } if (gap >= sizeof(*dummy_te)) { - // create a dummy TE to fill up the gap + /* create a dummy TE to fill up the gap */ dummy_te = (struct transfer_list_entry *)new_ev; dummy_te->tag_id = TL_TAG_EMPTY; dummy_te->reserved0 = 0; @@ -335,7 +382,7 @@ bool transfer_list_set_data_size(struct transfer_list_header *tl, * Return true on success or false on error ******************************************************************************/ bool transfer_list_rem(struct transfer_list_header *tl, - struct transfer_list_entry *te) + struct transfer_list_entry *te) { if (!tl || !te || (uintptr_t)te > (uintptr_t)tl + tl->size) { return false; @@ -369,11 +416,13 @@ struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl, tl_ev = (uintptr_t)tl + tl->size; ev = tl_ev; - // skip the step 1 (optional step) - // new TE will be added into the tail + /* + * skip the step 1 (optional step) + * new TE will be added into the tail + */ if (add_overflow(sizeof(*te), data_size, &sz) || - add_with_round_up_overflow(ev, sz, - TRANSFER_LIST_GRANULE, &ev) || ev > max_tl_ev) { + add_with_round_up_overflow(ev, sz, TRANSFER_LIST_GRANULE, &ev) || + ev > max_tl_ev) { return NULL; } @@ -385,7 +434,7 @@ struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl, tl->size += ev - tl_ev; if (data) { - // get TE data pointer + /* get TE data pointer */ te_data = transfer_list_entry_data(te); if (!te_data) { return NULL; @@ -404,10 +453,10 @@ struct transfer_list_entry *transfer_list_add(struct transfer_list_header *tl, * Compliant to 2.4.4 of Firmware handoff specification (v0.9) * Return pointer to the added transfer entry or NULL on error ******************************************************************************/ -struct transfer_list_entry *transfer_list_add_with_align( - struct transfer_list_header *tl, - uint16_t tag_id, uint32_t data_size, - const void *data, uint8_t alignment) +struct transfer_list_entry * +transfer_list_add_with_align(struct transfer_list_header *tl, uint16_t tag_id, + uint32_t data_size, const void *data, + uint8_t alignment) { struct transfer_list_entry *te = NULL; uintptr_t tl_ev, ev, new_tl_ev; @@ -421,15 +470,17 @@ struct transfer_list_entry *transfer_list_add_with_align( ev = tl_ev + sizeof(struct transfer_list_entry); if (!is_aligned(ev, 1 << alignment)) { - // TE data address is not aligned to the new alignment - // fill the gap with an empty TE as a placeholder before - // adding the desire TE + /* + * TE data address is not aligned to the new alignment + * fill the gap with an empty TE as a placeholder before + * adding the desire TE + */ new_tl_ev = round_up(ev, 1 << alignment) - - sizeof(struct transfer_list_entry); - dummy_te_data_sz = new_tl_ev - tl_ev - - sizeof(struct transfer_list_entry); + sizeof(struct transfer_list_entry); + dummy_te_data_sz = + new_tl_ev - tl_ev - sizeof(struct transfer_list_entry); if (!transfer_list_add(tl, TL_TAG_EMPTY, dummy_te_data_sz, - NULL)) { + NULL)) { return NULL; } } diff --git a/atf-20231013-0ea67d76a/lib/transfer_list/transfer_list.mk b/atf-20240117-bacca82a8/lib/transfer_list/transfer_list.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/transfer_list/transfer_list.mk rename to atf-20240117-bacca82a8/lib/transfer_list/transfer_list.mk diff --git a/atf-20231013-0ea67d76a/lib/utils/mem_region.c b/atf-20240117-bacca82a8/lib/utils/mem_region.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/utils/mem_region.c rename to atf-20240117-bacca82a8/lib/utils/mem_region.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/aarch64/enable_mpu.S b/atf-20240117-bacca82a8/lib/xlat_mpu/aarch64/enable_mpu.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/aarch64/enable_mpu.S rename to atf-20240117-bacca82a8/lib/xlat_mpu/aarch64/enable_mpu.S diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/aarch64/xlat_mpu_arch.c b/atf-20240117-bacca82a8/lib/xlat_mpu/aarch64/xlat_mpu_arch.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/aarch64/xlat_mpu_arch.c rename to atf-20240117-bacca82a8/lib/xlat_mpu/aarch64/xlat_mpu_arch.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/ro_xlat_mpu.mk b/atf-20240117-bacca82a8/lib/xlat_mpu/ro_xlat_mpu.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/ro_xlat_mpu.mk rename to atf-20240117-bacca82a8/lib/xlat_mpu/ro_xlat_mpu.mk diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu.mk b/atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu.mk rename to atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu.mk diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_context.c b/atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_context.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_context.c rename to atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_context.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_core.c b/atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_core.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_core.c rename to atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_core.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_private.h b/atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_private.h rename to atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_private.h diff --git a/atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_utils.c b/atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_mpu/xlat_mpu_utils.c rename to atf-20240117-bacca82a8/lib/xlat_mpu/xlat_mpu_utils.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables/aarch32/nonlpae_tables.c b/atf-20240117-bacca82a8/lib/xlat_tables/aarch32/nonlpae_tables.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables/aarch32/nonlpae_tables.c rename to atf-20240117-bacca82a8/lib/xlat_tables/aarch32/nonlpae_tables.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables/aarch32/xlat_tables.c b/atf-20240117-bacca82a8/lib/xlat_tables/aarch32/xlat_tables.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables/aarch32/xlat_tables.c rename to atf-20240117-bacca82a8/lib/xlat_tables/aarch32/xlat_tables.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables/aarch64/xlat_tables.c b/atf-20240117-bacca82a8/lib/xlat_tables/aarch64/xlat_tables.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables/aarch64/xlat_tables.c rename to atf-20240117-bacca82a8/lib/xlat_tables/aarch64/xlat_tables.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables/xlat_tables_common.c b/atf-20240117-bacca82a8/lib/xlat_tables/xlat_tables_common.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables/xlat_tables_common.c rename to atf-20240117-bacca82a8/lib/xlat_tables/xlat_tables_common.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables/xlat_tables_private.h b/atf-20240117-bacca82a8/lib/xlat_tables/xlat_tables_private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables/xlat_tables_private.h rename to atf-20240117-bacca82a8/lib/xlat_tables/xlat_tables_private.h diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch32/enable_mmu.S b/atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch32/enable_mmu.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch32/enable_mmu.S rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch32/enable_mmu.S diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c b/atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch32/xlat_tables_arch.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch64/enable_mmu.S b/atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch64/enable_mmu.S similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch64/enable_mmu.S rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch64/enable_mmu.S diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c b/atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/aarch64/xlat_tables_arch.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/ro_xlat_tables.mk b/atf-20240117-bacca82a8/lib/xlat_tables_v2/ro_xlat_tables.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/ro_xlat_tables.mk rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/ro_xlat_tables.mk diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables.mk b/atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables.mk rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables.mk diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_context.c b/atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_context.c similarity index 99% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_context.c rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_context.c index 2fbbc788f..ae9244a5e 100644 --- a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_context.c +++ b/atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_context.c @@ -200,7 +200,7 @@ int xlat_make_tables_readonly(void) * region. Therefore, in this case we have to assume that the whole address * space size might be mapped. */ -#ifdef PLAT_XLAT_TABLES_DYNAMIC +#if PLAT_XLAT_TABLES_DYNAMIC #define MAX_PHYS_ADDR tf_xlat_ctx.pa_max_address #else #define MAX_PHYS_ADDR tf_xlat_ctx.max_pa diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_core.c b/atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_core.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_core.c rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_core.c diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_private.h b/atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_private.h rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_private.h diff --git a/atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_utils.c b/atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xlat_tables_v2/xlat_tables_utils.c rename to atf-20240117-bacca82a8/lib/xlat_tables_v2/xlat_tables_utils.c diff --git a/atf-20231013-0ea67d76a/lib/xz/tf_unxz.c b/atf-20240117-bacca82a8/lib/xz/tf_unxz.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/tf_unxz.c rename to atf-20240117-bacca82a8/lib/xz/tf_unxz.c diff --git a/atf-20231013-0ea67d76a/lib/xz/xz.h b/atf-20240117-bacca82a8/lib/xz/xz.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz.h rename to atf-20240117-bacca82a8/lib/xz/xz.h diff --git a/atf-20231013-0ea67d76a/lib/xz/xz.mk b/atf-20240117-bacca82a8/lib/xz/xz.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz.mk rename to atf-20240117-bacca82a8/lib/xz/xz.mk diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_config.h b/atf-20240117-bacca82a8/lib/xz/xz_config.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_config.h rename to atf-20240117-bacca82a8/lib/xz/xz_config.h diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_crc32.c b/atf-20240117-bacca82a8/lib/xz/xz_crc32.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_crc32.c rename to atf-20240117-bacca82a8/lib/xz/xz_crc32.c diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_crc64.c b/atf-20240117-bacca82a8/lib/xz/xz_crc64.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_crc64.c rename to atf-20240117-bacca82a8/lib/xz/xz_crc64.c diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_dec_bcj.c b/atf-20240117-bacca82a8/lib/xz/xz_dec_bcj.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_dec_bcj.c rename to atf-20240117-bacca82a8/lib/xz/xz_dec_bcj.c diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_dec_lzma2.c b/atf-20240117-bacca82a8/lib/xz/xz_dec_lzma2.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_dec_lzma2.c rename to atf-20240117-bacca82a8/lib/xz/xz_dec_lzma2.c diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_dec_stream.c b/atf-20240117-bacca82a8/lib/xz/xz_dec_stream.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_dec_stream.c rename to atf-20240117-bacca82a8/lib/xz/xz_dec_stream.c diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_lzma2.h b/atf-20240117-bacca82a8/lib/xz/xz_lzma2.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_lzma2.h rename to atf-20240117-bacca82a8/lib/xz/xz_lzma2.h diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_private.h b/atf-20240117-bacca82a8/lib/xz/xz_private.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_private.h rename to atf-20240117-bacca82a8/lib/xz/xz_private.h diff --git a/atf-20231013-0ea67d76a/lib/xz/xz_stream.h b/atf-20240117-bacca82a8/lib/xz/xz_stream.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/xz/xz_stream.h rename to atf-20240117-bacca82a8/lib/xz/xz_stream.h diff --git a/atf-20231013-0ea67d76a/lib/zlib/adler32.c b/atf-20240117-bacca82a8/lib/zlib/adler32.c similarity index 88% rename from atf-20231013-0ea67d76a/lib/zlib/adler32.c rename to atf-20240117-bacca82a8/lib/zlib/adler32.c index d0be4380a..04b81d29b 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/adler32.c +++ b/atf-20240117-bacca82a8/lib/zlib/adler32.c @@ -7,8 +7,6 @@ #include "zutil.h" -local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); - #define BASE 65521U /* largest prime smaller than 65536 */ #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ @@ -60,11 +58,7 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2)); #endif /* ========================================================================= */ -uLong ZEXPORT adler32_z(adler, buf, len) - uLong adler; - const Bytef *buf; - z_size_t len; -{ +uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) { unsigned long sum2; unsigned n; @@ -131,20 +125,12 @@ uLong ZEXPORT adler32_z(adler, buf, len) } /* ========================================================================= */ -uLong ZEXPORT adler32(adler, buf, len) - uLong adler; - const Bytef *buf; - uInt len; -{ +uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) { return adler32_z(adler, buf, len); } /* ========================================================================= */ -local uLong adler32_combine_(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off64_t len2; -{ +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) { unsigned long sum1; unsigned long sum2; unsigned rem; @@ -169,18 +155,10 @@ local uLong adler32_combine_(adler1, adler2, len2) } /* ========================================================================= */ -uLong ZEXPORT adler32_combine(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off_t len2; -{ +uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) { return adler32_combine_(adler1, adler2, len2); } -uLong ZEXPORT adler32_combine64(adler1, adler2, len2) - uLong adler1; - uLong adler2; - z_off64_t len2; -{ +uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) { return adler32_combine_(adler1, adler2, len2); } diff --git a/atf-20231013-0ea67d76a/lib/zlib/crc32.c b/atf-20240117-bacca82a8/lib/zlib/crc32.c similarity index 91% rename from atf-20231013-0ea67d76a/lib/zlib/crc32.c rename to atf-20240117-bacca82a8/lib/zlib/crc32.c index 21a69a8ae..6c38f5c04 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/crc32.c +++ b/atf-20240117-bacca82a8/lib/zlib/crc32.c @@ -103,19 +103,6 @@ # define ARMCRC32 #endif -/* Local functions. */ -local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); -local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); - -#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) - local z_word_t byte_swap OF((z_word_t word)); -#endif - -#if defined(W) && !defined(ARMCRC32) - local z_crc_t crc_word OF((z_word_t data)); - local z_word_t crc_word_big OF((z_word_t data)); -#endif - #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) /* Swap the bytes in a z_word_t to convert between little and big endian. Any @@ -123,9 +110,7 @@ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); instruction, if one is available. This assumes that word_t is either 32 bits or 64 bits. */ -local z_word_t byte_swap(word) - z_word_t word; -{ +local z_word_t byte_swap(z_word_t word) { # if W == 8 return (word & 0xff00000000000000) >> 56 | @@ -146,24 +131,77 @@ local z_word_t byte_swap(word) } #endif +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Table of powers of x for combining CRC-32s, filled in by make_crc_table() + * below. + */ + local z_crc_t FAR x2n_table[32]; +#else +/* ========================================================================= + * Tables for byte-wise and braided CRC-32 calculations, and a table of powers + * of x for combining CRC-32s, all made by make_crc_table(). + */ +# include "crc32.h" +#endif + /* CRC polynomial. */ #define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ -#ifdef DYNAMIC_CRC_TABLE +/* + Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, + reflected. For speed, this requires that a not be zero. + */ +local z_crc_t multmodp(z_crc_t a, z_crc_t b) { + z_crc_t m, p; + m = (z_crc_t)1 << 31; + p = 0; + for (;;) { + if (a & m) { + p ^= b; + if ((a & (m - 1)) == 0) + break; + } + m >>= 1; + b = b & 1 ? (b >> 1) ^ POLY : b >> 1; + } + return p; +} + +/* + Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been + initialized. + */ +local z_crc_t x2nmodp(z_off64_t n, unsigned k) { + z_crc_t p; + + p = (z_crc_t)1 << 31; /* x^0 == 1 */ + while (n) { + if (n & 1) + p = multmodp(x2n_table[k & 31], p); + n >>= 1; + k++; + } + return p; +} + +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Build the tables for byte-wise and braided CRC-32 calculations, and a table + * of powers of x for combining CRC-32s. + */ local z_crc_t FAR crc_table[256]; -local z_crc_t FAR x2n_table[32]; -local void make_crc_table OF((void)); #ifdef W local z_word_t FAR crc_big_table[256]; local z_crc_t FAR crc_braid_table[W][256]; local z_word_t FAR crc_braid_big_table[W][256]; - local void braid OF((z_crc_t [][256], z_word_t [][256], int, int)); + local void braid(z_crc_t [][256], z_word_t [][256], int, int); #endif #ifdef MAKECRCH - local void write_table OF((FILE *, const z_crc_t FAR *, int)); - local void write_table32hi OF((FILE *, const z_word_t FAR *, int)); - local void write_table64 OF((FILE *, const z_word_t FAR *, int)); + local void write_table(FILE *, const z_crc_t FAR *, int); + local void write_table32hi(FILE *, const z_word_t FAR *, int); + local void write_table64(FILE *, const z_word_t FAR *, int); #endif /* MAKECRCH */ /* @@ -176,7 +214,6 @@ local void make_crc_table OF((void)); /* Definition of once functionality. */ typedef struct once_s once_t; -local void once OF((once_t *, void (*)(void))); /* Check for the availability of atomics. */ #if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ @@ -196,10 +233,7 @@ struct once_s { invoke once() at the same time. The state must be a once_t initialized with ONCE_INIT. */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ +local void once(once_t *state, void (*init)(void)) { if (!atomic_load(&state->done)) { if (atomic_flag_test_and_set(&state->begun)) while (!atomic_load(&state->done)) @@ -222,10 +256,7 @@ struct once_s { /* Test and set. Alas, not atomic, but tries to minimize the period of vulnerability. */ -local int test_and_set OF((int volatile *)); -local int test_and_set(flag) - int volatile *flag; -{ +local int test_and_set(int volatile *flag) { int was; was = *flag; @@ -234,10 +265,7 @@ local int test_and_set(flag) } /* Run the provided init() function once. This is not thread-safe. */ -local void once(state, init) - once_t *state; - void (*init)(void); -{ +local void once(once_t *state, void (*init)(void)) { if (!state->done) { if (test_and_set(&state->begun)) while (!state->done) @@ -279,8 +307,7 @@ local once_t made = ONCE_INIT; combinations of CRC register values and incoming bytes. */ -local void make_crc_table(void) -{ +local void make_crc_table(void) { unsigned i, j, n; z_crc_t p; @@ -447,11 +474,7 @@ local void make_crc_table(void) Write the 32-bit values in table[0..k-1] to out, five per line in hexadecimal separated by commas. */ -local void write_table(out, table, k) - FILE *out; - const z_crc_t FAR *table; - int k; -{ +local void write_table(FILE *out, const z_crc_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -464,11 +487,7 @@ local void write_table(out, table, k) Write the high 32-bits of each value in table[0..k-1] to out, five per line in hexadecimal separated by commas. */ -local void write_table32hi(out, table, k) -FILE *out; -const z_word_t FAR *table; -int k; -{ +local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -484,11 +503,7 @@ int k; bits. If not, then the type cast and format string can be adjusted accordingly. */ -local void write_table64(out, table, k) - FILE *out; - const z_word_t FAR *table; - int k; -{ +local void write_table64(FILE *out, const z_word_t FAR *table, int k) { int n; for (n = 0; n < k; n++) @@ -498,8 +513,7 @@ local void write_table64(out, table, k) } /* Actually do the deed. */ -int main(void) -{ +int main(void) { make_crc_table(); return 0; } @@ -511,12 +525,7 @@ int main(void) Generate the little and big-endian braid tables for the given n and z_word_t size w. Each array must have room for w blocks of 256 elements. */ -local void braid(ltl, big, n, w) - z_crc_t ltl[][256]; - z_word_t big[][256]; - int n; - int w; -{ +local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) { int k; z_crc_t i, p, q; for (k = 0; k < w; k++) { @@ -531,69 +540,13 @@ local void braid(ltl, big, n, w) } #endif -#else /* !DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Tables for byte-wise and braided CRC-32 calculations, and a table of powers - * of x for combining CRC-32s, all made by make_crc_table(). - */ -#include "crc32.h" #endif /* DYNAMIC_CRC_TABLE */ -/* ======================================================================== - * Routines used for CRC calculation. Some are also required for the table - * generation above. - */ - -/* - Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, - reflected. For speed, this requires that a not be zero. - */ -local z_crc_t multmodp(a, b) - z_crc_t a; - z_crc_t b; -{ - z_crc_t m, p; - - m = (z_crc_t)1 << 31; - p = 0; - for (;;) { - if (a & m) { - p ^= b; - if ((a & (m - 1)) == 0) - break; - } - m >>= 1; - b = b & 1 ? (b >> 1) ^ POLY : b >> 1; - } - return p; -} - -/* - Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been - initialized. - */ -local z_crc_t x2nmodp(n, k) - z_off64_t n; - unsigned k; -{ - z_crc_t p; - - p = (z_crc_t)1 << 31; /* x^0 == 1 */ - while (n) { - if (n & 1) - p = multmodp(x2n_table[k & 31], p); - n >>= 1; - k++; - } - return p; -} - /* ========================================================================= * This function can be used by asm versions of crc32(), and to force the * generation of the CRC tables in a threaded application. */ -const z_crc_t FAR * ZEXPORT get_crc_table() -{ +const z_crc_t FAR * ZEXPORT get_crc_table(void) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -619,11 +572,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table() #define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ #define Z_BATCH_MIN 800 /* fewest words in a final batch */ -unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { z_crc_t val; z_word_t crc1, crc2; const z_word_t *word; @@ -723,18 +673,14 @@ unsigned long ZEXPORT crc32_z(crc, buf, len) least-significant byte of the word as the first byte of data, without any pre or post conditioning. This is used to combine the CRCs of each braid. */ -local z_crc_t crc_word(data) - z_word_t data; -{ +local z_crc_t crc_word(z_word_t data) { int k; for (k = 0; k < W; k++) data = (data >> 8) ^ crc_table[data & 0xff]; return (z_crc_t)data; } -local z_word_t crc_word_big(data) - z_word_t data; -{ +local z_word_t crc_word_big(z_word_t data) { int k; for (k = 0; k < W; k++) data = (data << 8) ^ @@ -745,11 +691,8 @@ local z_word_t crc_word_big(data) #endif /* ========================================================================= */ -unsigned long ZEXPORT crc32_z(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - z_size_t len; -{ +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { /* Return initial CRC, if requested. */ if (buf == Z_NULL) return 0; @@ -781,8 +724,8 @@ unsigned long ZEXPORT crc32_z(crc, buf, len) words = (z_word_t const *)buf; /* Do endian check at execution time instead of compile time, since ARM - processors can change the endianess at execution time. If the - compiler knows what the endianess will be, it can optimize out the + processors can change the endianness at execution time. If the + compiler knows what the endianness will be, it can optimize out the check and the unused branch. */ endian = 1; if (*(unsigned char *)&endian) { @@ -1069,20 +1012,13 @@ unsigned long ZEXPORT crc32_z(crc, buf, len) #endif /* ========================================================================= */ -unsigned long ZEXPORT crc32(crc, buf, len) - unsigned long crc; - const unsigned char FAR *buf; - uInt len; -{ +unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, + uInt len) { return crc32_z(crc, buf, len); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine64(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off64_t len2; -{ +uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -1090,18 +1026,12 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2) } /* ========================================================================= */ -uLong ZEXPORT crc32_combine(crc1, crc2, len2) - uLong crc1; - uLong crc2; - z_off_t len2; -{ +uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) { return crc32_combine64(crc1, crc2, (z_off64_t)len2); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen64(len2) - z_off64_t len2; -{ +uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) { #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ @@ -1109,17 +1039,11 @@ uLong ZEXPORT crc32_combine_gen64(len2) } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_gen(len2) - z_off_t len2; -{ +uLong ZEXPORT crc32_combine_gen(z_off_t len2) { return crc32_combine_gen64((z_off64_t)len2); } /* ========================================================================= */ -uLong ZEXPORT crc32_combine_op(crc1, crc2, op) - uLong crc1; - uLong crc2; - uLong op; -{ +uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) { return multmodp(op, crc1) ^ (crc2 & 0xffffffff); } diff --git a/atf-20231013-0ea67d76a/lib/zlib/crc32.h b/atf-20240117-bacca82a8/lib/zlib/crc32.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/zlib/crc32.h rename to atf-20240117-bacca82a8/lib/zlib/crc32.h diff --git a/atf-20231013-0ea67d76a/lib/zlib/inffast.c b/atf-20240117-bacca82a8/lib/zlib/inffast.c similarity index 98% rename from atf-20231013-0ea67d76a/lib/zlib/inffast.c rename to atf-20240117-bacca82a8/lib/zlib/inffast.c index 1fec7f363..9354676e7 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/inffast.c +++ b/atf-20240117-bacca82a8/lib/zlib/inffast.c @@ -47,10 +47,7 @@ requires strm->avail_out >= 258 for each loop to avoid checking for output space. */ -void ZLIB_INTERNAL inflate_fast(strm, start) -z_streamp strm; -unsigned start; /* inflate()'s starting value for strm->avail_out */ -{ +void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) { struct inflate_state FAR *state; z_const unsigned char FAR *in; /* local strm->next_in */ z_const unsigned char FAR *last; /* have enough input while in < last */ diff --git a/atf-20231013-0ea67d76a/lib/zlib/inffast.h b/atf-20240117-bacca82a8/lib/zlib/inffast.h similarity index 83% rename from atf-20231013-0ea67d76a/lib/zlib/inffast.h rename to atf-20240117-bacca82a8/lib/zlib/inffast.h index e5c1aa4ca..49c6d156c 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/inffast.h +++ b/atf-20240117-bacca82a8/lib/zlib/inffast.h @@ -8,4 +8,4 @@ subject to change. Applications should only use zlib.h. */ -void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); +void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); diff --git a/atf-20231013-0ea67d76a/lib/zlib/inffixed.h b/atf-20240117-bacca82a8/lib/zlib/inffixed.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/zlib/inffixed.h rename to atf-20240117-bacca82a8/lib/zlib/inffixed.h diff --git a/atf-20231013-0ea67d76a/lib/zlib/inflate.c b/atf-20240117-bacca82a8/lib/zlib/inflate.c similarity index 96% rename from atf-20231013-0ea67d76a/lib/zlib/inflate.c rename to atf-20240117-bacca82a8/lib/zlib/inflate.c index aa25e6188..b0757a9b2 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/inflate.c +++ b/atf-20240117-bacca82a8/lib/zlib/inflate.c @@ -91,20 +91,7 @@ # endif #endif -/* function prototypes */ -local int inflateStateCheck OF((z_streamp strm)); -local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, - unsigned copy)); -#ifdef BUILDFIXED - void makefixed OF((void)); -#endif -local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, - unsigned len)); - -local int inflateStateCheck(strm) -z_streamp strm; -{ +local int inflateStateCheck(z_streamp strm) { struct inflate_state FAR *state; if (strm == Z_NULL || strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) @@ -116,9 +103,7 @@ z_streamp strm; return 0; } -int ZEXPORT inflateResetKeep(strm) -z_streamp strm; -{ +int ZEXPORT inflateResetKeep(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -142,9 +127,7 @@ z_streamp strm; return Z_OK; } -int ZEXPORT inflateReset(strm) -z_streamp strm; -{ +int ZEXPORT inflateReset(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -155,10 +138,7 @@ z_streamp strm; return inflateResetKeep(strm); } -int ZEXPORT inflateReset2(strm, windowBits) -z_streamp strm; -int windowBits; -{ +int ZEXPORT inflateReset2(z_streamp strm, int windowBits) { int wrap; struct inflate_state FAR *state; @@ -195,12 +175,8 @@ int windowBits; return inflateReset(strm); } -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) -z_streamp strm; -int windowBits; -const char *version; -int stream_size; -{ +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size) { int ret; struct inflate_state FAR *state; @@ -239,22 +215,17 @@ int stream_size; return ret; } -int ZEXPORT inflateInit_(strm, version, stream_size) -z_streamp strm; -const char *version; -int stream_size; -{ +int ZEXPORT inflateInit_(z_streamp strm, const char *version, + int stream_size) { return inflateInit2_(strm, DEF_WBITS, version, stream_size); } -int ZEXPORT inflatePrime(strm, bits, value) -z_streamp strm; -int bits; -int value; -{ +int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + if (bits == 0) + return Z_OK; state = (struct inflate_state FAR *)strm->state; if (bits < 0) { state->hold = 0; @@ -278,9 +249,7 @@ int value; used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ -local void fixedtables(state) -struct inflate_state FAR *state; -{ +local void fixedtables(struct inflate_state FAR *state) { #ifdef BUILDFIXED static int virgin = 1; static code *lenfix, *distfix; @@ -396,11 +365,7 @@ void makefixed(void) output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow(strm, end, copy) -z_streamp strm; -const Bytef *end; -unsigned copy; -{ +local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { struct inflate_state FAR *state; unsigned dist; @@ -622,10 +587,7 @@ unsigned copy; will return Z_BUF_ERROR if it has not reached the end of the stream. */ -int ZEXPORT inflate(strm, flush) -z_streamp strm; -int flush; -{ +int ZEXPORT inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ @@ -1301,9 +1263,7 @@ int flush; return ret; } -int ZEXPORT inflateEnd(strm) -z_streamp strm; -{ +int ZEXPORT inflateEnd(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1315,11 +1275,8 @@ z_streamp strm; return Z_OK; } -int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) -z_streamp strm; -Bytef *dictionary; -uInt *dictLength; -{ +int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, + uInt *dictLength) { struct inflate_state FAR *state; /* check state */ @@ -1338,11 +1295,8 @@ uInt *dictLength; return Z_OK; } -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) -z_streamp strm; -const Bytef *dictionary; -uInt dictLength; -{ +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, + uInt dictLength) { struct inflate_state FAR *state; unsigned long dictid; int ret; @@ -1373,10 +1327,7 @@ uInt dictLength; return Z_OK; } -int ZEXPORT inflateGetHeader(strm, head) -z_streamp strm; -gz_headerp head; -{ +int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) { struct inflate_state FAR *state; /* check state */ @@ -1401,11 +1352,8 @@ gz_headerp head; called again with more data and the *have state. *have is initialized to zero for the first call. */ -local unsigned syncsearch(have, buf, len) -unsigned FAR *have; -const unsigned char FAR *buf; -unsigned len; -{ +local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, + unsigned len) { unsigned got; unsigned next; @@ -1424,9 +1372,7 @@ unsigned len; return next; } -int ZEXPORT inflateSync(strm) -z_streamp strm; -{ +int ZEXPORT inflateSync(z_streamp strm) { unsigned len; /* number of bytes to look at or looked at */ int flags; /* temporary to save header status */ unsigned long in, out; /* temporary to save total_in and total_out */ @@ -1482,9 +1428,7 @@ z_streamp strm; block. When decompressing, PPP checks that at the end of input packet, inflate is waiting for these length bytes. */ -int ZEXPORT inflateSyncPoint(strm) -z_streamp strm; -{ +int ZEXPORT inflateSyncPoint(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1492,10 +1436,7 @@ z_streamp strm; return state->mode == STORED && state->bits == 0; } -int ZEXPORT inflateCopy(dest, source) -z_streamp dest; -z_streamp source; -{ +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { struct inflate_state FAR *state; struct inflate_state FAR *copy; unsigned char FAR *window; @@ -1539,10 +1480,7 @@ z_streamp source; return Z_OK; } -int ZEXPORT inflateUndermine(strm, subvert) -z_streamp strm; -int subvert; -{ +int ZEXPORT inflateUndermine(z_streamp strm, int subvert) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1557,10 +1495,7 @@ int subvert; #endif } -int ZEXPORT inflateValidate(strm, check) -z_streamp strm; -int check; -{ +int ZEXPORT inflateValidate(z_streamp strm, int check) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return Z_STREAM_ERROR; @@ -1572,9 +1507,7 @@ int check; return Z_OK; } -long ZEXPORT inflateMark(strm) -z_streamp strm; -{ +long ZEXPORT inflateMark(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) @@ -1585,9 +1518,7 @@ z_streamp strm; (state->mode == MATCH ? state->was - state->length : 0)); } -unsigned long ZEXPORT inflateCodesUsed(strm) -z_streamp strm; -{ +unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) { struct inflate_state FAR *state; if (inflateStateCheck(strm)) return (unsigned long)-1; state = (struct inflate_state FAR *)strm->state; diff --git a/atf-20231013-0ea67d76a/lib/zlib/inflate.h b/atf-20240117-bacca82a8/lib/zlib/inflate.h similarity index 100% rename from atf-20231013-0ea67d76a/lib/zlib/inflate.h rename to atf-20240117-bacca82a8/lib/zlib/inflate.h diff --git a/atf-20231013-0ea67d76a/lib/zlib/inftrees.c b/atf-20240117-bacca82a8/lib/zlib/inftrees.c similarity index 97% rename from atf-20231013-0ea67d76a/lib/zlib/inftrees.c rename to atf-20240117-bacca82a8/lib/zlib/inftrees.c index 57d2793be..8a208c2da 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/inftrees.c +++ b/atf-20240117-bacca82a8/lib/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2022 Mark Adler + * Copyright (C) 1995-2023 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.13 Copyright 1995-2022 Mark Adler "; + " inflate 1.3 Copyright 1995-2023 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -29,14 +29,9 @@ const char inflate_copyright[] = table index bits. It will differ if the request is greater than the longest code or if it is less than the shortest code. */ -int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) -codetype type; -unsigned short FAR *lens; -unsigned codes; -code FAR * FAR *table; -unsigned FAR *bits; -unsigned short FAR *work; -{ +int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work) { unsigned len; /* a code's length in bits */ unsigned sym; /* index of code symbols */ unsigned min, max; /* minimum and maximum code lengths */ @@ -62,7 +57,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 194, 65}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/atf-20231013-0ea67d76a/lib/zlib/inftrees.h b/atf-20240117-bacca82a8/lib/zlib/inftrees.h similarity index 92% rename from atf-20231013-0ea67d76a/lib/zlib/inftrees.h rename to atf-20240117-bacca82a8/lib/zlib/inftrees.h index f53665311..a10712d8c 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/inftrees.h +++ b/atf-20240117-bacca82a8/lib/zlib/inftrees.h @@ -57,6 +57,6 @@ typedef enum { DISTS } codetype; -int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); +int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work); diff --git a/atf-20231013-0ea67d76a/lib/zlib/tf_gunzip.c b/atf-20240117-bacca82a8/lib/zlib/tf_gunzip.c similarity index 100% rename from atf-20231013-0ea67d76a/lib/zlib/tf_gunzip.c rename to atf-20240117-bacca82a8/lib/zlib/tf_gunzip.c diff --git a/atf-20231013-0ea67d76a/lib/zlib/zconf.h b/atf-20240117-bacca82a8/lib/zlib/zconf.h similarity index 99% rename from atf-20231013-0ea67d76a/lib/zlib/zconf.h rename to atf-20240117-bacca82a8/lib/zlib/zconf.h index bf977d3e7..fb76ffe31 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/zconf.h +++ b/atf-20240117-bacca82a8/lib/zlib/zconf.h @@ -241,7 +241,11 @@ #endif #ifdef Z_SOLO - typedef unsigned long z_size_t; +# ifdef _WIN64 + typedef unsigned long long z_size_t; +# else + typedef unsigned long z_size_t; +# endif #else # define z_longlong long long # if defined(NO_SIZE_T) @@ -520,7 +524,7 @@ typedef uLong FAR uLongf; #if !defined(_WIN32) && defined(Z_LARGE64) # define z_off64_t off64_t #else -# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# if defined(_WIN32) && !defined(__GNUC__) # define z_off64_t __int64 # else # define z_off64_t z_off_t diff --git a/atf-20231013-0ea67d76a/lib/zlib/zlib.h b/atf-20240117-bacca82a8/lib/zlib/zlib.h similarity index 88% rename from atf-20231013-0ea67d76a/lib/zlib/zlib.h rename to atf-20240117-bacca82a8/lib/zlib/zlib.h index 953cb5012..6b7244f99 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/zlib.h +++ b/atf-20240117-bacca82a8/lib/zlib/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.13, October 13th, 2022 + version 1.3, August 18th, 2023 - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,11 +37,11 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.13" -#define ZLIB_VERNUM 0x12d0 +#define ZLIB_VERSION "1.3" +#define ZLIB_VERNUM 0x1300 #define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 13 +#define ZLIB_VER_MINOR 3 +#define ZLIB_VER_REVISION 0 #define ZLIB_VER_SUBREVISION 0 /* @@ -78,8 +78,8 @@ extern "C" { even in the case of corrupted input. */ -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); +typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size); +typedef void (*free_func)(voidpf opaque, voidpf address); struct internal_state; @@ -217,7 +217,7 @@ typedef gz_header FAR *gz_headerp; /* basic functions */ -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +ZEXTERN const char * ZEXPORT zlibVersion(void); /* The application can compare zlibVersion and ZLIB_VERSION for consistency. If the first character differs, the library code actually used is not compatible with the zlib.h header file used by the application. This check @@ -225,12 +225,12 @@ ZEXTERN const char * ZEXPORT zlibVersion OF((void)); */ /* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); +ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. If zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. + allocation functions. total_in, total_out, adler, and msg are initialized. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all @@ -247,7 +247,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); */ -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush); /* deflate compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce @@ -320,8 +320,8 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. + avail_out is greater than six when the flush marker begins, in order to avoid + repeated flush markers upon calling deflate() again when avail_out == 0. If the parameter flush is set to Z_FINISH, pending input is processed, pending output is flushed and deflate returns with Z_STREAM_END if there was @@ -360,7 +360,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateEnd(z_streamp strm); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending @@ -375,7 +375,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); /* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateInit(z_streamp strm); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by @@ -383,7 +383,8 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); read or consumed. The allocation of a sliding window will be deferred to the first call of inflate (if the decompression does not complete on the first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. + them to use default allocation functions. total_in, total_out, adler, and + msg are initialized. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the @@ -397,7 +398,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); */ -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush); /* inflate decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce @@ -517,7 +518,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateEnd(z_streamp strm); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending @@ -535,12 +536,12 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); */ /* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); +ZEXTERN int ZEXPORT deflateInit2(z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy); This is another version of deflateInit with more compression options. The fields zalloc, zfree and opaque must be initialized before by the caller. @@ -607,9 +608,9 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); /* Initializes the compression dictionary from the given byte sequence without producing any compressed output. When using the zlib format, this @@ -651,9 +652,9 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, not perform any compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); +ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); /* Returns the sliding dictionary being maintained by deflate. dictLength is set to the number of bytes in the dictionary, and that many bytes are copied @@ -673,8 +674,8 @@ ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, stream state is inconsistent. */ -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); +ZEXTERN int ZEXPORT deflateCopy(z_streamp dest, + z_streamp source); /* Sets the destination stream as a complete copy of the source stream. @@ -691,20 +692,20 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, destination. */ -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +ZEXTERN int ZEXPORT deflateReset(z_streamp strm); /* This function is equivalent to deflateEnd followed by deflateInit, but does not free and reallocate the internal compression state. The stream will leave the compression level and any other attributes that may have been - set unchanged. + set unchanged. total_in, total_out, adler, and msg are initialized. deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); +ZEXTERN int ZEXPORT deflateParams(z_streamp strm, + int level, + int strategy); /* Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2(). This can be @@ -729,7 +730,7 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, Then no more input data should be provided before the deflateParams() call. If this is done, the old level and strategy will be applied to the data compressed before deflateParams(), and the new level and strategy will be - applied to the the data compressed after deflateParams(). + applied to the data compressed after deflateParams(). deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if @@ -740,11 +741,11 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, retried with more output space. */ -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); +ZEXTERN int ZEXPORT deflateTune(z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain); /* Fine tune deflate's internal compression parameters. This should only be used by someone who understands the algorithm used by zlib's deflate for @@ -757,8 +758,8 @@ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. */ -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); +ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, + uLong sourceLen); /* deflateBound() returns an upper bound on the compressed size after deflation of sourceLen bytes. It must be called after deflateInit() or @@ -772,9 +773,9 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, than Z_FINISH or Z_NO_FLUSH are used. */ -ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, - unsigned *pending, - int *bits)); +ZEXTERN int ZEXPORT deflatePending(z_streamp strm, + unsigned *pending, + int *bits); /* deflatePending() returns the number of bytes and bits of output that have been generated, but not yet provided in the available output. The bytes not @@ -787,9 +788,9 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, stream state was inconsistent. */ -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); +ZEXTERN int ZEXPORT deflatePrime(z_streamp strm, + int bits, + int value); /* deflatePrime() inserts bits in the deflate output stream. The intent is that this function is used to start off the deflate output with the bits @@ -804,8 +805,8 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, source stream state was inconsistent. */ -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); +ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, + gz_headerp head); /* deflateSetHeader() provides gzip header information for when a gzip stream is requested by deflateInit2(). deflateSetHeader() may be called @@ -821,16 +822,17 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gzip file" and give up. If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). + the time set to zero, and os set to the current operating system, with no + extra, name, or comment fields. The gzip header is returned to the default + state by deflateReset(). deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. */ /* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); +ZEXTERN int ZEXPORT inflateInit2(z_streamp strm, + int windowBits); This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized @@ -883,9 +885,9 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, deferred until inflate() is called. */ -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); /* Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of inflate, @@ -906,9 +908,9 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, inflate(). */ -ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, - Bytef *dictionary, - uInt *dictLength)); +ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); /* Returns the sliding dictionary being maintained by inflate. dictLength is set to the number of bytes in the dictionary, and that many bytes are copied @@ -921,7 +923,7 @@ ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, stream state is inconsistent. */ -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateSync(z_streamp strm); /* Skips invalid compressed data until a possible full flush point (see above for the description of deflate with Z_FULL_FLUSH) can be found, or until all @@ -940,8 +942,8 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); input each time, until success or end of the input data. */ -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); +ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, + z_streamp source); /* Sets the destination stream as a complete copy of the source stream. @@ -956,18 +958,19 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, destination. */ -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateReset(z_streamp strm); /* This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. + total_in, total_out, adler, and msg are initialized. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). */ -ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, - int windowBits)); +ZEXTERN int ZEXPORT inflateReset2(z_streamp strm, + int windowBits); /* This function is the same as inflateReset, but it also permits changing the wrap and window size requests. The windowBits parameter is interpreted @@ -980,9 +983,9 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, the windowBits parameter is invalid. */ -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); +ZEXTERN int ZEXPORT inflatePrime(z_streamp strm, + int bits, + int value); /* This function inserts bits in the inflate input stream. The intent is that this function is used to start inflating at a bit position in the @@ -1001,7 +1004,7 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, stream state was inconsistent. */ -ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +ZEXTERN long ZEXPORT inflateMark(z_streamp strm); /* This function returns two values, one in the lower 16 bits of the return value, and the other in the remaining upper bits, obtained by shifting the @@ -1029,8 +1032,8 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); source stream state was inconsistent. */ -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); +ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm, + gz_headerp head); /* inflateGetHeader() requests that gzip header information be stored in the provided gz_header structure. inflateGetHeader() may be called after @@ -1070,8 +1073,8 @@ ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, */ /* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); +ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits, + unsigned char FAR *window); Initialize the internal stream state for decompression using inflateBack() calls. The fields zalloc, zfree and opaque in strm must be initialized @@ -1091,13 +1094,13 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, the version of the header file. */ -typedef unsigned (*in_func) OF((void FAR *, - z_const unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); +typedef unsigned (*in_func)(void FAR *, + z_const unsigned char FAR * FAR *); +typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned); -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); +ZEXTERN int ZEXPORT inflateBack(z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc); /* inflateBack() does a raw inflate with a single call using a call-back interface for input and output. This is potentially more efficient than @@ -1165,7 +1168,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, cannot return Z_OK. */ -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm); /* All memory allocated by inflateBackInit() is freed. @@ -1173,7 +1176,7 @@ ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); state was inconsistent. */ -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +ZEXTERN uLong ZEXPORT zlibCompileFlags(void); /* Return flags indicating compile-time options. Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: @@ -1226,8 +1229,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); you need special options. */ -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); /* Compresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1241,9 +1244,9 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, buffer. */ -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); +ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level); /* Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte @@ -1257,15 +1260,15 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, Z_STREAM_ERROR if the level parameter is invalid. */ -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen); /* compressBound() returns an upper bound on the compressed size after compress() or compress2() on sourceLen bytes. It would be used before a compress() or compress2() call to allocate the destination buffer. */ -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); /* Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total size @@ -1282,8 +1285,8 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, buffer with the uncompressed data up to that point. */ -ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong *sourceLen)); +ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen); /* Same as uncompress, except that sourceLen is a pointer, where the length of the source is *sourceLen. On return, *sourceLen is the number of @@ -1302,7 +1305,7 @@ ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ /* -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); +ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode); Open the gzip (.gz) file at path for reading and decompressing, or compressing and writing. The mode parameter is as in fopen ("rb" or "wb") @@ -1339,7 +1342,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); file could not be opened. */ -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode); /* Associate a gzFile with the file descriptor fd. File descriptors are obtained from calls like open, dup, creat, pipe or fileno (if the file has @@ -1362,7 +1365,7 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); will not detect if fd is invalid (unless fd is -1). */ -ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size); /* Set the internal buffer size used by this library's functions for file to size. The default buffer size is 8192 bytes. This function must be called @@ -1378,7 +1381,7 @@ ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); too late. */ -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy); /* Dynamically update the compression level and strategy for file. See the description of deflateInit2 for the meaning of these parameters. Previously @@ -1389,7 +1392,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); or Z_MEM_ERROR if there is a memory allocation error. */ -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len); /* Read and decompress up to len uncompressed bytes from file into buf. If the input file is not in gzip format, gzread copies the given number of @@ -1419,8 +1422,8 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); Z_STREAM_ERROR. */ -ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, - gzFile file)); +ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, + gzFile file); /* Read and decompress up to nitems items of size size from file into buf, otherwise operating as gzread() does. This duplicates the interface of @@ -1445,14 +1448,14 @@ ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, file, resetting and retrying on end-of-file, when size is not 1. */ -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); +ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len); /* Compress and write the len uncompressed bytes at buf to file. gzwrite returns the number of uncompressed bytes written or 0 in case of error. */ -ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, - z_size_t nitems, gzFile file)); +ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, + z_size_t nitems, gzFile file); /* Compress and write nitems items of size size from buf to file, duplicating the interface of stdio's fwrite(), with size_t request and return types. If @@ -1465,7 +1468,7 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, is returned, and the error state is set to Z_STREAM_ERROR. */ -ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); +ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...); /* Convert, format, compress, and write the arguments (...) to file under control of the string format, as in fprintf. gzprintf returns the number of @@ -1480,7 +1483,7 @@ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); This can be determined using zlibCompileFlags(). */ -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s); /* Compress and write the given null-terminated string s to file, excluding the terminating null character. @@ -1488,7 +1491,7 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); gzputs returns the number of characters written, or -1 in case of error. */ -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len); /* Read and decompress bytes from file into buf, until len-1 characters are read, or until a newline character is read and transferred to buf, or an @@ -1502,13 +1505,13 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); buf are indeterminate. */ -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +ZEXTERN int ZEXPORT gzputc(gzFile file, int c); /* Compress and write c, converted to an unsigned char, into file. gzputc returns the value that was written, or -1 in case of error. */ -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +ZEXTERN int ZEXPORT gzgetc(gzFile file); /* Read and decompress one byte from file. gzgetc returns this byte or -1 in case of end of file or error. This is implemented as a macro for speed. @@ -1517,7 +1520,7 @@ ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); points to has been clobbered or not. */ -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +ZEXTERN int ZEXPORT gzungetc(int c, gzFile file); /* Push c back onto the stream for file to be read as the first character on the next read. At least one character of push-back is always allowed. @@ -1529,7 +1532,7 @@ ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); gzseek() or gzrewind(). */ -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); /* Flush all pending output to file. The parameter flush is as in the deflate() function. The return value is the zlib error number (see function @@ -1545,8 +1548,8 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); */ /* -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); +ZEXTERN z_off_t ZEXPORT gzseek(gzFile file, + z_off_t offset, int whence); Set the starting position to offset relative to whence for the next gzread or gzwrite on file. The offset represents a number of bytes in the @@ -1564,7 +1567,7 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, would be before the current position. */ -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +ZEXTERN int ZEXPORT gzrewind(gzFile file); /* Rewind file. This function is supported only for reading. @@ -1572,7 +1575,7 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); */ /* -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); +ZEXTERN z_off_t ZEXPORT gztell(gzFile file); Return the starting position for the next gzread or gzwrite on file. This position represents a number of bytes in the uncompressed data stream, @@ -1583,7 +1586,7 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); */ /* -ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); +ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file); Return the current compressed (actual) read or write offset of file. This offset includes the count of bytes that precede the gzip stream, for example @@ -1592,7 +1595,7 @@ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); be used for a progress indicator. On error, gzoffset() returns -1. */ -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +ZEXTERN int ZEXPORT gzeof(gzFile file); /* Return true (1) if the end-of-file indicator for file has been set while reading, false (0) otherwise. Note that the end-of-file indicator is set @@ -1607,7 +1610,7 @@ ZEXTERN int ZEXPORT gzeof OF((gzFile file)); has grown since the previous end of file was detected. */ -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +ZEXTERN int ZEXPORT gzdirect(gzFile file); /* Return true (1) if file is being copied directly while reading, or false (0) if file is a gzip stream being decompressed. @@ -1628,7 +1631,7 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); gzip file reading and decompression, which may not be desired.) */ -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose(gzFile file); /* Flush all pending output for file, if necessary, close file and deallocate the (de)compression state. Note that once file is closed, you @@ -1641,8 +1644,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); last read ended in the middle of a gzip stream, or Z_OK on success. */ -ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); -ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_r(gzFile file); +ZEXTERN int ZEXPORT gzclose_w(gzFile file); /* Same as gzclose(), but gzclose_r() is only for use when reading, and gzclose_w() is only for use when writing or appending. The advantage to @@ -1653,7 +1656,7 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); zlib library. */ -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum); /* Return the error message for the last error which occurred on file. errnum is set to zlib error number. If an error occurred in the file system @@ -1669,7 +1672,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); functions above that do not distinguish those cases in their return values. */ -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +ZEXTERN void ZEXPORT gzclearerr(gzFile file); /* Clear the error and end-of-file flags for file. This is analogous to the clearerr() function in stdio. This is useful for continuing to read a gzip @@ -1686,7 +1689,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); library. */ -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and return the updated checksum. An Adler-32 value is in the range of a 32-bit @@ -1706,15 +1709,15 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ -ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, - z_size_t len)); +ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, + z_size_t len); /* Same as adler32(), but with a size_t length. */ /* -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); +ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, + z_off_t len2); Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for @@ -1724,7 +1727,7 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, negative, the result has no meaning or utility. */ -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len); /* Update a running CRC-32 with the bytes buf[0..len-1] and return the updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. @@ -1742,14 +1745,14 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); if (crc != original_crc) error(); */ -ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf, - z_size_t len)); +ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf, + z_size_t len); /* Same as crc32(), but with a size_t length. */ /* -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); +ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); Combine two CRC-32 check values into one. For two sequences of bytes, seq1 and seq2 with lengths len1 and len2, CRC-32 check values were @@ -1759,13 +1762,13 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); */ /* -ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); +ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); Return the operator corresponding to length len2, to be used with crc32_combine_op(). */ -ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); +ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); /* Give the same result as crc32_combine(), using op in place of len2. op is is generated from len2 by crc32_combine_gen(). This will be faster than @@ -1778,20 +1781,20 @@ ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); +ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateInit_(z_streamp strm, + const char *version, int stream_size); +ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size); +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size); #ifdef Z_PREFIX_SET # define z_deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) @@ -1836,7 +1839,7 @@ struct gzFile_s { unsigned char *next; z_off64_t pos; }; -ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ #ifdef Z_PREFIX_SET # undef z_gzgetc # define z_gzgetc(g) \ @@ -1853,13 +1856,13 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ * without large file support, _LFS64_LARGEFILE must also be true */ #ifdef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); - ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t); #endif #if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) @@ -1881,50 +1884,50 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ # define crc32_combine_gen crc32_combine_gen64 # endif # ifndef Z_LARGE64 - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); # endif #else - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); - ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); #endif #else /* Z_SOLO */ - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); #endif /* !Z_SOLO */ /* undocumented functions */ -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); -ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); -ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); -ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF((z_streamp)); -ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); -ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); +ZEXTERN const char * ZEXPORT zError(int); +ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void); +ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int); +ZEXTERN int ZEXPORT inflateValidate(z_streamp, int); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp); +ZEXTERN int ZEXPORT inflateResetKeep(z_streamp); +ZEXTERN int ZEXPORT deflateResetKeep(z_streamp); #if defined(_WIN32) && !defined(Z_SOLO) -ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, - const char *mode)); +ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, + const char *mode); #endif #if defined(STDC) || defined(Z_HAVE_STDARG_H) # ifndef Z_SOLO -ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, - const char *format, - va_list va)); +ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, + const char *format, + va_list va); # endif #endif diff --git a/atf-20231013-0ea67d76a/lib/zlib/zlib.mk b/atf-20240117-bacca82a8/lib/zlib/zlib.mk similarity index 100% rename from atf-20231013-0ea67d76a/lib/zlib/zlib.mk rename to atf-20240117-bacca82a8/lib/zlib/zlib.mk diff --git a/atf-20231013-0ea67d76a/lib/zlib/zutil.c b/atf-20240117-bacca82a8/lib/zlib/zutil.c similarity index 87% rename from atf-20231013-0ea67d76a/lib/zlib/zutil.c rename to atf-20240117-bacca82a8/lib/zlib/zutil.c index 9543ae825..b1c5d2d3c 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/zutil.c +++ b/atf-20240117-bacca82a8/lib/zlib/zutil.c @@ -24,13 +24,11 @@ z_const char * const z_errmsg[10] = { }; -const char * ZEXPORT zlibVersion() -{ +const char * ZEXPORT zlibVersion(void) { return ZLIB_VERSION; } -uLong ZEXPORT zlibCompileFlags() -{ +uLong ZEXPORT zlibCompileFlags(void) { uLong flags; flags = 0; @@ -121,9 +119,7 @@ uLong ZEXPORT zlibCompileFlags() # endif int ZLIB_INTERNAL z_verbose = verbose; -void ZLIB_INTERNAL z_error(m) - char *m; -{ +void ZLIB_INTERNAL z_error(char *m) { fprintf(stderr, "%s\n", m); exit(1); } @@ -132,9 +128,7 @@ void ZLIB_INTERNAL z_error(m) /* exported to allow conversion of error code to string for compress() and * uncompress() */ -const char * ZEXPORT zError(err) - int err; -{ +const char * ZEXPORT zError(int err) { return ERR_MSG(err); } @@ -148,22 +142,14 @@ const char * ZEXPORT zError(err) #ifndef HAVE_MEMCPY -void ZLIB_INTERNAL zmemcpy(dest, source, len) - Bytef* dest; - const Bytef* source; - uInt len; -{ +void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) { if (len == 0) return; do { *dest++ = *source++; /* ??? to be unrolled */ } while (--len != 0); } -int ZLIB_INTERNAL zmemcmp(s1, s2, len) - const Bytef* s1; - const Bytef* s2; - uInt len; -{ +int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) { uInt j; for (j = 0; j < len; j++) { @@ -172,10 +158,7 @@ int ZLIB_INTERNAL zmemcmp(s1, s2, len) return 0; } -void ZLIB_INTERNAL zmemzero(dest, len) - Bytef* dest; - uInt len; -{ +void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) { if (len == 0) return; do { *dest++ = 0; /* ??? to be unrolled */ @@ -216,8 +199,7 @@ local ptr_table table[MAX_PTR]; * a protected system like OS/2. Use Microsoft C instead. */ -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { voidpf buf; ulg bsize = (ulg)items*size; @@ -242,8 +224,7 @@ voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) return buf; } -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { int n; (void)opaque; @@ -279,14 +260,12 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) # define _hfree hfree #endif -voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) { (void)opaque; return _halloc((long)items, size); } -void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { (void)opaque; _hfree(ptr); } @@ -299,25 +278,18 @@ void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) #ifndef MY_ZCALLOC /* Any system without a special alloc function */ #ifndef STDC -extern voidp malloc OF((uInt size)); -extern voidp calloc OF((uInt items, uInt size)); -extern void free OF((voidpf ptr)); +extern voidp malloc(uInt size); +extern voidp calloc(uInt items, uInt size); +extern void free(voidpf ptr); #endif -voidpf ZLIB_INTERNAL zcalloc(opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; -{ +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { (void)opaque; return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : (voidpf)calloc(items, size); } -void ZLIB_INTERNAL zcfree(opaque, ptr) - voidpf opaque; - voidpf ptr; -{ +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { (void)opaque; free(ptr); } diff --git a/atf-20231013-0ea67d76a/lib/zlib/zutil.h b/atf-20240117-bacca82a8/lib/zlib/zutil.h similarity index 90% rename from atf-20231013-0ea67d76a/lib/zlib/zutil.h rename to atf-20240117-bacca82a8/lib/zlib/zutil.h index 0bc7f4ecd..902a304cc 100644 --- a/atf-20231013-0ea67d76a/lib/zlib/zutil.h +++ b/atf-20240117-bacca82a8/lib/zlib/zutil.h @@ -191,9 +191,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* provide prototypes for these when building zlib without LFS */ #if !defined(_WIN32) && \ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); - ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); #endif /* common defaults */ @@ -232,16 +232,16 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define zmemzero(dest, len) memset(dest, 0, len) # endif #else - void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); + void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len); + int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len); + void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len); #endif /* Diagnostic functions */ #ifdef ZLIB_DEBUG # include extern int ZLIB_INTERNAL z_verbose; - extern void ZLIB_INTERNAL z_error OF((char *m)); + extern void ZLIB_INTERNAL z_error(char *m); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} @@ -258,9 +258,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif #ifndef Z_SOLO - voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, - unsigned size)); - void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); + voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, + unsigned size); + void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr); #endif #define ZALLOC(strm, items, size) \ diff --git a/atf-20231013-0ea67d76a/license.rst b/atf-20240117-bacca82a8/license.rst similarity index 100% rename from atf-20231013-0ea67d76a/license.rst rename to atf-20240117-bacca82a8/license.rst diff --git a/atf-20231013-0ea67d76a/licenses/LICENSE.MIT b/atf-20240117-bacca82a8/licenses/LICENSE.MIT similarity index 100% rename from atf-20231013-0ea67d76a/licenses/LICENSE.MIT rename to atf-20240117-bacca82a8/licenses/LICENSE.MIT diff --git a/atf-20231013-0ea67d76a/make_helpers/arch_features.mk b/atf-20240117-bacca82a8/make_helpers/arch_features.mk similarity index 84% rename from atf-20231013-0ea67d76a/make_helpers/arch_features.mk rename to atf-20240117-bacca82a8/make_helpers/arch_features.mk index f90136b78..a337e7675 100644 --- a/atf-20231013-0ea67d76a/make_helpers/arch_features.mk +++ b/atf-20240117-bacca82a8/make_helpers/arch_features.mk @@ -8,100 +8,10 @@ # and enables them based on the configured architecture version. # This file follows the following format: -# - By default disable any mandatory features. -# - Then Enable mandatory feature if applicable to an Arch Version. +# - Enable mandatory feature if applicable to an Arch Version. +# - By default disable any mandatory features if they have not been defined yet. # - Disable or enable any optional feature this would be enabled/disabled if needed by platform. -# -################################################################################ -# Set mandatory features by default to zero. -################################################################################ -# - -#---- -# 8.1 -#---- - -# Flag to enable access to Privileged Access Never bit of PSTATE. -ENABLE_FEAT_PAN := 0 - -# Flag to enable Virtualization Host Extensions. -ENABLE_FEAT_VHE := 0 - -#---- -# 8.2 -#---- - -# Enable RAS Support. -ENABLE_FEAT_RAS := 0 - -#---- -# 8.3 -#---- - -# Flag to enable Pointer Authentication. Internal flag not meant for -# direct setting. Use BRANCH_PROTECTION to enable PAUTH. -ENABLE_PAUTH := 0 - -# Include pointer authentication (ARMv8.3-PAuth) registers in cpu context. This -# must be set to 1 if the platform wants to use this feature in the Secure -# world. It is not necessary for use in the Non-secure world. -CTX_INCLUDE_PAUTH_REGS := 0 - -#---- -# 8.4 -#---- - -# Flag to enable Secure EL-2 feature. -ENABLE_FEAT_SEL2 := 0 - -# By default, disable trace filter control register access to lower non-secure -# exception levels, i.e. NS-EL2, or NS-EL1 if NS-EL2 is implemented, but -# trace filter control register access is unused if FEAT_TRF is implemented. -ENABLE_TRF_FOR_NS := 0 - -# Flag to enable Data Independent Timing instructions. -ENABLE_FEAT_DIT := 0 - -#---- -# 8.5 -#---- - -# Flag to enable access to the Random Number Generator registers. -ENABLE_FEAT_RNG := 0 - -# Flag to enable Speculation Barrier Instruction. -ENABLE_FEAT_SB := 0 - -# Flag to enable Branch Target Identification. -# Internal flag not meant for direct setting. -# Use BRANCH_PROTECTION to enable BTI. -ENABLE_BTI := 0 - -#---- -# 8.6 -#---- - -# Flag to enable access to the CNTPOFF_EL2 register. -ENABLE_FEAT_ECV := 0 - -# Flag to enable access to the HDFGRTR_EL2 register. -ENABLE_FEAT_FGT := 0 - -#---- -# 8.7 -#---- - -# Flag to enable access to the HCRX_EL2 register by setting SCR_EL3.HXEn. -ENABLE_FEAT_HCX := 0 - -#---- -# 8.9 -#---- - -# Flag to enable access to TCR2 (FEAT_TCR2). -ENABLE_FEAT_TCR2 := 0 - # ################################################################################ # Enable Mandatory features based on Arch versions. @@ -154,6 +64,97 @@ ifeq "8.9" "$(word 1, $(sort 8.9 $(ARM_ARCH_MAJOR).$(ARM_ARCH_MINOR)))" ENABLE_FEAT_TCR2 := 1 endif +# +################################################################################ +# Set mandatory features by default to zero. +################################################################################ +# + +#---- +# 8.1 +#---- + +# Flag to enable access to Privileged Access Never bit of PSTATE. +ENABLE_FEAT_PAN ?= 0 + +# Flag to enable Virtualization Host Extensions. +ENABLE_FEAT_VHE ?= 0 + +#---- +# 8.2 +#---- + +# Enable RAS Support. +ENABLE_FEAT_RAS ?= 0 + +#---- +# 8.3 +#---- + +# Flag to enable Pointer Authentication. Internal flag not meant for +# direct setting. Use BRANCH_PROTECTION to enable PAUTH. +ENABLE_PAUTH ?= 0 + +# Include pointer authentication (ARMv8.3-PAuth) registers in cpu context. This +# must be set to 1 if the platform wants to use this feature in the Secure +# world. It is not necessary for use in the Non-secure world. +CTX_INCLUDE_PAUTH_REGS ?= 0 + + +#---- +# 8.4 +#---- + +# Flag to enable Secure EL-2 feature. +ENABLE_FEAT_SEL2 ?= 0 + +# By default, disable trace filter control register access to lower non-secure +# exception levels, i.e. NS-EL2, or NS-EL1 if NS-EL2 is implemented, but +# trace filter control register access is unused if FEAT_TRF is implemented. +ENABLE_TRF_FOR_NS ?= 0 + +# Flag to enable Data Independent Timing instructions. +ENABLE_FEAT_DIT ?= 0 + +#---- +# 8.5 +#---- + +# Flag to enable Branch Target Identification. +# Internal flag not meant for direct setting. +# Use BRANCH_PROTECTION to enable BTI. +ENABLE_BTI ?= 0 + +# Flag to enable access to the Random Number Generator registers. +ENABLE_FEAT_RNG ?= 0 + +# Flag to enable Speculation Barrier Instruction. +ENABLE_FEAT_SB ?= 0 + +#---- +# 8.6 +#---- + +# Flag to enable access to the CNTPOFF_EL2 register. +ENABLE_FEAT_ECV ?= 0 + +# Flag to enable access to the HDFGRTR_EL2 register. +ENABLE_FEAT_FGT ?= 0 + +#---- +# 8.7 +#---- + +# Flag to enable access to the HCRX_EL2 register by setting SCR_EL3.HXEn. +ENABLE_FEAT_HCX ?= 0 + +#---- +# 8.9 +#---- + +# Flag to enable access to TCR2 (FEAT_TCR2). +ENABLE_FEAT_TCR2 ?= 0 + # ################################################################################ # Optional Features defaulted to 0 or 2, if they are not enabled from @@ -182,25 +183,25 @@ ENABLE_SYS_REG_TRACE_FOR_NS ?= 0 # Build option to enable/disable the Statistical Profiling Extension, # keep it enabled by default for AArch64. ifeq (${ARCH},aarch64) - ENABLE_SPE_FOR_NS ?= 2 + ENABLE_SPE_FOR_NS ?= 2 else ifeq (${ARCH},aarch32) - ifdef ENABLE_SPE_FOR_NS - $(error ENABLE_SPE_FOR_NS is not supported for AArch32) - else - ENABLE_SPE_FOR_NS := 0 - endif + ifneq ($(or $(ENABLE_SPE_FOR_NS),0),0) + $(error ENABLE_SPE_FOR_NS is not supported for AArch32) + else + ENABLE_SPE_FOR_NS := 0 + endif endif # Enable SVE for non-secure world by default. ifeq (${ARCH},aarch64) - ENABLE_SVE_FOR_NS ?= 2 + ENABLE_SVE_FOR_NS ?= 2 # SVE is only supported on AArch64 so disable it on AArch32. else ifeq (${ARCH},aarch32) - ifdef ENABLE_SVE_FOR_NS - $(error ENABLE_SVE_FOR_NS is not supported for AArch32) - else - ENABLE_SVE_FOR_NS := 0 - endif + ifneq ($(or $(ENABLE_SVE_FOR_NS),0),0) + $(error ENABLE_SVE_FOR_NS is not supported for AArch32) + else + ENABLE_SVE_FOR_NS := 0 + endif endif #---- @@ -214,7 +215,16 @@ ENABLE_AMU_FCONF ?= 0 AMU_RESTRICT_COUNTERS ?= 0 # Build option to enable MPAM for lower ELs. -ENABLE_MPAM_FOR_LOWER_ELS ?= 0 +# Enabling it by default +ifeq (${ARCH},aarch64) + ENABLE_FEAT_MPAM ?= 2 +else ifeq (${ARCH},aarch32) + ifneq ($(or $(ENABLE_FEAT_MPAM),0),0) + $(error ENABLE_FEAT_MPAM is not supported for AArch32) + else + ENABLE_FEAT_MPAM := 0 + endif +endif # Include nested virtualization control (Armv8.4-NV) registers in cpu context. # This must be set to 1 if architecture implements Nested Virtualization @@ -291,13 +301,13 @@ ENABLE_SVE_FOR_SWD ?= 0 # Note FEAT_TRBE is only supported on AArch64 - therefore do not enable in # AArch32. ifeq (${ARCH},aarch64) - ENABLE_TRBE_FOR_NS ?= 0 + ENABLE_TRBE_FOR_NS ?= 0 else ifeq (${ARCH},aarch32) - ifdef ENABLE_TRBE_FOR_NS - $(error ENABLE_TRBE_FOR_NS is not supported for AArch32) - else - ENABLE_TRBE_FOR_NS := 0 - endif + ifneq ($(or $(ENABLE_TRBE_FOR_NS),0),0) + $(error ENABLE_TRBE_FOR_NS is not supported for AArch32) + else + ENABLE_TRBE_FOR_NS := 0 + endif endif #---- diff --git a/atf-20231013-0ea67d76a/make_helpers/armv7-a-cpus.mk b/atf-20240117-bacca82a8/make_helpers/armv7-a-cpus.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/armv7-a-cpus.mk rename to atf-20240117-bacca82a8/make_helpers/armv7-a-cpus.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/build_env.mk b/atf-20240117-bacca82a8/make_helpers/build_env.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/build_env.mk rename to atf-20240117-bacca82a8/make_helpers/build_env.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/build_macros.mk b/atf-20240117-bacca82a8/make_helpers/build_macros.mk similarity index 99% rename from atf-20231013-0ea67d76a/make_helpers/build_macros.mk rename to atf-20240117-bacca82a8/make_helpers/build_macros.mk index 618e7368c..d3d820d5f 100644 --- a/atf-20231013-0ea67d76a/make_helpers/build_macros.mk +++ b/atf-20240117-bacca82a8/make_helpers/build_macros.mk @@ -578,7 +578,7 @@ $(eval OBJS += $(MODULE_OBJS)) $(ELF): $(OBJS) $(DEFAULT_LINKER_SCRIPT) $(LINKER_SCRIPTS) | $(1)_dirs libraries $(BL_LIBS) $$(ECHO) " LD $$@" ifdef MAKE_BUILD_STRINGS - $(call MAKE_BUILD_STRINGS, $(BUILD_DIR)/build_message.o) + $(call MAKE_BUILD_STRINGS,$(BUILD_DIR)/build_message.o) else @echo 'const char build_message[] = "Built : "$(BUILD_MESSAGE_TIMESTAMP); \ const char version_string[] = "${VERSION_STRING}"; \ @@ -596,7 +596,7 @@ ifneq ($(findstring armlink,$(notdir $(LD))),) $(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS) \ $(BUILD_DIR)/build_message.o $(OBJS) else ifneq ($(findstring gcc,$(notdir $(LD))),) - $$(Q)$$(LD) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) -Wl,-Map=$(MAPFILE) \ + $$(Q)$$(LD) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) -Wl,-Map=$(MAPFILE) \ $(addprefix -Wl$(comma)--script$(comma),$(LINKER_SCRIPTS)) -Wl,--script,$(DEFAULT_LINKER_SCRIPT) \ $(BUILD_DIR)/build_message.o \ $(OBJS) $(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS) diff --git a/atf-20231013-0ea67d76a/make_helpers/cygwin.mk b/atf-20240117-bacca82a8/make_helpers/cygwin.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/cygwin.mk rename to atf-20240117-bacca82a8/make_helpers/cygwin.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/defaults.mk b/atf-20240117-bacca82a8/make_helpers/defaults.mk similarity index 93% rename from atf-20231013-0ea67d76a/make_helpers/defaults.mk rename to atf-20240117-bacca82a8/make_helpers/defaults.mk index f31365a1f..180207791 100644 --- a/atf-20231013-0ea67d76a/make_helpers/defaults.mk +++ b/atf-20240117-bacca82a8/make_helpers/defaults.mk @@ -150,6 +150,10 @@ HANDLE_EA_EL3_FIRST_NS := 0 # Enable Handoff protocol using transfer lists TRANSFER_LIST := 0 +# Enables support for the gcc compiler option "-mharden-sls=all". +# By default, disables all SLS hardening. +HARDEN_SLS := 0 + # Secure hash algorithm flag, accepts 3 values: sha256, sha384 and sha512. # The default value is sha256. HASH_ALG := sha256 @@ -191,9 +195,6 @@ PSCI_EXTENDED_STATE_ID := 0 # Enable PSCI OS-initiated mode support PSCI_OS_INIT_MODE := 0 -# Enable RAS Firmware First Handling Support -RAS_FFH_SUPPORT := 0 - # By default, BL1 acts as the reset handler, not BL31 RESET_TO_BL31 := 0 @@ -240,6 +241,9 @@ SPM_MM := 0 # Use the FF-A SPMC implementation in EL3. SPMC_AT_EL3 := 0 +# Enable SEL0 SP when SPMC is enabled at EL3 +SPMC_AT_EL3_SEL0_SP :=0 + # Use SPM at S-EL2 as a default config for SPMD SPMD_SPM_AT_SEL2 := 1 @@ -347,9 +351,6 @@ NR_OF_IMAGES_IN_FW_BANK := 1 # Disable Firmware update support by default PSA_FWU_SUPPORT := 0 -# By default, disable the mocking of RSS provided services -PLAT_RSS_NOT_SUPPORTED := 0 - # Dynamic Root of Trust for Measurement support DRTM_SUPPORT := 0 @@ -367,3 +368,16 @@ PSA_CRYPTO := 0 # Disabled by default because it constitutes an attack vector into TF-A. It # should only be enabled if there is a use case for it. ENABLE_CONSOLE_GETC := 0 + +# Build option to disable EL2 when it is not used. +# Most platforms switch from EL3 to NS-EL2 and hence the unused NS-EL2 +# functions must be enabled by platforms if they require it. +# Disabled by default. +INIT_UNUSED_NS_EL2 := 0 + +# Disable including MPAM EL2 registers in context by default since currently +# it's only enabled for NS world +CTX_INCLUDE_MPAM_REGS := 0 + +# Enable context memory usage reporting during BL31 setup. +PLATFORM_REPORT_CTX_MEM_USE := 0 diff --git a/atf-20231013-0ea67d76a/make_helpers/dep.mk b/atf-20240117-bacca82a8/make_helpers/dep.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/dep.mk rename to atf-20240117-bacca82a8/make_helpers/dep.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/march.mk b/atf-20240117-bacca82a8/make_helpers/march.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/march.mk rename to atf-20240117-bacca82a8/make_helpers/march.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/msys.mk b/atf-20240117-bacca82a8/make_helpers/msys.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/msys.mk rename to atf-20240117-bacca82a8/make_helpers/msys.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/plat_helpers.mk b/atf-20240117-bacca82a8/make_helpers/plat_helpers.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/plat_helpers.mk rename to atf-20240117-bacca82a8/make_helpers/plat_helpers.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/tbbr/tbbr_tools.mk b/atf-20240117-bacca82a8/make_helpers/tbbr/tbbr_tools.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/tbbr/tbbr_tools.mk rename to atf-20240117-bacca82a8/make_helpers/tbbr/tbbr_tools.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/unix.mk b/atf-20240117-bacca82a8/make_helpers/unix.mk similarity index 100% rename from atf-20231013-0ea67d76a/make_helpers/unix.mk rename to atf-20240117-bacca82a8/make_helpers/unix.mk diff --git a/atf-20231013-0ea67d76a/make_helpers/windows.mk b/atf-20240117-bacca82a8/make_helpers/windows.mk similarity index 95% rename from atf-20231013-0ea67d76a/make_helpers/windows.mk rename to atf-20240117-bacca82a8/make_helpers/windows.mk index b6d6f0b77..ac0f94044 100644 --- a/atf-20231013-0ea67d76a/make_helpers/windows.mk +++ b/atf-20240117-bacca82a8/make_helpers/windows.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2022, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -83,8 +83,9 @@ BUILT_TIME_DATE_STRING = const char build_message[] = "Built : "${BUILD_MESSAGE_ VERSION_STRING_MESSAGE = const char version_string[] = "${VERSION_STRING}"; VERSION_MESSAGE = const char version[] = "${VERSION}"; define MAKE_BUILD_STRINGS + $$(file >$1.in,$$(TF_CFLAGS) $$(CFLAGS)) @echo $$(BUILT_TIME_DATE_STRING) $$(VERSION_STRING_MESSAGE) $$(VERSION_MESSAGE) | \ - $$(CC) $$(TF_CFLAGS) $$(CFLAGS) -x c -c - -o $1 + $$(CC) @$1.in -x c -c - -o $1 endef MSVC_NMAKE := nmake.exe diff --git a/atf-20240117-bacca82a8/makeconfig_post.mk b/atf-20240117-bacca82a8/makeconfig_post.mk new file mode 100644 index 000000000..ad9849504 --- /dev/null +++ b/atf-20240117-bacca82a8/makeconfig_post.mk @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# Script for Kconfig, post-configuration +# + +KCONFIG_DIR := $(CURDIR)/Kconfiglib +MENUCONFIG := $(KCONFIG_DIR)/menuconfig.py +SAVEDEFCONFIG := $(KCONFIG_DIR)/savedefconfig.py +OLDCONFIG := $(KCONFIG_DIR)/oldconfig.py +DEFCONFIG := $(KCONFIG_DIR)/defconfig.py + +TOP_CONFIG := $(CURDIR)/Config.in + +PYTHON := $(shell which python) + +check_python: +ifeq ($(PYTHON),) + @echo ">> Unable to find python" + @echo ">> You must have python installed in order" + @echo ">> to use 'make menuconfig' and related commands" + @exit 1; +endif + +.PHONY: check_python + +defconfig: check_python + $(Q)mkdir -p $(BUILD_BASE) && ( \ + export CONFIG_=; \ + export srctree=$(CURDIR); \ + cd $(BUILD_BASE); \ + $(DEFCONFIG) ".config" --kconfig $(TOP_CONFIG) \ + ) + +menuconfig: check_python + $(Q)mkdir -p $(BUILD_BASE) && ( \ + export CONFIG_=; \ + export srctree=$(CURDIR); \ + cd $(BUILD_BASE); \ + $(MENUCONFIG) $(TOP_CONFIG) \ + ) + +savedefconfig: check_python + $(Q)mkdir -p $(BUILD_BASE) && ( \ + export CONFIG_=; \ + export srctree=$(CURDIR); \ + cd $(BUILD_BASE); \ + $(SAVEDEFCONFIG) --kconfig $(TOP_CONFIG) \ + --out defconfig \ + ) + +%_defconfig: check_python + $(Q)mkdir -p $(BUILD_BASE) && ( \ + export CONFIG_=; \ + export srctree=$(CURDIR); \ + [ -f "configs/$@" ] && { \ + cd $(BUILD_BASE); \ + $(DEFCONFIG) "$(CURDIR)/configs/$@" \ + --kconfig $(TOP_CONFIG); \ + $(OLDCONFIG) $(TOP_CONFIG); \ + } || exit 1 \ + ) + +%_defconfig_update: check_python + $(Q)mkdir -p $(BUILD_BASE) && ( \ + export CONFIG_=; \ + export srctree=$(CURDIR); \ + cd $(BUILD_BASE); \ + $(SAVEDEFCONFIG) --kconfig $(TOP_CONFIG) \ + --out "$(CURDIR)/configs/$(patsubst %_update,%,$@)" \ + ) + +%_defconfig_refresh: check_python + $(Q)mkdir -p $(BUILD_BASE) && ( \ + export CONFIG_=; \ + export srctree=$(CURDIR); \ + [ -f "configs/$(patsubst %_refresh,%,$@)" ] && { \ + cd $(BUILD_BASE); \ + $(DEFCONFIG) "$(CURDIR)/configs/$(patsubst %_refresh,%,$@)" \ + --kconfig $(TOP_CONFIG); \ + $(OLDCONFIG) $(TOP_CONFIG); \ + $(SAVEDEFCONFIG) --kconfig $(TOP_CONFIG) \ + --out "$(CURDIR)/configs/$(patsubst %_refresh,%,$@)"; \ + } || exit 1 \ + ) + +# Extra rules +ifeq ($(_BUILD_FIP),y) +all: fip +endif + +ifeq ($(_ENABLE_AR),y) +ifeq ($(_SUPPORTS_AR_V1),y) +all: ar_table +endif +ifeq ($(_SUPPORTS_AR_V2),y) +all: ar_tool +endif +endif diff --git a/atf-20240117-bacca82a8/makeconfig_pre.mk b/atf-20240117-bacca82a8/makeconfig_pre.mk new file mode 100644 index 000000000..6c2c38c1b --- /dev/null +++ b/atf-20240117-bacca82a8/makeconfig_pre.mk @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# Script for Kconfig, pre-configuration +# + +_STRING_CONFIGS := PLAT ARCH BOOT_DEVICE NAND_TYPE BL33 BL32 SPD MBEDTLS_DIR \ + ROT_KEY ROT_PUB_KEY BROM_SIGN_KEY ANTI_ROLLBACK_TABLE \ + AR_TABLE_XML TOPS_KEY_HASH WO_KEY_HASH CROSS_COMPILE + +ifeq ($(BUILD_BASE),) + KCONFIG_BUILD_BASE := ./build +else + KCONFIG_BUILD_BASE := $(BUILD_BASE) +endif + +ifneq ("$(wildcard $(KCONFIG_BUILD_BASE)/.config)", "") +ifeq ($(filter defconfig menuconfig savedefconfig %_defconfig %_defconfig_update %_defconfig_refresh,$(MAKECMDGOALS)),) +include $(KCONFIG_BUILD_BASE)/.config +$(foreach cfg,$(_STRING_CONFIGS),$(if $(value $(cfg)),$(eval $(cfg):=$$(patsubst "%",%,$(value $(cfg)))))) +endif +endif diff --git a/atf-20231013-0ea67d76a/package-lock.json b/atf-20240117-bacca82a8/package-lock.json similarity index 99% rename from atf-20231013-0ea67d76a/package-lock.json rename to atf-20240117-bacca82a8/package-lock.json index e23f9a4d3..e43fa657e 100644 --- a/atf-20231013-0ea67d76a/package-lock.json +++ b/atf-20240117-bacca82a8/package-lock.json @@ -1,12 +1,12 @@ { "name": "trusted-firmware-a", - "version": "2.9.0", + "version": "2.10.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "trusted-firmware-a", - "version": "2.9.0", + "version": "2.10.0", "hasInstallScript": true, "license": "BSD-3-Clause", "devDependencies": { diff --git a/atf-20231013-0ea67d76a/package.json b/atf-20240117-bacca82a8/package.json similarity index 96% rename from atf-20231013-0ea67d76a/package.json rename to atf-20240117-bacca82a8/package.json index 8b724dae9..1c557fdac 100644 --- a/atf-20231013-0ea67d76a/package.json +++ b/atf-20240117-bacca82a8/package.json @@ -1,6 +1,6 @@ { "name": "trusted-firmware-a", - "version": "2.9.0", + "version": "2.10.0", "license": "BSD-3-Clause", "private": true, "scripts": { diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/allwinner-common.mk b/atf-20240117-bacca82a8/plat/allwinner/common/allwinner-common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/allwinner-common.mk rename to atf-20240117-bacca82a8/plat/allwinner/common/allwinner-common.mk diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/arisc_off.S b/atf-20240117-bacca82a8/plat/allwinner/common/arisc_off.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/arisc_off.S rename to atf-20240117-bacca82a8/plat/allwinner/common/arisc_off.S diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/include/mentor_i2c_plat.h b/atf-20240117-bacca82a8/plat/allwinner/common/include/mentor_i2c_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/include/mentor_i2c_plat.h rename to atf-20240117-bacca82a8/plat/allwinner/common/include/mentor_i2c_plat.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/allwinner/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/allwinner/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/include/platform_def.h b/atf-20240117-bacca82a8/plat/allwinner/common/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/include/platform_def.h rename to atf-20240117-bacca82a8/plat/allwinner/common/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_cpucfg_ncat.h b/atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_cpucfg_ncat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_cpucfg_ncat.h rename to atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_cpucfg_ncat.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_cpucfg_ncat2.h b/atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_cpucfg_ncat2.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_cpucfg_ncat2.h rename to atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_cpucfg_ncat2.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_def.h b/atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_def.h rename to atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_def.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_private.h b/atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/include/sunxi_private.h rename to atf-20240117-bacca82a8/plat/allwinner/common/include/sunxi_private.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/plat_helpers.S b/atf-20240117-bacca82a8/plat/allwinner/common/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/plat_helpers.S rename to atf-20240117-bacca82a8/plat/allwinner/common/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_bl31_setup.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_bl31_setup.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_common.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_common.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_common.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_cpu_ops.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_cpu_ops.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_cpu_ops.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_cpu_ops.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_native_pm.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_native_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_native_pm.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_native_pm.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_pm.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_pm.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_pm.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_prepare_dtb.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_prepare_dtb.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_prepare_dtb.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_prepare_dtb.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_scpi_pm.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_scpi_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_scpi_pm.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_scpi_pm.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_security.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_security.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_security.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_topology.c b/atf-20240117-bacca82a8/plat/allwinner/common/sunxi_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/common/sunxi_topology.c rename to atf-20240117-bacca82a8/plat/allwinner/common/sunxi_topology.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/core_off_arisc.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/core_off_arisc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/core_off_arisc.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/core_off_arisc.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_ccu.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_ccu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_ccu.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_ccu.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_cpucfg.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_cpucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_cpucfg.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_cpucfg.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_mmap.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_mmap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_mmap.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_mmap.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_spc.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_spc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/include/sunxi_spc.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/include/sunxi_spc.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/platform.mk b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/platform.mk rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/sunxi_idle_states.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/sunxi_idle_states.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/sunxi_idle_states.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/sunxi_idle_states.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/sunxi_power.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/sunxi_power.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_a64/sunxi_power.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_a64/sunxi_power.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_ccu.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_ccu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_ccu.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_ccu.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_cpucfg.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_cpucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_cpucfg.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_cpucfg.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_mmap.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_mmap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_mmap.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_mmap.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_spc.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_spc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/include/sunxi_spc.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/include/sunxi_spc.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/platform.mk b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/platform.mk rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/sunxi_idle_states.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/sunxi_idle_states.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/sunxi_idle_states.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/sunxi_idle_states.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/sunxi_power.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/sunxi_power.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h6/sunxi_power.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h6/sunxi_power.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_ccu.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_ccu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_ccu.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_ccu.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_cpucfg.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_cpucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_cpucfg.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_cpucfg.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_mmap.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_mmap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_mmap.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_mmap.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_spc.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_spc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/include/sunxi_spc.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/include/sunxi_spc.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/platform.mk b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/platform.mk rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/sunxi_idle_states.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/sunxi_idle_states.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/sunxi_idle_states.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/sunxi_idle_states.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/sunxi_power.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/sunxi_power.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_h616/sunxi_power.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_h616/sunxi_power.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_ccu.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_ccu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_ccu.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_ccu.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_cpucfg.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_cpucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_cpucfg.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_cpucfg.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_mmap.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_mmap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_mmap.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_mmap.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_spc.h b/atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_spc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/include/sunxi_spc.h rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/include/sunxi_spc.h diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/platform.mk b/atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/platform.mk rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/sunxi_idle_states.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/sunxi_idle_states.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/sunxi_idle_states.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/sunxi_idle_states.c diff --git a/atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/sunxi_power.c b/atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/sunxi_power.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/allwinner/sun50i_r329/sunxi_power.c rename to atf-20240117-bacca82a8/plat/allwinner/sun50i_r329/sunxi_power.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/axg/axg_bl31_setup.c b/atf-20240117-bacca82a8/plat/amlogic/axg/axg_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/axg/axg_bl31_setup.c rename to atf-20240117-bacca82a8/plat/amlogic/axg/axg_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/axg/axg_common.c b/atf-20240117-bacca82a8/plat/amlogic/axg/axg_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/axg/axg_common.c rename to atf-20240117-bacca82a8/plat/amlogic/axg/axg_common.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/axg/axg_def.h b/atf-20240117-bacca82a8/plat/amlogic/axg/axg_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/axg/axg_def.h rename to atf-20240117-bacca82a8/plat/amlogic/axg/axg_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/axg/axg_pm.c b/atf-20240117-bacca82a8/plat/amlogic/axg/axg_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/axg/axg_pm.c rename to atf-20240117-bacca82a8/plat/amlogic/axg/axg_pm.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/axg/include/platform_def.h b/atf-20240117-bacca82a8/plat/amlogic/axg/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/axg/include/platform_def.h rename to atf-20240117-bacca82a8/plat/amlogic/axg/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/axg/platform.mk b/atf-20240117-bacca82a8/plat/amlogic/axg/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/axg/platform.mk rename to atf-20240117-bacca82a8/plat/amlogic/axg/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aarch64/aml_helpers.S b/atf-20240117-bacca82a8/plat/amlogic/common/aarch64/aml_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aarch64/aml_helpers.S rename to atf-20240117-bacca82a8/plat/amlogic/common/aarch64/aml_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aml_console.c b/atf-20240117-bacca82a8/plat/amlogic/common/aml_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aml_console.c rename to atf-20240117-bacca82a8/plat/amlogic/common/aml_console.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aml_efuse.c b/atf-20240117-bacca82a8/plat/amlogic/common/aml_efuse.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aml_efuse.c rename to atf-20240117-bacca82a8/plat/amlogic/common/aml_efuse.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aml_mhu.c b/atf-20240117-bacca82a8/plat/amlogic/common/aml_mhu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aml_mhu.c rename to atf-20240117-bacca82a8/plat/amlogic/common/aml_mhu.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aml_scpi.c b/atf-20240117-bacca82a8/plat/amlogic/common/aml_scpi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aml_scpi.c rename to atf-20240117-bacca82a8/plat/amlogic/common/aml_scpi.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aml_sip_svc.c b/atf-20240117-bacca82a8/plat/amlogic/common/aml_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aml_sip_svc.c rename to atf-20240117-bacca82a8/plat/amlogic/common/aml_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aml_thermal.c b/atf-20240117-bacca82a8/plat/amlogic/common/aml_thermal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aml_thermal.c rename to atf-20240117-bacca82a8/plat/amlogic/common/aml_thermal.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/aml_topology.c b/atf-20240117-bacca82a8/plat/amlogic/common/aml_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/aml_topology.c rename to atf-20240117-bacca82a8/plat/amlogic/common/aml_topology.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/include/aml_private.h b/atf-20240117-bacca82a8/plat/amlogic/common/include/aml_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/include/aml_private.h rename to atf-20240117-bacca82a8/plat/amlogic/common/include/aml_private.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/amlogic/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/amlogic/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_bl31_setup.c b/atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_bl31_setup.c rename to atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_common.c b/atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_common.c rename to atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_common.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_def.h b/atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_def.h rename to atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_pm.c b/atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/g12a/g12a_pm.c rename to atf-20240117-bacca82a8/plat/amlogic/g12a/g12a_pm.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/g12a/include/platform_def.h b/atf-20240117-bacca82a8/plat/amlogic/g12a/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/g12a/include/platform_def.h rename to atf-20240117-bacca82a8/plat/amlogic/g12a/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/g12a/platform.mk b/atf-20240117-bacca82a8/plat/amlogic/g12a/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/g12a/platform.mk rename to atf-20240117-bacca82a8/plat/amlogic/g12a/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_bl31_setup.c b/atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_bl31_setup.c rename to atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_common.c b/atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_common.c rename to atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_common.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_def.h b/atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_def.h rename to atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_pm.c b/atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxbb/gxbb_pm.c rename to atf-20240117-bacca82a8/plat/amlogic/gxbb/gxbb_pm.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxbb/include/platform_def.h b/atf-20240117-bacca82a8/plat/amlogic/gxbb/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxbb/include/platform_def.h rename to atf-20240117-bacca82a8/plat/amlogic/gxbb/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxbb/platform.mk b/atf-20240117-bacca82a8/plat/amlogic/gxbb/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxbb/platform.mk rename to atf-20240117-bacca82a8/plat/amlogic/gxbb/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_bl31_setup.c b/atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_bl31_setup.c rename to atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_common.c b/atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_common.c rename to atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_common.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_def.h b/atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_def.h rename to atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_pm.c b/atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxl/gxl_pm.c rename to atf-20240117-bacca82a8/plat/amlogic/gxl/gxl_pm.c diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxl/include/platform_def.h b/atf-20240117-bacca82a8/plat/amlogic/gxl/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxl/include/platform_def.h rename to atf-20240117-bacca82a8/plat/amlogic/gxl/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/amlogic/gxl/platform.mk b/atf-20240117-bacca82a8/plat/amlogic/gxl/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/amlogic/gxl/platform.mk rename to atf-20240117-bacca82a8/plat/amlogic/gxl/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_bl2_setup.c similarity index 78% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_bl2_setup.c index 1979c509c..a0aa639ab 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_bl2_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_bl2_setup.c @@ -16,3 +16,8 @@ void bl2_platform_setup(void) { arm_bl2_platform_setup(); } + +int bl2_plat_handle_post_image_load(unsigned int image_id) +{ + return arm_bl2_plat_handle_post_image_load(image_id); +} diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_common.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_common.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_common.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_err.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_err.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_pm.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_private.h b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_private.h rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_private.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_security.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_security.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_topology.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/a5ds_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/a5ds_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/aarch32/a5ds_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/a5ds/aarch32/a5ds_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/aarch32/a5ds_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/aarch32/a5ds_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/fdts/a5ds_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/a5ds/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/a5ds/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/sp_min/a5ds_sp_min_setup.c b/atf-20240117-bacca82a8/plat/arm/board/a5ds/sp_min/a5ds_sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/sp_min/a5ds_sp_min_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/sp_min/a5ds_sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/a5ds/sp_min/sp_min-a5ds.mk b/atf-20240117-bacca82a8/plat/arm/board/a5ds/sp_min/sp_min-a5ds.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/a5ds/sp_min/sp_min-a5ds.mk rename to atf-20240117-bacca82a8/plat/arm/board/a5ds/sp_min/sp_min-a5ds.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/aarch64/fpga_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/build_axf.ld.S b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/build_axf.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/build_axf.ld.S rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/build_axf.ld.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_console.c b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_console.c rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_console.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_def.h b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_def.h rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_gicv3.c b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_gicv3.c rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_pm.c b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_private.h b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_private.h rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_private.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_topology.c b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/fpga_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/fpga_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/kernel_trampoline.S b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/kernel_trampoline.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/kernel_trampoline.S rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/kernel_trampoline.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/platform.mk similarity index 99% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/platform.mk index bd56f30db..f44b37d4a 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/platform.mk @@ -41,7 +41,6 @@ ENABLE_FEAT_CSV2_2 := 2 ENABLE_FEAT_ECV := 2 ENABLE_FEAT_FGT := 2 ENABLE_FEAT_HCX := 2 -ENABLE_MPAM_FOR_LOWER_ELS := 2 ENABLE_SYS_REG_TRACE_FOR_NS := 2 ENABLE_TRF_FOR_NS := 2 diff --git a/atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/rom_trampoline.S b/atf-20240117-bacca82a8/plat/arm/board/arm_fpga/rom_trampoline.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/arm_fpga/rom_trampoline.S rename to atf-20240117-bacca82a8/plat/arm/board/arm_fpga/rom_trampoline.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/aarch32/board_arm_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/common/aarch32/board_arm_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/aarch32/board_arm_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/common/aarch32/board_arm_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/aarch64/board_arm_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/common/aarch64/board_arm_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/aarch64/board_arm_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/common/aarch64/board_arm_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/board_arm_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/common/board_arm_trusted_boot.c similarity index 80% rename from atf-20231013-0ea67d76a/plat/arm/board/common/board_arm_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/common/board_arm_trusted_boot.c index 24d88eec2..655a4d2a2 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/common/board_arm_trusted_boot.c +++ b/atf-20240117-bacca82a8/plat/arm/board/common/board_arm_trusted_boot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -27,11 +26,9 @@ #include #include -#if !ARM_CRYPTOCELL_INTEG #if !ARM_ROTPK_LOCATION_ID #error "ARM_ROTPK_LOCATION_ID not defined" #endif -#endif #if COT_DESC_IN_DTB && defined(IMAGE_BL2) uintptr_t nv_cntr_base_addr[MAX_NV_CTR_IDS]; @@ -50,7 +47,7 @@ uintptr_t nv_cntr_base_addr[MAX_NV_CTR_IDS] = { extern unsigned char arm_rotpk_header[], arm_rotpk_key[], arm_rotpk_hash_end[], arm_rotpk_key_end[]; -#if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_REGS_ID) || ARM_CRYPTOCELL_INTEG +#if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_REGS_ID) static unsigned char rotpk_hash_der[ARM_ROTPK_HEADER_LEN + ARM_ROTPK_HASH_LEN]; #endif @@ -94,43 +91,26 @@ int arm_get_rotpk_info_regs(void **key_ptr, unsigned int *key_len, #endif #if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_RSA_ID) || \ - (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_ECDSA_ID) || \ - (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_FULL_DEV_RSA_KEY_ID) + (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_ECDSA_ID) int arm_get_rotpk_info_dev(void **key_ptr, unsigned int *key_len, unsigned int *flags) { - if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_FULL_DEV_RSA_KEY_ID) { - *key_ptr = arm_rotpk_key; - *key_len = arm_rotpk_key_end - arm_rotpk_key; - *flags = 0; - } else { - *key_ptr = arm_rotpk_header; - *key_len = arm_rotpk_hash_end - arm_rotpk_header; - *flags = ROTPK_IS_HASH; - } + *key_ptr = arm_rotpk_header; + *key_len = arm_rotpk_hash_end - arm_rotpk_header; + *flags = ROTPK_IS_HASH; return 0; } #endif -#if ARM_CRYPTOCELL_INTEG -/* - * Return ROTPK hash from CryptoCell. - */ -int arm_get_rotpk_info_cc(void **key_ptr, unsigned int *key_len, +#if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_FULL_DEV_RSA_KEY_ID) || \ + (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_FULL_DEV_ECDSA_KEY_ID) +int arm_get_rotpk_info_dev(void **key_ptr, unsigned int *key_len, unsigned int *flags) { - unsigned char *dst; - - assert(key_ptr != NULL); - assert(key_len != NULL); - assert(flags != NULL); - - /* Copy the DER header */ - memcpy(rotpk_hash_der, arm_rotpk_header, ARM_ROTPK_HEADER_LEN); - dst = &rotpk_hash_der[ARM_ROTPK_HEADER_LEN]; - *key_ptr = rotpk_hash_der; - *key_len = sizeof(rotpk_hash_der); - return cc_get_rotpk_hash(dst, ARM_ROTPK_HASH_LEN, flags); + *key_ptr = arm_rotpk_key; + *key_len = arm_rotpk_key_end - arm_rotpk_key; + *flags = 0; + return 0; } #endif @@ -140,20 +120,13 @@ int arm_get_rotpk_info_cc(void **key_ptr, unsigned int *key_len, static int get_rotpk_info(void **key_ptr, unsigned int *key_len, unsigned int *flags) { -#if ARM_CRYPTOCELL_INTEG - return arm_get_rotpk_info_cc(key_ptr, key_len, flags); -#else - -#if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_RSA_ID) || \ - (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_ECDSA_ID) || \ - (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_FULL_DEV_RSA_KEY_ID) +#if ARM_USE_DEVEL_ROTPK return arm_get_rotpk_info_dev(key_ptr, key_len, flags); #elif (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_REGS_ID) return arm_get_rotpk_info_regs(key_ptr, key_len, flags); #else return 1; #endif -#endif /* ARM_CRYPTOCELL_INTEG */ } #if defined(ARM_COT_tbbr) diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/board_common.mk b/atf-20240117-bacca82a8/plat/arm/board/common/board_common.mk similarity index 92% rename from atf-20231013-0ea67d76a/plat/arm/board/common/board_common.mk rename to atf-20240117-bacca82a8/plat/arm/board/common/board_common.mk index 466582790..365a9607b 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/common/board_common.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/common/board_common.mk @@ -13,7 +13,7 @@ BL2_SOURCES += drivers/cfi/v2m/v2m_flash.c ifneq (${TRUSTED_BOARD_BOOT},0) ARM_ROTPK_S = plat/arm/board/common/rotpk/arm_dev_rotpk.S -ifneq (${ARM_CRYPTOCELL_INTEG}, 1) + # ROTPK hash location ifeq (${ARM_ROTPK_LOCATION}, regs) ARM_ROTPK_LOCATION_ID = ARM_ROTPK_REGS_ID @@ -39,6 +39,16 @@ else ifeq (${ARM_ROTPK_LOCATION}, devel_full_dev_rsa_key) ARM_ROTPK_S = plat/arm/board/common/rotpk/arm_full_dev_rsa_rotpk.S $(warning Development keys support for FVP is deprecated. Use `regs` \ option instead) +else ifeq (${ARM_ROTPK_LOCATION}, devel_full_dev_ecdsa_key) + CRYPTO_ALG=ec + ARM_ROTPK_LOCATION_ID = ARM_ROTPK_DEVEL_FULL_DEV_ECDSA_KEY_ID +ifeq (${KEY_SIZE},384) + ARM_ROTPK_S = plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p384_rotpk.S +else + ARM_ROTPK_S = plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p256_rotpk.S +endif +$(warning Development keys support for FVP is deprecated. Use `regs` \ +option instead) else $(error "Unsupported ARM_ROTPK_LOCATION value") endif @@ -69,13 +79,7 @@ NTFW_NVCTR_VAL ?= 223 # On others, we mock it by aliasing it to the Trusted Firmware Non-Volatile counter, # hence we set both counters to the same default value. CCAFW_NVCTR_VAL ?= 31 -else -# Certificate NV-Counters when CryptoCell is integrated. For development -# platforms we set the counter to first valid value. -TFW_NVCTR_VAL ?= 0 -NTFW_NVCTR_VAL ?= 0 -CCAFW_NVCTR_VAL ?= 0 -endif + BL1_SOURCES += plat/arm/board/common/board_arm_trusted_boot.c \ ${ARM_ROTPK_S} BL2_SOURCES += plat/arm/board/common/board_arm_trusted_boot.c \ diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/protpk/README b/atf-20240117-bacca82a8/plat/arm/board/common/protpk/README similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/protpk/README rename to atf-20240117-bacca82a8/plat/arm/board/common/protpk/README diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/protpk/arm_dev_protpk.S b/atf-20240117-bacca82a8/plat/arm/board/common/protpk/arm_dev_protpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/protpk/arm_dev_protpk.S rename to atf-20240117-bacca82a8/plat/arm/board/common/protpk/arm_dev_protpk.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/protpk/arm_protpk_rsa_sha256.bin b/atf-20240117-bacca82a8/plat/arm/board/common/protpk/arm_protpk_rsa_sha256.bin similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/protpk/arm_protpk_rsa_sha256.bin rename to atf-20240117-bacca82a8/plat/arm/board/common/protpk/arm_protpk_rsa_sha256.bin diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/protpk/arm_protprivk_rsa.pem b/atf-20240117-bacca82a8/plat/arm/board/common/protpk/arm_protprivk_rsa.pem similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/protpk/arm_protprivk_rsa.pem rename to atf-20240117-bacca82a8/plat/arm/board/common/protpk/arm_protprivk_rsa.pem diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_dev_rotpk.S b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_dev_rotpk.S similarity index 59% rename from atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_dev_rotpk.S rename to atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_dev_rotpk.S index a7fadf6a7..22ae9d35d 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_dev_rotpk.S +++ b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_dev_rotpk.S @@ -1,17 +1,10 @@ /* - * Copyright (c) 2021-2022, ARM Limited. All rights reserved. + * Copyright (c) 2021-2024, ARM Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ -/* corstone1000 platform provides custom values for the macros defined in - * arm_def.h , so only platform_def.h needs to be included - */ -#if !defined(TARGET_PLATFORM_FVP) && !defined(TARGET_PLATFORM_FPGA) -#include "plat/arm/common/arm_def.h" -#else -#include -#endif +#include .global arm_rotpk_header .section .rodata.arm_rotpk_hash, "a" diff --git a/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p256_rotpk.S b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p256_rotpk.S new file mode 100644 index 000000000..690bdbcfb --- /dev/null +++ b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p256_rotpk.S @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + .global arm_rotpk_key + .global arm_rotpk_key_end + + .section .rodata.arm_rotpk_key, "a" + +/* Derived from arm_rotprivk_ecdsa.pem private key file. */ +arm_rotpk_key: + .byte 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D + .byte 0x02, 0x01, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01 + .byte 0x07, 0x03, 0x42, 0x00, 0x04, 0x9B, 0xE6, 0x48, 0xBD, 0x34, 0x38 + .byte 0xE1, 0xA2, 0xA4, 0xF3, 0x70, 0xE1, 0x54, 0xBB, 0x2F, 0xB0, 0x5A + .byte 0x4A, 0x0C, 0xFF, 0xC2, 0x87, 0xDB, 0xC0, 0xFB, 0x81, 0xE9, 0xF9 + .byte 0xF9, 0x95, 0x7D, 0x7E, 0xA0, 0x0C, 0x7F, 0x0A, 0xD4, 0xE0, 0x62 + .byte 0x4A, 0x94, 0x5F, 0xEC, 0x52, 0x7D, 0x44, 0x63, 0xC8, 0x9F, 0x61 + .byte 0xFA, 0xC6, 0xCB, 0x7E, 0x6B, 0x53, 0xAD, 0x2C, 0xC5, 0x94, 0x0D + .byte 0x1A, 0x86, 0x91 +arm_rotpk_key_end: diff --git a/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p384_rotpk.S b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p384_rotpk.S new file mode 100644 index 000000000..eaf2de4f3 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_ecdsa_p384_rotpk.S @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + .global arm_rotpk_key + .global arm_rotpk_key_end + + .section .rodata.arm_rotpk_key, "a" + +/* Derived from arm_rotprivk_ecdsa_secp384r1.pem private key file. */ +arm_rotpk_key: + .byte 0x30, 0x76, 0x30, 0x10, 0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D + .byte 0x02, 0x01, 0x06, 0x05, 0x2B, 0x81, 0x04, 0x00, 0x22, 0x03, 0x62 + .byte 0x00, 0x04, 0xB8, 0xB0, 0xC7, 0xC4, 0x57, 0x19, 0xB7, 0x5A, 0x06 + .byte 0x36, 0xC5, 0xD8, 0x3C, 0x4E, 0xC3, 0xB5, 0xE1, 0x15, 0x60, 0x0E + .byte 0x63, 0xD8, 0xAF, 0x22, 0x2C, 0x6D, 0x79, 0x29, 0xDF, 0x46, 0xA9 + .byte 0x30, 0x12, 0x16, 0x2D, 0x4F, 0x0F, 0x96, 0x6B, 0x1F, 0x87, 0x06 + .byte 0xDB, 0x8F, 0xD7, 0x08, 0x46, 0xE4, 0x4C, 0x22, 0xF3, 0xDE, 0xCE + .byte 0x0F, 0x72, 0x27, 0x00, 0xAA, 0xD8, 0xC3, 0x79, 0x80, 0x5E, 0xF1 + .byte 0x35, 0x1B, 0x33, 0xB6, 0x31, 0xC4, 0x59, 0xD4, 0xE9, 0x65, 0x91 + .byte 0x22, 0x58, 0x2F, 0x87, 0xF1, 0x6C, 0x27, 0xBE, 0x99, 0x6F, 0x5F + .byte 0x6C, 0x14, 0xC5, 0x37, 0x0C, 0x73, 0xB4, 0xE4, 0x8A, 0x63 +arm_rotpk_key_end: diff --git a/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_rsa_rotpk.S b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_rsa_rotpk.S new file mode 100644 index 000000000..4532e53d5 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_full_dev_rsa_rotpk.S @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022-2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + .global arm_rotpk_key + .global arm_rotpk_key_end + + .section .rodata.arm_rotpk_key, "a" + +arm_rotpk_key: + .byte 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48 + .byte 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01 + .byte 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00 + .byte 0xCB, 0x2C, 0x60, 0xD5, 0x8D, 0x63, 0xD4, 0x07, 0x79, 0x7E, 0xC7 + .byte 0x16, 0x96, 0xBD, 0x4D, 0x24, 0x4E, 0xAC, 0x86, 0xE6, 0xB7, 0x71 + .byte 0xE3, 0xC5, 0x54, 0x0B, 0xE7, 0x14, 0x1C, 0xBD, 0x29, 0x1A, 0xC1 + .byte 0x3F, 0x7A, 0xB6, 0x02, 0xAA, 0xAB, 0x36, 0xC4, 0xD9, 0x36, 0x69 + .byte 0x6C, 0xE2, 0x65, 0xC3, 0x9B, 0xB1, 0xBF, 0x3D, 0xA8, 0x56, 0x26 + .byte 0xCB, 0xFD, 0x04, 0x01, 0xBA, 0xAC, 0x3E, 0x54, 0x32, 0xCA, 0x79 + .byte 0x5E, 0xBB, 0xB2, 0x05, 0xEA, 0x06, 0x58, 0xF2, 0x74, 0xBA, 0xE1 + .byte 0xF4, 0x87, 0xC0, 0x19, 0x0A, 0x1F, 0x66, 0x07, 0x77, 0x84, 0x83 + .byte 0xA1, 0x1C, 0xEF, 0xFF, 0x28, 0x59, 0xE7, 0xC3, 0x68, 0x7D, 0x26 + .byte 0x20, 0x43, 0xEB, 0x56, 0x63, 0xF3, 0x39, 0x31, 0xD8, 0x2B, 0x51 + .byte 0xA9, 0xBC, 0x4F, 0xD0, 0xF6, 0xDE, 0x95, 0xDC, 0x5F, 0x5B, 0xC1 + .byte 0xED, 0x90, 0x6F, 0xEC, 0x28, 0x91, 0x7E, 0x17, 0xED, 0x78, 0x90 + .byte 0xF4, 0x60, 0xA7, 0xC4, 0xC7, 0x4F, 0x50, 0xED, 0x5D, 0x13, 0x3A + .byte 0x21, 0x2B, 0x70, 0xC5, 0x61, 0x7B, 0x08, 0x21, 0x65, 0x3A, 0xCD + .byte 0x82, 0x56, 0x8C, 0x7A, 0x47, 0xAC, 0x89, 0xE8, 0xA5, 0x48, 0x48 + .byte 0x31, 0xD9, 0x1D, 0x46, 0xE5, 0x85, 0x86, 0x98, 0xA0, 0xE5, 0xC0 + .byte 0xA6, 0x6A, 0xBD, 0x07, 0xE4, 0x92, 0x57, 0x61, 0x07, 0x8F, 0x7D + .byte 0x5A, 0x4D, 0xCA, 0xAE, 0x36, 0xB9, 0x56, 0x04, 0x10, 0xF2, 0x6C + .byte 0xBE, 0xF6, 0x3B, 0x6C, 0x80, 0x3E, 0xBE, 0x0E, 0xA3, 0x4D, 0xC7 + .byte 0xD4, 0x7E, 0xA7, 0x49, 0xD4, 0xF2, 0xD2, 0xBC, 0xCF, 0x30, 0xA8 + .byte 0xE7, 0x74, 0x8F, 0x64, 0xDF, 0xBC, 0x5C, 0x47, 0x68, 0xCC, 0x40 + .byte 0x4C, 0xF8, 0x83, 0xCC, 0xCB, 0x40, 0x35, 0x04, 0x60, 0xCA, 0xB3 + .byte 0xA4, 0x17, 0x9F, 0x03, 0xCA, 0x1D, 0x5A, 0xFA, 0xD1, 0xAF, 0x21 + .byte 0x57, 0x10, 0xD3, 0x02, 0x03, 0x01, 0x00, 0x01 +arm_rotpk_key_end: diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_ecdsa.der b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_ecdsa.der similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_ecdsa.der rename to atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_ecdsa.der diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_ecdsa_sha256.bin b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_ecdsa_sha256.bin similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_ecdsa_sha256.bin rename to atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_ecdsa_sha256.bin diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_rsa.der b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_rsa.der similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_rsa.der rename to atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_rsa.der diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_rsa_sha256.bin b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_rsa_sha256.bin similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotpk_rsa_sha256.bin rename to atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotpk_rsa_sha256.bin diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem rename to atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotprivk_ecdsa.pem diff --git a/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotprivk_ecdsa_secp384r1.pem b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotprivk_ecdsa_secp384r1.pem new file mode 100644 index 000000000..d40fc0523 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotprivk_ecdsa_secp384r1.pem @@ -0,0 +1,6 @@ +-----BEGIN PRIVATE KEY----- +MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDAWrGXulAoVCrH3oRMC +/AGvn2LA6+VI0xtd9eCWCzIcOSt+AC+/kULZnypuC8bdGJOhZANiAAS4sMfEVxm3 +WgY2xdg8TsO14RVgDmPYryIsbXkp30apMBIWLU8Plmsfhwbbj9cIRuRMIvPezg9y +JwCq2MN5gF7xNRsztjHEWdTpZZEiWC+H8WwnvplvX2wUxTcMc7TkimM= +-----END PRIVATE KEY----- diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem b/atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem rename to atf-20240117-bacca82a8/plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/README b/atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/README similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/README rename to atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/README diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/arm_dev_swd_rotpk.S b/atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/arm_dev_swd_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/arm_dev_swd_rotpk.S rename to atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/arm_dev_swd_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/arm_swd_rotpk_rsa_sha256.bin b/atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/arm_swd_rotpk_rsa_sha256.bin similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/arm_swd_rotpk_rsa_sha256.bin rename to atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/arm_swd_rotpk_rsa_sha256.bin diff --git a/atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/arm_swd_rotprivk_rsa.pem b/atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/arm_swd_rotprivk_rsa.pem similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/common/swd_rotpk/arm_swd_rotprivk_rsa.pem rename to atf-20240117-bacca82a8/plat/arm/board/common/swd_rotpk/arm_swd_rotprivk_rsa.pem diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_err.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_err.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_plat.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_plat.c similarity index 69% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_plat.c index 0235f8b84..ed3801caa 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_plat.c +++ b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_plat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -33,36 +33,16 @@ const mmap_region_t plat_arm_mmap[] = { static void set_fip_image_source(void) { const struct plat_io_policy *policy; - /* - * metadata for firmware update is written at 0x0000 offset of the flash. - * PLAT_ARM_BOOT_BANK_FLAG contains the boot bank that TF-M is booted. - * As per firmware update spec, at a given point of time, only one bank - * is active. This means, TF-A should boot from the same bank as TF-M. - */ - volatile uint32_t *boot_bank_flag = (uint32_t *)(PLAT_ARM_BOOT_BANK_FLAG); - - if (*boot_bank_flag > 1) { - VERBOSE("Boot_bank is set higher than possible values"); - } - - VERBOSE("Boot bank flag = %u.\n\r", *boot_bank_flag); - policy = FCONF_GET_PROPERTY(arm, io_policies, FIP_IMAGE_ID); assert(policy != NULL); assert(policy->image_spec != 0UL); + /* FIP Partition contains Signature area at the beginning which TF-A doesn't expect */ io_block_spec_t *spec = (io_block_spec_t *)policy->image_spec; + spec->offset += FIP_SIGNATURE_AREA_SIZE; + spec->length -= FIP_SIGNATURE_AREA_SIZE; - if ((*boot_bank_flag) == 0) { - VERBOSE("Booting from bank 0: fip offset = 0x%lx\n\r", - PLAT_ARM_FIP_BASE_BANK0); - spec->offset = PLAT_ARM_FIP_BASE_BANK0; - } else { - VERBOSE("Booting from bank 1: fip offset = 0x%lx\n\r", - PLAT_ARM_FIP_BASE_BANK1); - spec->offset = PLAT_ARM_FIP_BASE_BANK1; - } } void bl2_platform_setup(void) diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_pm.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_security.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_security.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_stack_protector.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_stack_protector.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_topology.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/corstone1000_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/corstone1000_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/include/platform_def.h similarity index 97% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/include/platform_def.h index 584d485f3..6953b898c 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/common/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/common/include/platform_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2021-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -10,15 +10,13 @@ #include #include #include +#include #include #include #include #include #include -#define ARM_ROTPK_HEADER_LEN 19 -#define ARM_ROTPK_HASH_LEN 32 - /* Special value used to verify platform parameters from BL2 to BL31 */ #define ARM_BL31_PLAT_PARAM_VAL ULL(0x0f1e2d3c4b5a6978) @@ -173,16 +171,15 @@ /* NOR Flash */ -#define PLAT_ARM_BOOT_BANK_FLAG UL(0x08002000) -#define PLAT_ARM_FIP_BASE_BANK0 UL(0x081EF000) -#define PLAT_ARM_FIP_BASE_BANK1 UL(0x0916F000) -#define PLAT_ARM_FIP_MAX_SIZE UL(0x1ff000) /* 1.996 MB */ - #define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE #define PLAT_ARM_NVM_SIZE (SZ_32M) /* 32 MB */ - -#define PLAT_ARM_FLASH_IMAGE_BASE PLAT_ARM_FIP_BASE_BANK0 +#define PLAT_ARM_FIP_MAX_SIZE UL(0x1ff000) /* 1.996 MB */ +#define PLAT_ARM_FLASH_IMAGE_BASE UL(0x08000000) #define PLAT_ARM_FLASH_IMAGE_MAX_SIZE PLAT_ARM_FIP_MAX_SIZE +#define PLAT_ARM_FIP_OFFSET_IN_GPT (0x86000) + +/* FIP Information */ +#define FIP_SIGNATURE_AREA_SIZE (0x1000) /* 4 KB */ /* * Some data must be aligned on the biggest cache line size in the platform. diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone1000/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/corstone1000/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone1000/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/corstone1000/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_plat.c b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_pm.c b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_security.c b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_security.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_stack_protector.c b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_stack_protector.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_topology.c b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/corstone700_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/corstone700_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.c b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.h b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.h rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/corstone700/common/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/common/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/common/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/corstone700/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/sp_min/corstone700_sp_min_setup.c b/atf-20240117-bacca82a8/plat/arm/board/corstone700/sp_min/corstone700_sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/sp_min/corstone700_sp_min_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/sp_min/corstone700_sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/corstone700/sp_min/sp_min-corstone700.mk b/atf-20240117-bacca82a8/plat/arm/board/corstone700/sp_min/sp_min-corstone700.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/corstone700/sp_min/sp_min-corstone700.mk rename to atf-20240117-bacca82a8/plat/arm/board/corstone700/sp_min/sp_min-corstone700.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch32/fvp_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/fvp/aarch32/fvp_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch32/fvp_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp/aarch32/fvp_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch64/fvp_ea.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/aarch64/fvp_ea.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch64/fvp_ea.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/aarch64/fvp_ea.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch64/fvp_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/fvp/aarch64/fvp_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch64/fvp_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp/aarch64/fvp_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch64/fvp_ras.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/aarch64/fvp_ras.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/aarch64/fvp_ras.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/aarch64/fvp_ras.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fconf/fconf_hw_config_getter.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fconf/fconf_hw_config_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fconf/fconf_hw_config_getter.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fconf/fconf_hw_config_getter.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fconf/fconf_nt_config_getter.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fconf/fconf_nt_config_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fconf/fconf_nt_config_getter.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fconf/fconf_nt_config_getter.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/event_log.dtsi b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/event_log.dtsi similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/event_log.dtsi rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/event_log.dtsi diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_nt_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_soc_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_soc_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_soc_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_soc_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts similarity index 90% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts index 4f97339f7..ee6c2603b 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_spmc_manifest.dts @@ -20,7 +20,7 @@ attribute { spmc_id = <0x8000>; maj_ver = <0x1>; - min_ver = <0x1>; + min_ver = <0x2>; exec_state = <0x0>; load_address = <0x0 0x6000000>; entrypoint = <0x0 0x6000000>; @@ -35,6 +35,11 @@ load_address = <0x7000000>; vcpu_count = <8>; mem_size = <1048576>; + /* + * Platform specific SiP SMC call handled at EL3. Used + * to pend an interrupt for testing purpose. + */ + smc_whitelist = <0x82000100>; }; vm2 { is_ffa_partition; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_spmc_optee_sp_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_spmc_optee_sp_manifest.dts similarity index 91% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_spmc_optee_sp_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_spmc_optee_sp_manifest.dts index 041dade73..17a2fd174 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_spmc_optee_sp_manifest.dts +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_spmc_optee_sp_manifest.dts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, Arm Limited. All rights reserved. + * Copyright (c) 2020-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -20,7 +20,7 @@ attribute { spmc_id = <0x8000>; maj_ver = <0x1>; - min_ver = <0x1>; + min_ver = <0x2>; exec_state = <0x0>; load_address = <0x0 0x6000000>; entrypoint = <0x0 0x6000000>; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_tsp_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_tsp_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_tsp_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_tsp_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_tsp_sp_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_tsp_sp_manifest.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/fvp_tsp_sp_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/fvp_tsp_sp_manifest.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/optee_sp_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/optee_sp_manifest.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fdts/optee_sp_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fdts/optee_sp_manifest.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl1_measured_boot.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl1_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl1_measured_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl1_measured_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2_el3_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2_el3_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2_el3_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2_el3_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2_measured_boot.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2_measured_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2_measured_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2_setup.c similarity index 52% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2_setup.c index b93922a61..ebd52664b 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2_setup.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -18,6 +19,8 @@ #include "fvp_private.h" +static struct transfer_list_header *ns_tl __unused; + void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3) { arm_bl2_early_platform_setup((uintptr_t)arg0, (meminfo_t *)arg1); @@ -30,6 +33,10 @@ void bl2_platform_setup(void) { arm_bl2_platform_setup(); +#if TRANSFER_LIST + ns_tl = transfer_list_init((void *)FW_NS_HANDOFF_BASE, FW_HANDOFF_SIZE); + assert(ns_tl != NULL); +#endif /* Initialize System level generic or SP804 timer */ fvp_timer_init(); } @@ -41,6 +48,7 @@ struct bl_params *plat_get_next_bl_params(void) { struct bl_params *arm_bl_params; const struct dyn_cfg_dtb_info_t *hw_config_info __unused; + struct transfer_list_entry *te __unused; bl_mem_params_node_t *param_node __unused; arm_bl_params = arm_get_next_bl_params(); @@ -48,7 +56,6 @@ struct bl_params *plat_get_next_bl_params(void) #if !RESET_TO_BL2 && !EL3_PAYLOAD_BASE const struct dyn_cfg_dtb_info_t *fw_config_info; uintptr_t fw_config_base = 0UL; - entry_point_info_t *ep_info; #if __aarch64__ /* Get BL31 image node */ @@ -59,47 +66,75 @@ struct bl_params *plat_get_next_bl_params(void) #endif /* __aarch64__ */ assert(param_node != NULL); - /* get fw_config load address */ + /* Update the next image's ep info with the FW config address */ fw_config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, FW_CONFIG_ID); assert(fw_config_info != NULL); fw_config_base = fw_config_info->config_addr; assert(fw_config_base != 0UL); - /* - * Get the entry point info of next executable image and override - * arg1 of entry point info with fw_config base address - */ - ep_info = ¶m_node->ep_info; - ep_info->args.arg1 = (uint32_t)fw_config_base; - - /* grab NS HW config address */ - hw_config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, HW_CONFIG_ID); - assert(hw_config_info != NULL); - - /* To retrieve actual size of the HW_CONFIG */ - param_node = get_bl_mem_params_node(HW_CONFIG_ID); - assert(param_node != NULL); - - /* Copy HW config from Secure address to NS address */ - memcpy((void *)hw_config_info->secondary_config_addr, - (void *)hw_config_info->config_addr, - (size_t)param_node->image_info.image_size); - - /* - * Ensure HW-config device tree committed to memory, as there is - * a possibility to use HW-config without cache and MMU enabled - * at BL33 - */ - flush_dcache_range(hw_config_info->secondary_config_addr, - param_node->image_info.image_size); + param_node->ep_info.args.arg1 = (uint32_t)fw_config_base; + /* Update BL33's ep info with the NS HW config address */ param_node = get_bl_mem_params_node(BL33_IMAGE_ID); assert(param_node != NULL); +#if TRANSFER_LIST /* Update BL33's ep info with NS HW config address */ + te = transfer_list_find(ns_tl, TL_TAG_FDT); + assert(te != NULL); + + param_node->ep_info.args.arg1 = TRANSFER_LIST_SIGNATURE | + REGISTER_CONVENTION_VERSION_MASK; + param_node->ep_info.args.arg2 = 0; + param_node->ep_info.args.arg3 = (uintptr_t)ns_tl; + param_node->ep_info.args.arg0 = + te ? (uintptr_t)transfer_list_entry_data(te) : 0; +#else + hw_config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, HW_CONFIG_ID); + assert(hw_config_info != NULL); + param_node->ep_info.args.arg1 = hw_config_info->secondary_config_addr; +#endif /* TRANSFER_LIST */ #endif /* !RESET_TO_BL2 && !EL3_PAYLOAD_BASE */ return arm_bl_params; } + +int bl2_plat_handle_post_image_load(unsigned int image_id) +{ +#if !RESET_TO_BL2 && !EL3_PAYLOAD_BASE + if (image_id == HW_CONFIG_ID) { + const struct dyn_cfg_dtb_info_t *hw_config_info; + struct transfer_list_entry *te __unused; + + const bl_mem_params_node_t *param_node = + get_bl_mem_params_node(image_id); + assert(param_node != NULL); + + hw_config_info = FCONF_GET_PROPERTY(dyn_cfg, dtb, HW_CONFIG_ID); + assert(hw_config_info != NULL); + +#if TRANSFER_LIST + /* Update BL33's ep info with NS HW config address */ + te = transfer_list_add(ns_tl, TL_TAG_FDT, + param_node->image_info.image_size, + (void *)hw_config_info->config_addr); + assert(te != NULL); +#else + memcpy((void *)hw_config_info->secondary_config_addr, + (void *)hw_config_info->config_addr, + (size_t)param_node->image_info.image_size); + + /* + * Ensure HW-config device tree is committed to memory, as the HW-Config + * might be used without cache and MMU enabled at BL33. + */ + flush_dcache_range(hw_config_info->secondary_config_addr, + param_node->image_info.image_size); +#endif /* TRANSFER_LIST */ + } +#endif /* !RESET_TO_BL2 && !EL3_PAYLOAD_BASE */ + + return arm_bl2_plat_handle_post_image_load(image_id); +} diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2u_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2u_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl2u_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl2u_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_common.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_common.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_common.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_common.c index 283918bb0..c40a3ced3 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_common.c +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_common.c @@ -71,6 +71,14 @@ arm_config_t arm_config; DEVICE2_SIZE, \ MT_DEVICE | MT_RW | MT_SECURE) +#if TRANSFER_LIST +#ifdef FW_NS_HANDOFF_BASE +#define MAP_FW_NS_HANDOFF MAP_REGION_FLAT(FW_NS_HANDOFF_BASE, \ + FW_HANDOFF_SIZE, \ + MT_MEMORY | MT_RW | MT_NS) +#endif +#endif + /* * Table of memory regions for various BL stages to map using the MMU. * This doesn't include Trusted SRAM as setup_page_tables() already takes care @@ -182,6 +190,9 @@ const mmap_region_t plat_arm_mmap[] = { #if ENABLE_RME ARM_MAP_GPT_L1_DRAM, ARM_MAP_EL3_RMM_SHARED_MEM, +#endif +#ifdef MAP_FW_NS_HANDOFF + MAP_FW_NS_HANDOFF, #endif {0} }; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_common_measured_boot.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_common_measured_boot.c similarity index 68% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_common_measured_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_common_measured_boot.c index 0c1d5e706..d56f510fc 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_common_measured_boot.c +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_common_measured_boot.c @@ -19,7 +19,6 @@ extern struct rss_mboot_metadata fvp_rss_mboot_metadata[]; int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data) { int err; - int rc = 0; /* Calculate image hash and record data in Event Log */ err = event_log_measure_and_record(image_data->image_base, @@ -29,26 +28,14 @@ int plat_mboot_measure_image(unsigned int image_id, image_info_t *image_data) if (err != 0) { ERROR("%s%s image id %u (%i)\n", "Failed to ", "record in event log", image_id, err); - rc = err; + return err; } - /* Calculate image hash and record data in RSS */ - err = rss_mboot_measure_and_record(fvp_rss_mboot_metadata, - image_data->image_base, - image_data->image_size, - image_id); - if (err != 0) { - ERROR("%s%s image id %u (%i)\n", - "Failed to ", "record in RSS", image_id, err); - rc = (rc == 0) ? err : -1; - } - - return rc; + return 0; } int plat_mboot_measure_key(const void *pk_oid, const void *pk_ptr, size_t pk_len) { - return rss_mboot_set_signer_id(fvp_rss_mboot_metadata, pk_oid, pk_ptr, - pk_len); + return 0; } diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_console.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_console.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_console.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_cpu_errata.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_cpu_errata.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_cpu_errata.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_cpu_errata.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_def.h b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_def.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_addr.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_addr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_addr.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_addr.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_dma_prot.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_dma_prot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_dma_prot.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_dma_prot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_err.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_err.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_measurement.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_measurement.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_measurement.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_measurement.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_stub.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_stub.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_drtm_stub.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_drtm_stub.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_el3_spmc.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_el3_spmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_el3_spmc.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_el3_spmc.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_el3_spmc_logical_sp.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_el3_spmc_logical_sp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_el3_spmc_logical_sp.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_el3_spmc_logical_sp.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_err.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_err.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_gicv3.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_gicv3.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_io_storage.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_io_storage.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_io_storage.c diff --git a/atf-20231013-0ea67d76a/lib/psa/delegated_attestation.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_plat_attest_token.c similarity index 57% rename from atf-20231013-0ea67d76a/lib/psa/delegated_attestation.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_plat_attest_token.c index a813e84a6..5fb3141c4 100644 --- a/atf-20231013-0ea67d76a/lib/psa/delegated_attestation.c +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_plat_attest_token.c @@ -1,92 +1,15 @@ /* - * Copyright (c) 2022-2023, Arm Limited. All rights reserved. + * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause - * */ +#include #include -#include -#include -#include +#include -#if !PLAT_RSS_NOT_SUPPORTED -psa_status_t -rss_delegated_attest_get_delegated_key(uint8_t ecc_curve, - uint32_t key_bits, - uint8_t *key_buf, - size_t key_buf_size, - size_t *key_size, - uint32_t hash_algo) -{ - psa_status_t status; - psa_invec in_vec[] = { - {&ecc_curve, sizeof(ecc_curve)}, - {&key_bits, sizeof(key_bits)}, - {&hash_algo, sizeof(hash_algo)} - }; - psa_outvec out_vec[] = { - {key_buf, key_buf_size} - }; - - if (key_size == NULL) { - return PSA_ERROR_INVALID_ARGUMENT; - } - - status = psa_call(RSS_DELEGATED_SERVICE_HANDLE, - RSS_DELEGATED_ATTEST_GET_DELEGATED_KEY, - in_vec, IOVEC_LEN(in_vec), - out_vec, IOVEC_LEN(out_vec)); - if (status == PSA_SUCCESS) { - *key_size = out_vec[0].len; - } - - return status; -} - -psa_status_t -rss_delegated_attest_get_token(const uint8_t *dak_pub_hash, - size_t dak_pub_hash_size, - uint8_t *token_buf, - size_t token_buf_size, - size_t *token_size) -{ - psa_status_t status; - psa_invec in_vec[] = { - {dak_pub_hash, dak_pub_hash_size} - }; - psa_outvec out_vec[] = { - {token_buf, token_buf_size} - }; - - if (token_size == NULL) { - return PSA_ERROR_INVALID_ARGUMENT; - } - - status = psa_call(RSS_DELEGATED_SERVICE_HANDLE, - RSS_DELEGATED_ATTEST_GET_PLATFORM_TOKEN, - in_vec, IOVEC_LEN(in_vec), - out_vec, IOVEC_LEN(out_vec)); - if (status == PSA_SUCCESS) { - *token_size = out_vec[0].len; - } - - return status; -} - - -#else /* !PLAT_RSS_NOT_SUPPORTED */ - -static const uint8_t delegated_key[] = { - 0x20, 0x11, 0xC7, 0xF0, 0x3C, 0xEE, 0x43, 0x25, 0x17, 0x6E, - 0x52, 0x4F, 0x03, 0x3C, 0x0C, 0xE1, 0xE2, 0x1A, 0x76, 0xE6, - 0xC1, 0xA4, 0xF0, 0xB8, 0x39, 0xAA, 0x1D, 0xF6, 0x1E, 0x0E, - 0x8A, 0x5C, 0x8A, 0x05, 0x74, 0x0F, 0x9B, 0x69, 0xEF, 0xA7, - 0xEB, 0x1A, 0x41, 0x85, 0xBD, 0x11, 0x7F, 0x68 -}; - -static const uint8_t platform_token[] = { +static const uint8_t sample_platform_token[] = { 0xD2, 0x84, 0x44, 0xA1, 0x01, 0x38, 0x22, 0xA0, 0x59, 0x02, 0x33, 0xA9, 0x19, 0x01, 0x09, 0x78, 0x1C, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, @@ -173,44 +96,23 @@ static const uint8_t platform_token[] = { 0x75, 0x96, 0x90, 0x6A, 0xF9, 0x4E, 0xDA, 0x30 }; -psa_status_t -rss_delegated_attest_get_delegated_key(uint8_t ecc_curve, - uint32_t key_bits, - uint8_t *key_buf, - size_t key_buf_size, - size_t *key_size, - uint32_t hash_algo) +/* + * Get the hardcoded platform attestation token as FVP does not support + * RSS. + */ +int plat_rmmd_get_cca_attest_token(uintptr_t buf, size_t *len, + uintptr_t hash, size_t hash_size) { - (void)ecc_curve; - (void)key_bits; - (void)hash_algo; + (void)hash; + (void)hash_size; - if (key_buf_size < sizeof(delegated_key)) { - return PSA_ERROR_BUFFER_TOO_SMALL; + if (*len < sizeof(sample_platform_token)) { + return -EINVAL; } - (void)memcpy(key_buf, delegated_key, sizeof(delegated_key)); - *key_size = sizeof(delegated_key); + (void)memcpy((void *)buf, (const void *)sample_platform_token, + sizeof(sample_platform_token)); + *len = sizeof(sample_platform_token); - return PSA_SUCCESS; + return 0; } -psa_status_t -rss_delegated_attest_get_token(const uint8_t *dak_pub_hash, - size_t dak_pub_hash_size, - uint8_t *token_buf, - size_t token_buf_size, - size_t *token_size) -{ - (void)dak_pub_hash; - (void)dak_pub_hash_size; - - if (token_buf_size < sizeof(platform_token)) { - return PSA_ERROR_BUFFER_TOO_SMALL; - } - - (void)memcpy(token_buf, platform_token, sizeof(platform_token)); - *token_size = sizeof(platform_token); - - return PSA_SUCCESS; -} -#endif /* !PLAT_RSS_NOT_SUPPORTED */ diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_pm.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_private.h b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_private.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_private.h diff --git a/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_realm_attest_key.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_realm_attest_key.c new file mode 100644 index 000000000..fe0cde725 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_realm_attest_key.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include + +#include + +static const uint8_t sample_delegated_key[] = { + 0x20, 0x11, 0xC7, 0xF0, 0x3C, 0xEE, 0x43, 0x25, 0x17, 0x6E, + 0x52, 0x4F, 0x03, 0x3C, 0x0C, 0xE1, 0xE2, 0x1A, 0x76, 0xE6, + 0xC1, 0xA4, 0xF0, 0xB8, 0x39, 0xAA, 0x1D, 0xF6, 0x1E, 0x0E, + 0x8A, 0x5C, 0x8A, 0x05, 0x74, 0x0F, 0x9B, 0x69, 0xEF, 0xA7, + 0xEB, 0x1A, 0x41, 0x85, 0xBD, 0x11, 0x7F, 0x68 +}; + +/* + * Get the hardcoded delegated realm attestation key as FVP + * does not support RSS. + */ +int plat_rmmd_get_cca_realm_attest_key(uintptr_t buf, size_t *len, + unsigned int type) +{ + if (*len < sizeof(sample_delegated_key)) { + return -EINVAL; + } + + (void)memcpy((void *)buf, (const void *)sample_delegated_key, + sizeof(sample_delegated_key)); + *len = sizeof(sample_delegated_key); + + return 0; +} diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_security.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_security.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_spmd.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_spmd.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_spmd.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_spmd.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_spmd_logical_sp.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_spmd_logical_sp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_spmd_logical_sp.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_spmd_logical_sp.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_stack_protector.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_stack_protector.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_sync_traps.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_sync_traps.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_sync_traps.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_sync_traps.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_topology.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/fvp_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/fvp_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/include/fconf_hw_config_getter.h b/atf-20240117-bacca82a8/plat/arm/board/fvp/include/fconf_hw_config_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/include/fconf_hw_config_getter.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp/include/fconf_hw_config_getter.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/include/fconf_nt_config_getter.h b/atf-20240117-bacca82a8/plat/arm/board/fvp/include/fconf_nt_config_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/include/fconf_nt_config_getter.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp/include/fconf_nt_config_getter.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/include/fvp_critical_data.h b/atf-20240117-bacca82a8/plat/arm/board/fvp/include/fvp_critical_data.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/include/fvp_critical_data.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp/include/fvp_critical_data.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/include/plat.ld.S b/atf-20240117-bacca82a8/plat/arm/board/fvp/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/board/fvp/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/fvp/include/platform_def.h similarity index 98% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp/include/platform_def.h index 826fca290..aad04173b 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/include/platform_def.h @@ -128,6 +128,11 @@ */ #define PLAT_ARM_NS_IMAGE_BASE (ARM_DRAM1_BASE + UL(0x8000000)) +#if TRANSFER_LIST +#define FW_HANDOFF_SIZE 0x4000 +#define FW_NS_HANDOFF_BASE (PLAT_ARM_NS_IMAGE_BASE - FW_HANDOFF_SIZE) +#endif + /* * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the * plat_arm_mmap array defined for each BL stage. @@ -188,8 +193,10 @@ defined(IMAGE_BL2) && MEASURED_BOOT /* * PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size * plus a little space for growth. + * In case of PSA Crypto API, few algorithms like ECDSA needs bigger BL1 RW + * area. */ -#if TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA +#if TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA || PSA_CRYPTO #define PLAT_ARM_MAX_BL1_RW_SIZE UL(0xC000) #else #define PLAT_ARM_MAX_BL1_RW_SIZE UL(0xB000) diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/jmptbl.i b/atf-20240117-bacca82a8/plat/arm/board/fvp/jmptbl.i similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/jmptbl.i rename to atf-20240117-bacca82a8/plat/arm/board/fvp/jmptbl.i diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp/platform.mk similarity index 91% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp/platform.mk index 3c02485f6..df26dd7f1 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp/platform.mk @@ -28,6 +28,9 @@ FVP_DT_PREFIX := fvp-base-gicv3-psci # the FVP platform. This option defaults to 256. FVP_TRUSTED_SRAM_SIZE := 256 +# Macro to enable helpers for running SPM tests. Disabled by default. +PLAT_TEST_SPM := 0 + # This is a very trickly TEMPORARY fix. Enabling ALL features exceeds BL31's # progbits limit. We need a way to build all useful configurations while waiting # on the fvp to increase its SRAM size. The problem is twofild: @@ -50,11 +53,9 @@ ifneq (${SPD}, tspd) ENABLE_FEAT_AMU := 2 ENABLE_FEAT_AMUv1p1 := 2 ENABLE_FEAT_HCX := 2 - ENABLE_MPAM_FOR_LOWER_ELS := 2 ENABLE_FEAT_RNG := 2 ENABLE_FEAT_TWED := 2 ENABLE_FEAT_GCS := 2 - ENABLE_FEAT_RAS := 2 ifeq (${ARCH}, aarch64) ifneq (${SPD}, spmd) ifeq (${SPM_MM}, 0) @@ -69,11 +70,9 @@ endif # enable unconditionally for all builds ifeq (${ARCH}, aarch64) -ifeq (${ENABLE_RME},0) - ENABLE_BRBE_FOR_NS := 2 + ENABLE_BRBE_FOR_NS := 2 + ENABLE_TRBE_FOR_NS := 2 endif -endif -ENABLE_TRBE_FOR_NS := 2 ENABLE_SYS_REG_TRACE_FOR_NS := 2 ENABLE_FEAT_CSV2_2 := 2 ENABLE_FEAT_DIT := 2 @@ -213,7 +212,8 @@ else lib/cpus/aarch64/neoverse_e1.S \ lib/cpus/aarch64/cortex_x2.S \ lib/cpus/aarch64/cortex_gelas.S \ - lib/cpus/aarch64/nevis.S + lib/cpus/aarch64/nevis.S \ + lib/cpus/aarch64/travis.S endif # AArch64/AArch32 cores FVP_CPU_LIBS += lib/cpus/aarch64/cortex_a55.S \ @@ -267,11 +267,6 @@ BL2_SOURCES += plat/arm/board/fvp/aarch64/fvp_helpers.S BL31_SOURCES += plat/arm/board/fvp/fvp_plat_attest_token.c \ plat/arm/board/fvp/fvp_realm_attest_key.c - -# FVP platform does not support RSS, but it can leverage RSS APIs to -# provide hardcoded token/key on request. -BL31_SOURCES += lib/psa/delegated_attestation.c - endif ifeq (${ENABLE_FEAT_RNG_TRAP},1) @@ -356,6 +351,10 @@ FVP_TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_tsp_fw_config.dtb $(eval $(call TOOL_ADD_PAYLOAD,${FVP_TOS_FW_CONFIG},--tos-fw-config,${FVP_TOS_FW_CONFIG})) endif +ifeq (${TRANSFER_LIST}, 1) +include lib/transfer_list/transfer_list.mk +endif + ifeq (${SPD},spmd) ifeq ($(ARM_SPMC_MANIFEST_DTS),) @@ -398,8 +397,12 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a75_pubsub.c \ endif endif -ifeq (${RAS_FFH_SUPPORT},1) +ifeq (${HANDLE_EA_EL3_FIRST_NS},1) +ifeq (${ENABLE_FEAT_RAS},1) BL31_SOURCES += plat/arm/board/fvp/aarch64/fvp_ras.c +else +BL31_SOURCES += plat/arm/board/fvp/aarch64/fvp_ea.c +endif endif ifneq (${ENABLE_STACK_PROTECTOR},0) @@ -437,10 +440,6 @@ ifneq (${RESET_TO_BL2}, 0) override BL1_SOURCES = endif -# RSS is not supported on FVP right now. Thus, we use the mocked version -# of the provided PSA APIs. They return with success and hard-coded token/key. -PLAT_RSS_NOT_SUPPORTED := 1 - # Include Measured Boot makefile before any Crypto library makefile. # Crypto library makefile may need default definitions of Measured Boot build # flags present in Measured Boot makefile. @@ -468,23 +467,6 @@ BL1_SOURCES += plat/arm/board/fvp/fvp_common_measured_boot.c \ BL2_SOURCES += plat/arm/board/fvp/fvp_common_measured_boot.c \ plat/arm/board/fvp/fvp_bl2_measured_boot.c \ lib/psa/measured_boot.c - -# Even though RSS is not supported on FVP (see above), we support overriding -# PLAT_RSS_NOT_SUPPORTED from the command line, just for the purpose of building -# the code to detect any build regressions. The resulting firmware will not be -# functional. -ifneq (${PLAT_RSS_NOT_SUPPORTED},1) - $(warning "RSS is not supported on FVP. The firmware will not be functional.") - include drivers/arm/rss/rss_comms.mk - BL1_SOURCES += ${RSS_COMMS_SOURCES} - BL2_SOURCES += ${RSS_COMMS_SOURCES} - BL31_SOURCES += ${RSS_COMMS_SOURCES} - - BL1_CFLAGS += -DPLAT_RSS_COMMS_PAYLOAD_MAX_SIZE=0 - BL2_CFLAGS += -DPLAT_RSS_COMMS_PAYLOAD_MAX_SIZE=0 - BL31_CFLAGS += -DPLAT_RSS_COMMS_PAYLOAD_MAX_SIZE=0 -endif - endif ifeq (${DRTM_SUPPORT}, 1) @@ -519,19 +501,25 @@ endif # Test specific macros, keep them at bottom of this file $(eval $(call add_define,PLATFORM_TEST_EA_FFH)) ifeq (${PLATFORM_TEST_EA_FFH}, 1) - ifeq (${HANDLE_EA_EL3_FIRST_NS}, 0) - $(error "PLATFORM_TEST_EA_FFH expects HANDLE_EA_EL3_FIRST_NS to be 1") + ifeq (${FFH_SUPPORT}, 0) + $(error "PLATFORM_TEST_EA_FFH expects FFH_SUPPORT to be 1") endif -BL31_SOURCES += plat/arm/board/fvp/aarch64/fvp_ea.c + endif $(eval $(call add_define,PLATFORM_TEST_RAS_FFH)) ifeq (${PLATFORM_TEST_RAS_FFH}, 1) - ifeq (${RAS_EXTENSION}, 0) - $(error "PLATFORM_TEST_RAS_FFH expects RAS_EXTENSION to be 1") + ifeq (${ENABLE_FEAT_RAS}, 0) + $(error "PLATFORM_TEST_RAS_FFH expects ENABLE_FEAT_RAS to be 1") + endif + ifeq (${HANDLE_EA_EL3_FIRST_NS}, 0) + $(error "PLATFORM_TEST_RAS_FFH expects HANDLE_EA_EL3_FIRST_NS to be 1") endif endif ifeq (${ERRATA_ABI_SUPPORT}, 1) include plat/arm/board/fvp/fvp_cpu_errata.mk endif + +# Build macro necessary for running SPM tests on FVP platform +$(eval $(call add_define,PLAT_TEST_SPM)) diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/sp_min/fvp_sp_min_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/sp_min/fvp_sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/sp_min/fvp_sp_min_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/sp_min/fvp_sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/sp_min/sp_min-fvp.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp/sp_min/sp_min-fvp.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/sp_min/sp_min-fvp.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp/sp_min/sp_min-fvp.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/trp/trp-fvp.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp/trp/trp-fvp.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/trp/trp-fvp.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp/trp/trp-fvp.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/tsp/fvp_tsp_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp/tsp/fvp_tsp_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/tsp/fvp_tsp_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp/tsp/fvp_tsp_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp/tsp/tsp-fvp.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp/tsp/tsp-fvp.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp/tsp/tsp-fvp.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp/tsp/tsp-fvp.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_arch_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_entrypoint.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_exceptions.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_main.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_main.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_main.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_main.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_setup.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_setup.c index a64292959..6a7c0c808 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_bl1_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_bl1_setup.c @@ -104,9 +104,6 @@ void arm_bl1_plat_arch_setup(void) #if USE_ROMLIB ARM_MAP_ROMLIB_CODE, ARM_MAP_ROMLIB_DATA, -#endif -#if ARM_CRYPTOCELL_INTEG - ARM_MAP_BL_COHERENT_RAM, #endif /* DRAM1_region: */ MAP_REGION_FLAT( diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_common.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_common.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_common.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_context_mgmt.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_context_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_context_mgmt.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_context_mgmt.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_debug.S b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_debug.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_debug.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_debug.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_def.h b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_def.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_err.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_err.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_io_storage.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_io_storage.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_misc_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_misc_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_misc_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_misc_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_private.h b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_private.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_private.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_stack_protector.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_stack_protector.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/fvp_r_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/fvp_r_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/include/fvp_r_arch_helpers.h b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/include/fvp_r_arch_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/include/fvp_r_arch_helpers.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/include/fvp_r_arch_helpers.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_r/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp_r/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_r/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp_r/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/aarch32/fvp_ve_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/aarch32/fvp_ve_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/aarch32/fvp_ve_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/aarch32/fvp_ve_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fdts/fvp_ve_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fdts/fvp_ve_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c similarity index 90% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c index 4ccae27a2..cc29f36c5 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_bl2_setup.c @@ -39,3 +39,8 @@ void bl2_platform_setup(void) generic_delay_timer_init(); #endif /* USE_SP804_TIMER */ } + +int bl2_plat_handle_post_image_load(unsigned int image_id) +{ + return arm_bl2_plat_handle_post_image_load(image_id); +} diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_common.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_common.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_common.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_def.h b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_def.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_err.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_err.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_pm.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_private.h b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_private.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_private.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_security.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_security.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_topology.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/fvp_ve_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/fvp_ve_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/sp_min/fvp_ve_sp_min_setup.c b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/sp_min/fvp_ve_sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/sp_min/fvp_ve_sp_min_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/sp_min/fvp_ve_sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/sp_min/sp_min-fvp_ve.mk b/atf-20240117-bacca82a8/plat/arm/board/fvp_ve/sp_min/sp_min-fvp_ve.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/fvp_ve/sp_min/sp_min-fvp_ve.mk rename to atf-20240117-bacca82a8/plat/arm/board/fvp_ve/sp_min/sp_min-fvp_ve.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/aarch32/juno_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/juno/aarch32/juno_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/aarch32/juno_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/juno/aarch32/juno_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/aarch64/juno_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/juno/aarch64/juno_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/aarch64/juno_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/juno/aarch64/juno_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/cert_create_tbbr.mk b/atf-20240117-bacca82a8/plat/arm/board/juno/cert_create_tbbr.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/cert_create_tbbr.mk rename to atf-20240117-bacca82a8/plat/arm/board/juno/cert_create_tbbr.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/juno_tbb_cert.h b/atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/juno_tbb_cert.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/juno_tbb_cert.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/juno_tbb_cert.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/juno_tbb_ext.h b/atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/juno_tbb_ext.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/juno_tbb_ext.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/juno_tbb_ext.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/juno_tbb_key.h b/atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/juno_tbb_key.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/juno_tbb_key.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/juno_tbb_key.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/platform_oid.h b/atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/platform_oid.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/include/platform_oid.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/certificate/include/platform_oid.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/src/juno_tbb_cert.c b/atf-20240117-bacca82a8/plat/arm/board/juno/certificate/src/juno_tbb_cert.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/src/juno_tbb_cert.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/certificate/src/juno_tbb_cert.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/src/juno_tbb_ext.c b/atf-20240117-bacca82a8/plat/arm/board/juno/certificate/src/juno_tbb_ext.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/src/juno_tbb_ext.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/certificate/src/juno_tbb_ext.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/src/juno_tbb_key.c b/atf-20240117-bacca82a8/plat/arm/board/juno/certificate/src/juno_tbb_key.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/certificate/src/juno_tbb_key.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/certificate/src/juno_tbb_key.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/fdts/juno_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/juno/fdts/juno_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/fdts/juno_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/juno/fdts/juno_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/fdts/juno_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/juno/fdts/juno_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/fdts/juno_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/juno/fdts/juno_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/fip/plat_def_fip_uuid.h b/atf-20240117-bacca82a8/plat/arm/board/juno/fip/plat_def_fip_uuid.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/fip/plat_def_fip_uuid.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/fip/plat_def_fip_uuid.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/fip/plat_def_uuid_config.c b/atf-20240117-bacca82a8/plat/arm/board/juno/fip/plat_def_uuid_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/fip/plat_def_uuid_config.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/fip/plat_def_uuid_config.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/board/juno/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/board/juno/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/include/plat_tbbr_img_def.h b/atf-20240117-bacca82a8/plat/arm/board/juno/include/plat_tbbr_img_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/include/plat_tbbr_img_def.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/include/plat_tbbr_img_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/juno/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/include/platform_def.h index aa960384b..5c9a7a3af 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/juno/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/arm/board/juno/include/platform_def.h @@ -32,9 +32,6 @@ #define PLATFORM_CORE_COUNT (JUNO_CLUSTER0_CORE_COUNT + \ JUNO_CLUSTER1_CORE_COUNT) -/* Cryptocell HW Base address */ -#define PLAT_CRYPTOCELL_BASE UL(0x60050000) - /* * Other platform porting definitions are provided by included headers */ diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/jmptbl.i b/atf-20240117-bacca82a8/plat/arm/board/juno/jmptbl.i similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/jmptbl.i rename to atf-20240117-bacca82a8/plat/arm/board/juno/jmptbl.i diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_common.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_common.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_common.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_def.h b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_def.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_err.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_err.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_ethosn_tzmp1_def.h b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_ethosn_tzmp1_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_ethosn_tzmp1_def.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_ethosn_tzmp1_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_pm.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_security.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_security.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_stack_protector.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_stack_protector.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_tbbr_cot_bl2.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_tbbr_cot_bl2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_tbbr_cot_bl2.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_tbbr_cot_bl2.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_topology.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_trng.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_trng.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_trng.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_trng.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_trusted_boot.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_trusted_boot.c index 25a74705d..c730406d6 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_trusted_boot.c +++ b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_trusted_boot.c @@ -8,7 +8,6 @@ #include #include -#include #include #include #include @@ -109,10 +108,6 @@ static int juno_get_rotpk_info_regs(void **key_ptr, unsigned int *key_len, int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len, unsigned int *flags) { -#if ARM_CRYPTOCELL_INTEG - return arm_get_rotpk_info_cc(key_ptr, key_len, flags); -#else - #if (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_RSA_ID) || \ (ARM_ROTPK_LOCATION_ID == ARM_ROTPK_DEVEL_ECDSA_ID) return arm_get_rotpk_info_dev(key_ptr, key_len, flags); @@ -121,6 +116,4 @@ int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len, #else return 1; #endif - -#endif /* ARM_CRYPTOCELL_INTEG */ } diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/juno_tzmp1_def.h b/atf-20240117-bacca82a8/plat/arm/board/juno/juno_tzmp1_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/juno_tzmp1_def.h rename to atf-20240117-bacca82a8/plat/arm/board/juno/juno_tzmp1_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/juno/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/juno/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/sp_min/sp_min-juno.mk b/atf-20240117-bacca82a8/plat/arm/board/juno/sp_min/sp_min-juno.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/sp_min/sp_min-juno.mk rename to atf-20240117-bacca82a8/plat/arm/board/juno/sp_min/sp_min-juno.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/juno/tsp/tsp-juno.mk b/atf-20240117-bacca82a8/plat/arm/board/juno/tsp/tsp-juno.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/juno/tsp/tsp-juno.mk rename to atf-20240117-bacca82a8/plat/arm/board/juno/tsp/tsp-juno.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/aarch64/morello_helper.S b/atf-20240117-bacca82a8/plat/arm/board/morello/aarch64/morello_helper.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/aarch64/morello_helper.S rename to atf-20240117-bacca82a8/plat/arm/board/morello/aarch64/morello_helper.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/fdts/morello_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/morello/fdts/morello_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/fdts/morello_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/morello/fdts/morello_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/fdts/morello_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/morello/fdts/morello_nt_fw_config.dts similarity index 52% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/fdts/morello_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/morello/fdts/morello_nt_fw_config.dts index e730d3410..6ec282db3 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/morello/fdts/morello_nt_fw_config.dts +++ b/atf-20240117-bacca82a8/plat/arm/board/morello/fdts/morello_nt_fw_config.dts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Arm Limited. All rights reserved. + * Copyright (c) 2021-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -23,4 +23,19 @@ scc-config = <0x0>; #endif }; + + /* + * Placeholder for firmware-version node with default values. + * The value will be set to the correct values during + * the BL2 stage of boot. + */ + firmware-version { +#ifdef TARGET_PLATFORM_SOC + mcc-fw-version = <0x0>; + pcc-fw-version = <0x0>; +#endif + scp-fw-version = <0x0>; + scp-fw-commit = <0x0>; + tfa-fw-version = "unknown-dirty_00000000"; + }; }; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/fdts/morello_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/morello/fdts/morello_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/fdts/morello_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/morello/fdts/morello_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/board/morello/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/board/morello/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/morello/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/morello/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_def.h b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_def.h similarity index 76% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_def.h rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_def.h index e42a03c36..25122e647 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_def.h +++ b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_def.h @@ -15,6 +15,15 @@ MORELLO_NS_SRAM_SIZE, \ MT_DEVICE | MT_RW | MT_SECURE) +/* SDS Firmware version defines */ +#define MORELLO_SDS_FIRMWARE_VERSION_STRUCT_ID U(2) +#define MORELLO_SDS_FIRMWARE_VERSION_OFFSET U(0) +#ifdef TARGET_PLATFORM_FVP +# define MORELLO_SDS_FIRMWARE_VERSION_SIZE U(8) +#else +# define MORELLO_SDS_FIRMWARE_VERSION_SIZE U(16) +#endif + /* SDS Platform information defines */ #define MORELLO_SDS_PLATFORM_INFO_STRUCT_ID U(8) #define MORELLO_SDS_PLATFORM_INFO_OFFSET U(0) @@ -122,8 +131,40 @@ struct morello_plat_info { } __packed; #endif -/* Compile time assertion to ensure the size of structure is of the required bytes */ +/* SDS Firmware revision struct definition */ +#ifdef TARGET_PLATFORM_FVP +/* + * Firmware revision structure stored in SDS. + * This structure holds information about firmware versions. + * - SCP firmware version + * - SCP firmware commit + */ +struct morello_firmware_version { + uint32_t scp_fw_ver; + uint32_t scp_fw_commit; +} __packed; +#else +/* + * Firmware revision structure stored in SDS. + * This structure holds information about firmware versions. + * - SCP firmware version + * - SCP firmware commit + * - MCC firmware version + * - PCC firmware version + */ +struct morello_firmware_version { + uint32_t scp_fw_ver; + uint32_t scp_fw_commit; + uint32_t mcc_fw_ver; + uint32_t pcc_fw_ver; +} __packed; +#endif + +/* Compile time assertions to ensure the size of structures are of the required bytes */ CASSERT(sizeof(struct morello_plat_info) == MORELLO_SDS_PLATFORM_INFO_SIZE, assert_invalid_plat_info_size); +CASSERT(sizeof(struct morello_firmware_version) == MORELLO_SDS_FIRMWARE_VERSION_SIZE, + assert_invalid_firmware_version_size); + #endif /* MORELLO_DEF_H */ diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_err.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_err.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_image_load.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_image_load.c similarity index 61% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_image_load.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_image_load.c index b5d9bd54e..4ea2bb301 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_image_load.c +++ b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_image_load.c @@ -23,7 +23,8 @@ static inline uint64_t get_mem_client_mode(uint64_t size) } /******************************************************************************* - * This function inserts Platform information via device tree nodes as, + * This function inserts Platform information and firmware versions + * via device tree nodes as, * platform-info { * local-ddr-size = <0x0 0x0>; *#ifdef TARGET_PLATFORM_SOC @@ -33,12 +34,22 @@ static inline uint64_t get_mem_client_mode(uint64_t size) * scc-config = <0x0>; *#endif * }; + * firmware-version { + *#ifdef TARGET_PLATFORM_SOC + * mcc-fw-version = <0x0>; + * pcc-fw-version = <0x0>; + *#endif + * scp-fw-version = <0x0>; + * scp-fw-commit = <0x0>; + * tfa-fw-version = "unknown-dirty_00000000"; + * }; ******************************************************************************/ -static int plat_morello_append_config_node(struct morello_plat_info *plat_info) +static int plat_morello_append_config_node(struct morello_plat_info *plat_info, + struct morello_firmware_version *fw_version) { bl_mem_params_node_t *mem_params; void *fdt; - int nodeoffset, err; + int nodeoffset_plat, nodeoffset_fw, err; uint64_t usable_mem_size; usable_mem_size = plat_info->local_ddr_size; @@ -57,35 +68,41 @@ static int plat_morello_append_config_node(struct morello_plat_info *plat_info) return -1; } - nodeoffset = fdt_subnode_offset(fdt, 0, "platform-info"); - if (nodeoffset < 0) { + nodeoffset_plat = fdt_subnode_offset(fdt, 0, "platform-info"); + if (nodeoffset_plat < 0) { ERROR("NT_FW_CONFIG: Failed to get platform-info node offset\n"); return -1; } + nodeoffset_fw = fdt_subnode_offset(fdt, 0, "firmware-version"); + if (nodeoffset_fw < 0) { + ERROR("NT_FW_CONFIG: Failed to get firmware-version node offset\n"); + return -1; + } + #ifdef TARGET_PLATFORM_SOC - err = fdt_setprop_u64(fdt, nodeoffset, "remote-ddr-size", + err = fdt_setprop_u64(fdt, nodeoffset_plat, "remote-ddr-size", plat_info->remote_ddr_size); if (err < 0) { ERROR("NT_FW_CONFIG: Failed to set remote-ddr-size\n"); return -1; } - err = fdt_setprop_u32(fdt, nodeoffset, "remote-chip-count", + err = fdt_setprop_u32(fdt, nodeoffset_plat, "remote-chip-count", plat_info->remote_chip_count); if (err < 0) { ERROR("NT_FW_CONFIG: Failed to set remote-chip-count\n"); return -1; } - err = fdt_setprop_u32(fdt, nodeoffset, "multichip-mode", + err = fdt_setprop_u32(fdt, nodeoffset_plat, "multichip-mode", plat_info->multichip_mode); if (err < 0) { ERROR("NT_FW_CONFIG: Failed to set multichip-mode\n"); return -1; } - err = fdt_setprop_u32(fdt, nodeoffset, "scc-config", + err = fdt_setprop_u32(fdt, nodeoffset_plat, "scc-config", plat_info->scc_config); if (err < 0) { ERROR("NT_FW_CONFIG: Failed to set scc-config\n"); @@ -95,8 +112,41 @@ static int plat_morello_append_config_node(struct morello_plat_info *plat_info) if (plat_info->scc_config & MORELLO_SCC_CLIENT_MODE_MASK) { usable_mem_size = get_mem_client_mode(plat_info->local_ddr_size); } + + err = fdt_setprop_u32(fdt, nodeoffset_fw, "mcc-fw-version", + fw_version->mcc_fw_ver); + if (err < 0) { + ERROR("NT_FW_CONFIG: Failed to set mcc-fw-version\n"); + return -1; + } + + err = fdt_setprop_u32(fdt, nodeoffset_fw, "pcc-fw-version", + fw_version->pcc_fw_ver); + if (err < 0) { + ERROR("NT_FW_CONFIG: Failed to set pcc-fw-version\n"); + return -1; + } #endif - err = fdt_setprop_u64(fdt, nodeoffset, "local-ddr-size", + err = fdt_setprop_u32(fdt, nodeoffset_fw, "scp-fw-version", + fw_version->scp_fw_ver); + if (err < 0) { + ERROR("NT_FW_CONFIG: Failed to set scp-fw-version\n"); + return -1; + } + + err = fdt_setprop_u32(fdt, nodeoffset_fw, "scp-fw-commit", + fw_version->scp_fw_commit); + if (err < 0) { + ERROR("NT_FW_CONFIG: Failed to set scp-fw-commit\n"); + return -1; + } + + err = fdt_setprop_string(fdt, nodeoffset_fw, "tfa-fw-version", version_string); + if (err < 0) { + WARN("NT_FW_CONFIG: Unable to set tfa-fw-version\n"); + } + + err = fdt_setprop_u64(fdt, nodeoffset_plat, "local-ddr-size", usable_mem_size); if (err < 0) { ERROR("NT_FW_CONFIG: Failed to set local-ddr-size\n"); @@ -115,6 +165,7 @@ bl_params_t *plat_get_next_bl_params(void) { int ret; struct morello_plat_info plat_info; + struct morello_firmware_version fw_version; ret = sds_init(); if (ret != SDS_OK) { @@ -132,6 +183,16 @@ bl_params_t *plat_get_next_bl_params(void) panic(); } + ret = sds_struct_read(MORELLO_SDS_FIRMWARE_VERSION_STRUCT_ID, + MORELLO_SDS_FIRMWARE_VERSION_OFFSET, + &fw_version, + MORELLO_SDS_FIRMWARE_VERSION_SIZE, + SDS_ACCESS_MODE_NON_CACHED); + if (ret != SDS_OK) { + ERROR("Error getting firmware version from SDS. ret:%d\n", ret); + panic(); + } + /* Validate plat_info SDS */ #ifdef TARGET_PLATFORM_FVP if (plat_info.local_ddr_size == 0U) { @@ -146,7 +207,7 @@ bl_params_t *plat_get_next_bl_params(void) panic(); } - ret = plat_morello_append_config_node(&plat_info); + ret = plat_morello_append_config_node(&plat_info, &fw_version); if (ret != 0) { panic(); } diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_interconnect.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_interconnect.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_interconnect.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_interconnect.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_plat.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_pm.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_private.h b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_private.h rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_private.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_security.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_security.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_topology.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/morello_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/morello/morello_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/morello_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/morello/morello_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/morello/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/morello/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/morello/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/morello/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/aarch64/n1sdp_helper.S b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/aarch64/n1sdp_helper.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/aarch64/n1sdp_helper.S rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/aarch64/n1sdp_helper.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_nt_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_optee_spmc_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_optee_spmc_manifest.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_optee_spmc_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_optee_spmc_manifest.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/fdts/n1sdp_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/fdts/n1sdp_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_def.h b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_def.h rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_err.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_err.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_image_load.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_image_load.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_interconnect.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_interconnect.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_interconnect.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_interconnect.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_plat.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_pm.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_pm.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_private.h b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_private.h rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_private.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_security.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_security.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_topology.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/n1sdp_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/n1sdp_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/platform.mk similarity index 96% rename from atf-20231013-0ea67d76a/plat/arm/board/n1sdp/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/n1sdp/platform.mk index bd6261454..f937ee709 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/n1sdp/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/n1sdp/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2022, Arm Limited. All rights reserved. +# Copyright (c) 2018-2023, Arm Limited. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -14,6 +14,10 @@ PLAT_INCLUDES := -I${N1SDP_BASE}/include N1SDP_CPU_SOURCES := lib/cpus/aarch64/neoverse_n1.S +# Neoverse N1 cores support Armv8.2 extensions +ARM_ARCH_MAJOR := 8 +ARM_ARCH_MINOR := 2 + # GIC-600 configuration GICV3_SUPPORT_GIC600 := 1 GICV3_IMPL_GIC600_MULTICHIP := 1 diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/fdts/rde1edge_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/fdts/rde1edge_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/fdts/rde1edge_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/fdts/rde1edge_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/fdts/rde1edge_nt_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/fdts/rde1edge_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/fdts/rde1edge_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/fdts/rde1edge_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/fdts/rde1edge_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_err.c b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_err.c rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_plat.c b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_security.c b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_security.c rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_topology.c b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rde1edge/rde1edge_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/rde1edge/rde1edge_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/fdts/rdn1edge_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/fdts/rdn1edge_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/fdts/rdn1edge_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/fdts/rdn1edge_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/fdts/rdn1edge_nt_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/fdts/rdn1edge_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/fdts/rdn1edge_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/fdts/rdn1edge_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/fdts/rdn1edge_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/platform.mk similarity index 96% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/platform.mk index 95753aafc..d8d12937a 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/platform.mk @@ -73,3 +73,6 @@ ifneq ($(CSS_SGI_PLATFORM_VARIANT),0) endif override CTX_INCLUDE_AARCH32_REGS := 0 + +# Enable the flag since RD-N1-EDGE has a system level cache +NEOVERSE_Nx_EXTERNAL_LLC := 1 diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_err.c b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_err.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_plat.c b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_security.c b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_security.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_topology.c b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn1edge/rdn1edge_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn1edge/rdn1edge_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/fdts/rdn2_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_fw_config.dts similarity index 67% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/fdts/rdn2_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_fw_config.dts index 9c9cefe87..d992eac14 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/fdts/rdn2_fw_config.dts +++ b/atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_fw_config.dts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2020-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -18,6 +18,12 @@ id = ; }; + tos_fw-config { + load-address = <0x0 0x04001500>; + max-size = <0x1000>; + id = ; + }; + nt_fw-config { load-address = <0x0 0xFEF00000>; max-size = <0x0100000>; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/fdts/rdn2_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/fdts/rdn2_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_nt_fw_config.dts diff --git a/atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_stmm_sel0_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_stmm_sel0_manifest.dts new file mode 100644 index 000000000..611970672 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_stmm_sel0_manifest.dts @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2023, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/dts-v1/; + +#include + +/ { +#define MODE_SEL0 (0x1) + +#define SECURE_RO 0x1 +#define SECURE_RW 0x3 +#define SECURE_EXECUTE_RO 0x5 +#define SECURE_EXECUTE_RW 0x7 +#define NON_SECURE_RO 0x9 +#define NON_SECURE_RW 0xB +#define NON_SECURE_EXECUTE_RO 0xD +#define NON_SECURE_EXECUTE_RW 0xF + /* + * FF-A compatible Secure Partition Manager parses the + * manifest file and fetch the following booting arguments to + * pass on to the StandAloneMM(StMM) Secure Partition. + */ + compatible = "arm,ffa-manifest-1.0"; + + description = "RDN2 StMM"; + ffa-version = <0x00010001>; /* 31:16 - Major, 15:0 - Minor */ + uuid = <0x378daedc 0xf06b4446 0x831440ab 0x933c87a3>; + id = <0x8001>; + execution-ctx-count = <1>; + exception-level = ; /* S-EL0 */ + execution-state = <0>; /* AArch64 */ + load-address = <0x0 0xFF200000>; + image-size = <0x0 0x280000>; + xlat-granule = <0>; /* 4KiB */ + boot-order = <0>; + messaging-method = <0x3>; /* Direct request/response supported. */ + power-management-messages = <0>; + gp-register-num = <0>; + + device-regions { + compatible = "arm,ffa-manifest-device-regions"; + + /* + * System registers region for access from S-EL0. + * Similar to PLAT_ARM_SECURE_MAP_SYSTEMREG. + */ + sys-regs { + base-address = <0x0 0x0C010000>; + pages-count = <0x10>; + attributes = ; + }; + + rtc { + base-address = <0x0 0x0C170000>; + pages-count = <0x1>; + attributes = ; + }; + + /* + * ARM CSS SoC Expansion Peripherals. + */ + soc_components { + base-address = <0x0 0x0E000000>; + pages-count = <0x2000>; + attributes = ; + }; + + cluster_utility { + base-address = <0x0 0x20000000>; + pages-count = <0x20000>; + attributes = ; + }; + + secure_uart { + base-address = <0x0 0x2A410000>; + pages-count = <0x10>; + attributes = ; + }; + + /* + * Used for Secure booting. + */ + nor_flash2 { + base-address = <0x10 0x54000000>; + pages-count = <0x4000>; + attributes = ; + }; + }; + + memory-regions { + compatible = "arm,ffa-manifest-memory-regions"; + + /* + * SPM Payload memory. Mapped as code region for S-EL0 + * Similar to ARM_SP_IMAGE_MMAP macro used for defining base of + * the SP image. + */ + stmm_region { + base-address = <0x0 0xff200000>; + pages-count = <0x300>; + /* StMM will remap the regions during runtime. */ + attributes = ; + }; + + /* + * Memory shared between EL3 SPMC and S-EL0. + */ + rx-tx-buffers { + description = "shared-buff"; + base-address = <0x0 0xff500000>; + pages-count = <0x100>; + attributes = ; + }; + + /* + * Memory shared between Normal world and S-EL0. + */ + ns_comm_buffer { + /* + * Description is needed for StMM to identify + * ns-communication buffer. + */ + description = "ns-comm"; + base-address = <0x0 0xff600000>; + pages-count = <0x30>; + attributes = ; + }; + + /* + * Heap used by SP to allocate memory for DMA. + */ + heap { + /* + * Description is needed for StMM to identify + * heap buffer. + */ + description = "heap"; + base-address = <0x0 0xFF630000>; + pages-count = <0x5D0>; + attributes = ; + }; + }; +}; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/fdts/rdn2_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/fdts/rdn2_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/fdts/rdn2_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/rdn2/include/platform_def.h similarity index 84% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/include/platform_def.h index ff1a4377f..2391b7254 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/arm/board/rdn2/include/platform_def.h @@ -102,4 +102,25 @@ #define PLAT_REBOOT_PRI GIC_HIGHEST_SEC_PRIORITY #define PLAT_EHF_DESC EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_REBOOT_PRI) +/* + * Number of Secure Partitions supported. + * SPMC at EL3, uses this count to configure the maximum number of supported + * secure partitions. + */ +#define SECURE_PARTITION_COUNT 1 + +/* + * Number of NWd Partitions supported. + * SPMC at EL3, uses this count to configure the maximum number of supported + * nwld partitions. + */ +#define NS_PARTITION_COUNT 1 + +/* + * Number of Logical Partitions supported. + * SPMC at EL3, uses this count to configure the maximum number of supported + * logical partitions. + */ +#define MAX_EL3_LP_DESCS_COUNT 1 + #endif /* PLATFORM_DEF_H */ diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/include/rdn2_ras.h b/atf-20240117-bacca82a8/plat/arm/board/rdn2/include/rdn2_ras.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/include/rdn2_ras.h rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/include/rdn2_ras.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/rdn2/platform.mk similarity index 76% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/platform.mk index 1506714b9..28ec5dc6e 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/rdn2/platform.mk @@ -69,7 +69,7 @@ BL31_SOURCES += drivers/arm/gic/v3/gic600_multichip.c BL31_CFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC endif -ifeq (${RAS_FFH_SUPPORT},1) +ifeq (${ENABLE_FEAT_RAS}-${HANDLE_EA_EL3_FIRST_NS},1-1) BL31_SOURCES += ${RDN2_BASE}/rdn2_ras.c \ ${CSS_ENT_BASE}/ras/sgi_ras_common.c \ ${CSS_ENT_BASE}/ras/sgi_ras_sram.c \ @@ -93,5 +93,37 @@ NT_FW_CONFIG := ${BUILD_PLAT}/fdts/${PLAT}_nt_fw_config.dtb # Add the NT_FW_CONFIG to FIP and specify the same to certtool $(eval $(call TOOL_ADD_PAYLOAD,${NT_FW_CONFIG},--nt-fw-config)) +STMM_CONFIG_DTS := ${RDN2_BASE}/fdts/${PLAT}_stmm_sel0_manifest.dts +FDT_SOURCES += ${STMM_CONFIG_DTS} +TOS_FW_CONFIG := ${BUILD_PLAT}/fdts/$(notdir $(basename ${STMM_CONFIG_DTS})).dtb + +# Add the TOS_FW_CONFIG to FIP and specify the same to certtool +$(eval $(call TOOL_ADD_PAYLOAD,${TOS_FW_CONFIG},--tos-fw-config,${TOS_FW_CONFIG})) + override CTX_INCLUDE_AARCH32_REGS := 0 override ENABLE_FEAT_AMU := 1 + +# Enable the flag since RD-N2 has a system level cache +NEOVERSE_Nx_EXTERNAL_LLC := 1 + +# Enable N2 CPU errata workarounds +ERRATA_N2_2002655 := 1 +ERRATA_N2_2009478 := 1 +ERRATA_N2_2067956 := 1 +ERRATA_N2_2025414 := 1 +ERRATA_N2_2189731 := 1 +ERRATA_N2_2138956 := 1 +ERRATA_N2_2138953 := 1 +ERRATA_N2_2242415 := 1 +ERRATA_N2_2138958 := 1 +ERRATA_N2_2242400 := 1 +ERRATA_N2_2280757 := 1 +ERRATA_N2_2326639 := 1 +ERRATA_N2_2340933 := 1 +ERRATA_N2_2346952 := 1 +ERRATA_N2_2376738 := 1 +ERRATA_N2_2388450 := 1 +ERRATA_N2_2743014 := 1 +ERRATA_N2_2743089 := 1 +ERRATA_N2_2728475 := 1 +ERRATA_N2_2779511 := 1 diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_err.c b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_err.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_plat.c b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_plat.c similarity index 79% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_plat.c index e8a967e00..2a6c658bc 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_plat.c +++ b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_plat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2020-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -136,8 +137,46 @@ void bl31_platform_setup(void) sgi_bl31_common_platform_setup(); -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT sgi_ras_platform_setup(&ras_config); #endif } #endif /* IMAGE_BL31 */ + +#if SPMC_AT_EL3 + +#define DATASTORE_SIZE 1024 + +__section("arm_el3_tzc_dram") uint8_t plat_spmc_shmem_datastore[DATASTORE_SIZE]; + +int plat_spmc_shmem_datastore_get(uint8_t **datastore, size_t *size) +{ + *datastore = plat_spmc_shmem_datastore; + *size = DATASTORE_SIZE; + return 0; +} + +/* + * Add dummy implementations of memory management related platform hooks. + * Memory share/lend operation are not required on RdN2 platform. + */ +int plat_spmc_shmem_begin(struct ffa_mtd *desc) +{ + return 0; +} + +int plat_spmc_shmem_reclaim(struct ffa_mtd *desc) +{ + return 0; +} + +int plat_spmd_handle_group0_interrupt(uint32_t intid) +{ + /* + * As of now, there are no sources of Group0 secure interrupt enabled + * for RDN2. + */ + (void)intid; + return -1; +} +#endif diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_ras.c b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_ras.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_ras.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_ras.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_security.c b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_security.c similarity index 97% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_security.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_security.c index b836a7f04..7cd4a1c81 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_security.c +++ b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_security.c @@ -15,7 +15,7 @@ static const arm_tzc_regions_info_t tzc_regions[] = { ARM_TZC_REGIONS_DEF, -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT RDN2_TZC_CPER_REGION, #endif {} diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_topology.c b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdn2/rdn2_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/rdn2/rdn2_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/fdts/rdv1_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdv1/fdts/rdv1_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/fdts/rdv1_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/fdts/rdv1_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/fdts/rdv1_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdv1/fdts/rdv1_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/fdts/rdv1_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/fdts/rdv1_nt_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/fdts/rdv1_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdv1/fdts/rdv1_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/fdts/rdv1_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/fdts/rdv1_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/rdv1/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/rdv1/platform.mk similarity index 96% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/platform.mk index a5fba6717..0b059b5e8 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/rdv1/platform.mk @@ -63,3 +63,6 @@ ifneq ($(CSS_SGI_PLATFORM_VARIANT),0) $(error "CSS_SGI_PLATFORM_VARIANT for RD-V1 should always be 0, \ currently set to ${CSS_SGI_PLATFORM_VARIANT}.") endif + +# Enable the flag since RD-V1 has a system level cache +NEOVERSE_Nx_EXTERNAL_LLC := 1 diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_err.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_err.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_plat.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_security.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_security.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_topology.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1/rdv1_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1/rdv1_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/fdts/rdv1mc_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/fdts/rdv1mc_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/fdts/rdv1mc_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/fdts/rdv1mc_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/fdts/rdv1mc_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/fdts/rdv1mc_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/fdts/rdv1mc_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/fdts/rdv1mc_nt_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/fdts/rdv1mc_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/fdts/rdv1mc_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/fdts/rdv1mc_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/fdts/rdv1mc_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/platform.mk similarity index 96% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/platform.mk index 92f7c101f..176e0efff 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/platform.mk @@ -74,3 +74,6 @@ ifneq ($(CSS_SGI_PLATFORM_VARIANT),0) $(error "CSS_SGI_PLATFORM_VARIANT for RD-V1-MC should always be 0, \ currently set to ${CSS_SGI_PLATFORM_VARIANT}.") endif + +# Enable the flag since RD-V1-MC has a system level cache +NEOVERSE_Nx_EXTERNAL_LLC := 1 diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_err.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_err.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_plat.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_security.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_security.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_topology.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/rdv1mc/rdv1mc_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/rdv1mc/rdv1mc_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/fdts/sgi575_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/fdts/sgi575_nt_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/sgi575/fdts/sgi575_nt_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/fdts/sgi575_nt_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/fdts/sgi575_nt_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/fdts/sgi575_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/sgi575/fdts/sgi575_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/fdts/sgi575_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/fdts/sgi575_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/sgi575/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/sgi575/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_err.c b/atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_err.c rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_plat.c b/atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_security.c b/atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_security.c rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_topology.c b/atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/sgi575/sgi575_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/sgi575/sgi575_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_spmc_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_spmc_manifest.dts similarity index 99% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_spmc_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_spmc_manifest.dts index b64e0762e..8ef63309a 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_spmc_manifest.dts +++ b/atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_spmc_manifest.dts @@ -13,7 +13,7 @@ attribute { spmc_id = <0x8000>; maj_ver = <0x1>; - min_ver = <0x1>; + min_ver = <0x2>; exec_state = <0x0>; load_address = <0x0 0xfd000000>; entrypoint = <0x0 0xfd000000>; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts b/atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts similarity index 99% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts rename to atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts index 382f0e1b5..73314eeb4 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts +++ b/atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts @@ -13,7 +13,7 @@ attribute { spmc_id = <0x8000>; maj_ver = <0x1>; - min_ver = <0x1>; + min_ver = <0x2>; exec_state = <0x0>; load_address = <0x0 0xfd000000>; entrypoint = <0x0 0xfd000000>; diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_tb_fw_config.dts b/atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_tb_fw_config.dts similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/fdts/tc_tb_fw_config.dts rename to atf-20240117-bacca82a8/plat/arm/board/tc/fdts/tc_tb_fw_config.dts diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/board/tc/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/board/tc/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/include/platform_def.h b/atf-20240117-bacca82a8/plat/arm/board/tc/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/include/platform_def.h rename to atf-20240117-bacca82a8/plat/arm/board/tc/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/include/tc_helpers.S b/atf-20240117-bacca82a8/plat/arm/board/tc/include/tc_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/include/tc_helpers.S rename to atf-20240117-bacca82a8/plat/arm/board/tc/include/tc_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/include/tc_plat.h b/atf-20240117-bacca82a8/plat/arm/board/tc/include/tc_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/include/tc_plat.h rename to atf-20240117-bacca82a8/plat/arm/board/tc/include/tc_plat.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/nv_counter_test.c b/atf-20240117-bacca82a8/plat/arm/board/tc/nv_counter_test.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/nv_counter_test.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/nv_counter_test.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/plat_def_fip_uuid.h b/atf-20240117-bacca82a8/plat/arm/board/tc/plat_def_fip_uuid.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/plat_def_fip_uuid.h rename to atf-20240117-bacca82a8/plat/arm/board/tc/plat_def_fip_uuid.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/plat_tc_mbedtls_config.h b/atf-20240117-bacca82a8/plat/arm/board/tc/plat_tc_mbedtls_config.h similarity index 81% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/plat_tc_mbedtls_config.h rename to atf-20240117-bacca82a8/plat/arm/board/tc/plat_tc_mbedtls_config.h index f0aa60b52..773629c9a 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/tc/plat_tc_mbedtls_config.h +++ b/atf-20240117-bacca82a8/plat/arm/board/tc/plat_tc_mbedtls_config.h @@ -22,11 +22,7 @@ #endif #define MBEDTLS_PSA_CRYPTO_C -#define MBEDTLS_HMAC_DRBG_C -#define MBEDTLS_ENTROPY_C -#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -#define MBEDTLS_NO_PLATFORM_ENTROPY -#define MBEDTLS_TEST_NULL_ENTROPY +#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG #define MBEDTLS_ECP_C #define MBEDTLS_ECP_DP_SECP384R1_ENABLED diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/platform.mk b/atf-20240117-bacca82a8/plat/arm/board/tc/platform.mk similarity index 97% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/platform.mk rename to atf-20240117-bacca82a8/plat/arm/board/tc/platform.mk index 8ca33cac4..6874cfa5a 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/tc/platform.mk +++ b/atf-20240117-bacca82a8/plat/arm/board/tc/platform.mk @@ -9,6 +9,11 @@ ifeq ($(TARGET_PLATFORM), 0) $(error Platform ${PLAT}$(TARGET_PLATFORM) is deprecated.) endif +ifeq ($(TARGET_PLATFORM), 1) + $(warning Platform ${PLAT}$(TARGET_PLATFORM) is deprecated. \ + Some of the features might not work as expected) +endif + ifeq ($(shell expr $(TARGET_PLATFORM) \<= 2), 0) $(error TARGET_PLATFORM must be less than or equal to 2) endif @@ -21,8 +26,6 @@ CSS_USE_SCMI_SDS_DRIVER := 1 ENABLE_FEAT_RAS := 1 -RAS_FFH_SUPPORT := 0 - SDEI_SUPPORT := 0 EL3_EXCEPTION_HANDLING := 0 diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/platform_test.mk b/atf-20240117-bacca82a8/plat/arm/board/tc/platform_test.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/platform_test.mk rename to atf-20240117-bacca82a8/plat/arm/board/tc/platform_test.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/region_defs.h b/atf-20240117-bacca82a8/plat/arm/board/tc/region_defs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/region_defs.h rename to atf-20240117-bacca82a8/plat/arm/board/tc/region_defs.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/rotpk_test.c b/atf-20240117-bacca82a8/plat/arm/board/tc/rotpk_test.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/rotpk_test.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/rotpk_test.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_test_stubs.c b/atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_test_stubs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_test_stubs.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_test_stubs.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_tests.c b/atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_tests.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_tests.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_tests.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_testsuites.c b/atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_testsuites.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_testsuites.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_testsuites.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_testsuites.h b/atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_testsuites.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/rss_ap_testsuites.h rename to atf-20240117-bacca82a8/plat/arm/board/tc/rss_ap_testsuites.h diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl1_measured_boot.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl1_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl1_measured_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl1_measured_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl2_measured_boot.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl2_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl2_measured_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl2_measured_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl31_setup.c similarity index 74% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl31_setup.c index ff7809d2a..aac7eceb3 100644 --- a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_bl31_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_bl31_setup.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -19,6 +20,36 @@ #include #include +#ifdef PLATFORM_TEST_TFM_TESTSUITE +#include +#include +#include +#endif /* PLATFORM_TEST_TFM_TESTSUITE */ + +#ifdef PLATFORM_TEST_TFM_TESTSUITE +/* + * We pretend using an external RNG (through MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG + * mbedTLS config option) so we need to provide an implementation of + * mbedtls_psa_external_get_random(). Provide a fake one, since we do not + * actually use any of external RNG and this function is only needed during + * the execution of TF-M testsuite during exporting the public part of the + * delegated attestation key. + */ +psa_status_t mbedtls_psa_external_get_random( + mbedtls_psa_external_random_context_t *context, + uint8_t *output, size_t output_size, + size_t *output_length) +{ + for (size_t i = 0U; i < output_size; i++) { + output[i] = (uint8_t)(read_cntpct_el0() & 0xFFU); + } + + *output_length = output_size; + + return PSA_SUCCESS; +} +#endif /* PLATFORM_TEST_TFM_TESTSUITE */ + static scmi_channel_plat_info_t tc_scmi_plat_info[] = { { .scmi_mbx_mem = CSS_SCMI_PAYLOAD_BASE, diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_common_measured_boot.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_common_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_common_measured_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_common_measured_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_err.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_err.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_interconnect.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_interconnect.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_interconnect.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_interconnect.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_plat.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_plat.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_plat.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_security.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_security.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_security.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_topology.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_topology.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/board/tc/tc_trusted_boot.c b/atf-20240117-bacca82a8/plat/arm/board/tc/tc_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/board/tc/tc_trusted_boot.c rename to atf-20240117-bacca82a8/plat/arm/board/tc/tc_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/aarch32/arm_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/arm/common/aarch32/arm_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/aarch32/arm_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/arm/common/aarch32/arm_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/aarch32/arm_helpers.S b/atf-20240117-bacca82a8/plat/arm/common/aarch32/arm_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/aarch32/arm_helpers.S rename to atf-20240117-bacca82a8/plat/arm/common/aarch32/arm_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_helpers.S b/atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_helpers.S similarity index 63% rename from atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_helpers.S rename to atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_helpers.S index ed85ea1dc..3e56691cb 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_helpers.S +++ b/atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_helpers.S @@ -86,51 +86,3 @@ endfunc plat_crash_console_flush func platform_mem_init ret endfunc platform_mem_init - -/* - * Need to use coherent stack when ARM Cryptocell is used to autheticate images - * since Cryptocell uses DMA to transfer data and it is not coherent with the - * AP CPU. - */ -#if ARM_CRYPTOCELL_INTEG -#if defined(IMAGE_BL1) || defined(IMAGE_BL2) - .globl plat_get_my_stack - .globl plat_set_my_stack - .local platform_coherent_stacks - - /* ------------------------------------------------------- - * uintptr_t plat_get_my_stack () - * - * For cold-boot BL images, only the primary CPU needs a - * stack. This function returns the stack pointer for a - * stack allocated in coherent memory. - * ------------------------------------------------------- - */ -func plat_get_my_stack - get_up_stack platform_coherent_stacks, PLATFORM_STACK_SIZE - ret -endfunc plat_get_my_stack - - /* ------------------------------------------------------- - * void plat_set_my_stack () - * - * For cold-boot BL images, only the primary CPU needs a - * stack. This function sets the stack pointer to a stack - * allocated in coherent memory. - * ------------------------------------------------------- - */ -func plat_set_my_stack - get_up_stack platform_coherent_stacks, PLATFORM_STACK_SIZE - mov sp, x0 - ret -endfunc plat_set_my_stack - - /* ---------------------------------------------------- - * Single cpu stack in coherent memory. - * ---------------------------------------------------- - */ -declare_stack platform_coherent_stacks, .tzfw_coherent_mem, \ - PLATFORM_STACK_SIZE, 1, CACHE_WRITEBACK_GRANULE - -#endif /* defined(IMAGE_BL1) || defined(IMAGE_BL2) */ -#endif /* ARM_CRYPTOCELL_INTEG */ diff --git a/atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_pauth.c b/atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_pauth.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_pauth.c rename to atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_pauth.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_sdei.c b/atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_sdei.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/aarch64/arm_sdei.c rename to atf-20240117-bacca82a8/plat/arm/common/aarch64/arm_sdei.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/aarch64/execution_state_switch.c b/atf-20240117-bacca82a8/plat/arm/common/aarch64/execution_state_switch.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/aarch64/execution_state_switch.c rename to atf-20240117-bacca82a8/plat/arm/common/aarch64/execution_state_switch.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl1_fwu.c b/atf-20240117-bacca82a8/plat/arm/common/arm_bl1_fwu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_bl1_fwu.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_bl1_fwu.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/common/arm_bl1_setup.c similarity index 96% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_bl1_setup.c index 70002362d..feff6913d 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl1_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/common/arm_bl1_setup.c @@ -108,11 +108,8 @@ void bl1_early_platform_setup(void) *****************************************************************************/ void arm_bl1_plat_arch_setup(void) { -#if USE_COHERENT_MEM && !ARM_CRYPTOCELL_INTEG - /* - * Ensure ARM platforms don't use coherent memory in BL1 unless - * cryptocell integration is enabled. - */ +#if USE_COHERENT_MEM + /* Ensure ARM platforms don't use coherent memory in BL1. */ assert((BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE) == 0U); #endif @@ -122,9 +119,6 @@ void arm_bl1_plat_arch_setup(void) #if USE_ROMLIB ARM_MAP_ROMLIB_CODE, ARM_MAP_ROMLIB_DATA, -#endif -#if ARM_CRYPTOCELL_INTEG - ARM_MAP_BL_COHERENT_RAM, #endif {0} }; diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl2_el3_setup.c b/atf-20240117-bacca82a8/plat/arm/common/arm_bl2_el3_setup.c similarity index 91% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_bl2_el3_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_bl2_el3_setup.c index b598c592a..01e0db0bc 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl2_el3_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/common/arm_bl2_el3_setup.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -94,7 +95,15 @@ void arm_bl2_el3_plat_arch_setup(void) void bl2_el3_plat_arch_setup(void) { + int __maybe_unused ret; arm_bl2_el3_plat_arch_setup(); +#if ARM_GPT_SUPPORT + ret = gpt_partition_init(); + if (ret != 0) { + ERROR("GPT partition initialisation failed!\n"); + panic(); + } +#endif /* ARM_GPT_SUPPORT */ } void bl2_el3_plat_prepare_exit(void) diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/common/arm_bl2_setup.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_bl2_setup.c index b142b6241..3e8109e6b 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl2_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/common/arm_bl2_setup.c @@ -69,6 +69,8 @@ CASSERT(BL2_BASE >= ARM_FW_CONFIG_LIMIT, assert_bl2_base_overflows); void arm_bl2_early_platform_setup(uintptr_t fw_config, struct meminfo *mem_layout) { + int __maybe_unused ret; + /* Initialize the console to provide early debug support */ arm_console_boot_init(); @@ -82,9 +84,13 @@ void arm_bl2_early_platform_setup(uintptr_t fw_config, /* Load partition table */ #if ARM_GPT_SUPPORT - partition_init(GPT_IMAGE_ID); -#endif /* ARM_GPT_SUPPORT */ + ret = gpt_partition_init(); + if (ret != 0) { + ERROR("GPT partition initialisation failed!\n"); + panic(); + } +#endif /* ARM_GPT_SUPPORT */ } void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3) @@ -178,11 +184,8 @@ static void arm_bl2_plat_gpt_setup(void) ******************************************************************************/ void arm_bl2_plat_arch_setup(void) { -#if USE_COHERENT_MEM && !ARM_CRYPTOCELL_INTEG - /* - * Ensure ARM platforms don't use coherent memory in BL2 unless - * cryptocell integration is enabled. - */ +#if USE_COHERENT_MEM + /* Ensure ARM platforms don't use coherent memory in BL2. */ assert((BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE) == 0U); #endif @@ -192,9 +195,6 @@ void arm_bl2_plat_arch_setup(void) #if USE_ROMLIB ARM_MAP_ROMLIB_CODE, ARM_MAP_ROMLIB_DATA, -#endif -#if ARM_CRYPTOCELL_INTEG - ARM_MAP_BL_COHERENT_RAM, #endif ARM_MAP_BL_CONFIG_REGION, #if ENABLE_RME @@ -312,8 +312,3 @@ int arm_bl2_plat_handle_post_image_load(unsigned int image_id) #endif return arm_bl2_handle_post_image_load(image_id); } - -int bl2_plat_handle_post_image_load(unsigned int image_id) -{ - return arm_bl2_plat_handle_post_image_load(image_id); -} diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl2u_setup.c b/atf-20240117-bacca82a8/plat/arm/common/arm_bl2u_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_bl2u_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_bl2u_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/common/arm_bl31_setup.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_bl31_setup.c index cfd1aac08..8e90615b1 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/arm_bl31_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/common/arm_bl31_setup.c @@ -198,6 +198,24 @@ void __init arm_bl31_early_platform_setup(void *from_bl2, uintptr_t soc_fw_confi while (bl_params != NULL) { if (bl_params->image_id == BL32_IMAGE_ID) { bl32_image_ep_info = *bl_params->ep_info; +#if SPMC_AT_EL3 + /* + * Populate the BL32 image base, size and max limit in + * the entry point information, since there is no + * platform function to retrieve them in generic + * code. We choose arg2, arg3 and arg4 since the generic + * code uses arg1 for stashing the SP manifest size. The + * SPMC setup uses these arguments to update SP manifest + * with actual SP's base address and it size. + */ + bl32_image_ep_info.args.arg2 = + bl_params->image_info->image_base; + bl32_image_ep_info.args.arg3 = + bl_params->image_info->image_size; + bl32_image_ep_info.args.arg4 = + bl_params->image_info->image_base + + bl_params->image_info->image_max_size; +#endif } #if ENABLE_RME else if (bl_params->image_id == RMM_IMAGE_ID) { @@ -295,7 +313,7 @@ void arm_bl31_platform_setup(void) /* Initialize power controller before setting up topology */ plat_arm_pwrc_setup(); -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT ras_init(); #endif diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_cci.c b/atf-20240117-bacca82a8/plat/arm/common/arm_cci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_cci.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_cci.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_ccn.c b/atf-20240117-bacca82a8/plat/arm/common/arm_ccn.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_ccn.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_ccn.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_common.c b/atf-20240117-bacca82a8/plat/arm/common/arm_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_common.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_common.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_common.mk b/atf-20240117-bacca82a8/plat/arm/common/arm_common.mk similarity index 95% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_common.mk rename to atf-20240117-bacca82a8/plat/arm/common/arm_common.mk index 41d1b66c1..ae0d85daf 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/arm_common.mk +++ b/atf-20240117-bacca82a8/plat/arm/common/arm_common.mk @@ -164,24 +164,11 @@ ifeq ($(SEPARATE_NOBITS_REGION),1) endif endif -# Disable ARM Cryptocell by default -ARM_CRYPTOCELL_INTEG := 0 -$(eval $(call assert_boolean,ARM_CRYPTOCELL_INTEG)) -$(eval $(call add_define,ARM_CRYPTOCELL_INTEG)) - # Enable PIE support for RESET_TO_BL31/RESET_TO_SP_MIN case ifneq ($(filter 1,${RESET_TO_BL31} ${RESET_TO_SP_MIN}),) ENABLE_PIE := 1 endif -# CryptoCell integration relies on coherent buffers for passing data from -# the AP CPU to the CryptoCell -ifeq (${ARM_CRYPTOCELL_INTEG},1) - ifeq (${USE_COHERENT_MEM},0) - $(error "ARM_CRYPTOCELL_INTEG needs USE_COHERENT_MEM to be set.") - endif -endif - # Disable GPT parser support, use FIP image by default ARM_GPT_SUPPORT := 0 $(eval $(call assert_boolean,ARM_GPT_SUPPORT)) @@ -331,9 +318,11 @@ endif ifeq (${ARCH}, aarch64) BL31_SOURCES += plat/arm/common/aarch64/execution_state_switch.c\ plat/arm/common/arm_sip_svc.c \ + plat/arm/common/plat_arm_sip_svc.c \ ${ARM_SVC_HANDLER_SRCS} else BL32_SOURCES += plat/arm/common/arm_sip_svc.c \ + plat/arm/common/plat_arm_sip_svc.c \ ${ARM_SVC_HANDLER_SRCS} endif endif @@ -350,7 +339,7 @@ endif endif # RAS sources -ifeq (${RAS_FFH_SUPPORT},1) +ifeq (${ENABLE_FEAT_RAS}-${HANDLE_EA_EL3_FIRST_NS},1-1) BL31_SOURCES += lib/extensions/ras/std_err_record.c \ lib/extensions/ras/ras_common.c endif @@ -445,11 +434,7 @@ ifneq ($(filter 1,${MEASURED_BOOT} ${TRUSTED_BOARD_BOOT} ${DRTM_SUPPORT}),) BL31_SOURCES += drivers/auth/crypto_mod.c # We expect to locate the *.mk files under the directories specified below - ifeq (${ARM_CRYPTOCELL_INTEG},0) - CRYPTO_LIB_MK := drivers/auth/mbedtls/mbedtls_crypto.mk - else - CRYPTO_LIB_MK := drivers/auth/cryptocell/cryptocell_crypto.mk - endif + CRYPTO_LIB_MK := drivers/auth/mbedtls/mbedtls_crypto.mk $(info Including ${CRYPTO_LIB_MK}) include ${CRYPTO_LIB_MK} diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_console.c b/atf-20240117-bacca82a8/plat/arm/common/arm_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_console.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_console.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_dyn_cfg.c b/atf-20240117-bacca82a8/plat/arm/common/arm_dyn_cfg.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_dyn_cfg.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_dyn_cfg.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_dyn_cfg_helpers.c b/atf-20240117-bacca82a8/plat/arm/common/arm_dyn_cfg_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_dyn_cfg_helpers.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_dyn_cfg_helpers.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_err.c b/atf-20240117-bacca82a8/plat/arm/common/arm_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_err.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_err.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_gicv2.c b/atf-20240117-bacca82a8/plat/arm/common/arm_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_gicv2.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_gicv3.c b/atf-20240117-bacca82a8/plat/arm/common/arm_gicv3.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_gicv3.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_gicv3.c index 8c16877ce..5becbcd5c 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/arm_gicv3.c +++ b/atf-20240117-bacca82a8/plat/arm/common/arm_gicv3.c @@ -41,7 +41,7 @@ static const uintptr_t *gicr_frames = gicr_base_addrs; static const interrupt_prop_t arm_interrupt_props[] = { PLAT_ARM_G1S_IRQ_PROPS(INTR_GROUP1S), PLAT_ARM_G0_IRQ_PROPS(INTR_GROUP0), -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT INTR_PROP_DESC(PLAT_CORE_FAULT_IRQ, PLAT_RAS_PRI, INTR_GROUP0, GIC_INTR_CFG_LEVEL) #endif diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_image_load.c b/atf-20240117-bacca82a8/plat/arm/common/arm_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_image_load.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_io_storage.c b/atf-20240117-bacca82a8/plat/arm/common/arm_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_io_storage.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_nor_psci_mem_protect.c b/atf-20240117-bacca82a8/plat/arm/common/arm_nor_psci_mem_protect.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_nor_psci_mem_protect.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_nor_psci_mem_protect.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_pm.c b/atf-20240117-bacca82a8/plat/arm/common/arm_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_pm.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_sip_svc.c b/atf-20240117-bacca82a8/plat/arm/common/arm_sip_svc.c similarity index 89% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_sip_svc.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_sip_svc.c index 352d47751..09226f4b7 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/arm_sip_svc.c +++ b/atf-20240117-bacca82a8/plat/arm/common/arm_sip_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2023, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -13,9 +13,6 @@ #include #include #include -#if ENABLE_SPMD_LP -#include -#endif #include /* ARM SiP Service UUID */ @@ -136,15 +133,16 @@ static uintptr_t arm_sip_handler(unsigned int smc_fid, SMC_RET2(handle, ARM_SIP_SVC_VERSION_MAJOR, ARM_SIP_SVC_VERSION_MINOR); default: -#if ENABLE_SPMD_LP - return plat_spmd_logical_sp_smc_handler(smc_fid, x1, x2, x3, x4, - cookie, handle, flags); -#else - WARN("Unimplemented ARM SiP Service Call: 0x%x \n", smc_fid); - SMC_RET1(handle, SMC_UNK); -#endif + break; } + /* + * Fall back to allow Arm platform specific handler. + * TODO: Refactor needed to move out generic handlers from this file and + * only keep Arm Platform specific handlers here. + */ + return plat_arm_sip_handler(smc_fid, x1, x2, x3, x4, + cookie, handle, flags); } diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_topology.c b/atf-20240117-bacca82a8/plat/arm/common/arm_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_topology.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_tzc400.c b/atf-20240117-bacca82a8/plat/arm/common/arm_tzc400.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_tzc400.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_tzc400.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/arm_tzc_dmc500.c b/atf-20240117-bacca82a8/plat/arm/common/arm_tzc_dmc500.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/arm_tzc_dmc500.c rename to atf-20240117-bacca82a8/plat/arm/common/arm_tzc_dmc500.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/fconf/arm_fconf_io.c b/atf-20240117-bacca82a8/plat/arm/common/fconf/arm_fconf_io.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/arm/common/fconf/arm_fconf_io.c rename to atf-20240117-bacca82a8/plat/arm/common/fconf/arm_fconf_io.c index 27acc3a64..07f6a8272 100644 --- a/atf-20231013-0ea67d76a/plat/arm/common/fconf/arm_fconf_io.c +++ b/atf-20240117-bacca82a8/plat/arm/common/fconf/arm_fconf_io.c @@ -45,10 +45,21 @@ static const io_block_spec_t gpt_spec = { * each sector has 4 partition entries, and there are * 2 reserved sectors i.e. protective MBR and primary * GPT header hence length gets calculated as, - * length = 512 * (128/4 + 2) + * length = PLAT_PARTITION_BLOCK_SIZE * (128/4 + 2) */ - .length = PLAT_PARTITION_BLOCK_SIZE * - (PLAT_PARTITION_MAX_ENTRIES / 4 + 2), + .length = LBA(PLAT_PARTITION_MAX_ENTRIES / 4 + 2), +}; + +/* + * length will be assigned at runtime based on MBR header data. + * Backup GPT Header is present in Last LBA-1 and its entries + * are last 32 blocks starts at LBA-33, On runtime update these + * before device usage. Update offset to beginning LBA-33 and + * length to LBA-33. + */ +static io_block_spec_t bkup_gpt_spec = { + .offset = PLAT_ARM_FLASH_IMAGE_BASE, + .length = 0, }; #endif /* ARM_GPT_SUPPORT */ @@ -107,6 +118,11 @@ struct plat_io_policy policies[MAX_NUMBER_IDS] = { (uintptr_t)&gpt_spec, open_memmap }, + [BKUP_GPT_IMAGE_ID] = { + &memmap_dev_handle, + (uintptr_t)&bkup_gpt_spec, + open_memmap + }, #endif /* ARM_GPT_SUPPORT */ #if PSA_FWU_SUPPORT [FWU_METADATA_IMAGE_ID] = { diff --git a/atf-20231013-0ea67d76a/plat/arm/common/fconf/arm_fconf_sp.c b/atf-20240117-bacca82a8/plat/arm/common/fconf/arm_fconf_sp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/fconf/arm_fconf_sp.c rename to atf-20240117-bacca82a8/plat/arm/common/fconf/arm_fconf_sp.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_ethosn_getter.c b/atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_ethosn_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_ethosn_getter.c rename to atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_ethosn_getter.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_nv_cntr_getter.c b/atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_nv_cntr_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_nv_cntr_getter.c rename to atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_nv_cntr_getter.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_sdei_getter.c b/atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_sdei_getter.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_sdei_getter.c rename to atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_sdei_getter.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_sec_intr_config.c b/atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_sec_intr_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/fconf/fconf_sec_intr_config.c rename to atf-20240117-bacca82a8/plat/arm/common/fconf/fconf_sec_intr_config.c diff --git a/atf-20240117-bacca82a8/plat/arm/common/plat_arm_sip_svc.c b/atf-20240117-bacca82a8/plat/arm/common/plat_arm_sip_svc.c new file mode 100644 index 000000000..b1dab165b --- /dev/null +++ b/atf-20240117-bacca82a8/plat/arm/common/plat_arm_sip_svc.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2023, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +#include +#include + +#include +#include + +#if ENABLE_SPMD_LP +#include +#endif + +uintptr_t plat_arm_sip_handler(uint32_t smc_fid, + u_register_t x1, + u_register_t x2, + u_register_t x3, + u_register_t x4, + void *cookie, + void *handle, + u_register_t flags) +{ +#if PLAT_TEST_SPM + bool secure_origin; + + /* Determine which security state this SMC originated from */ + secure_origin = is_caller_secure(flags); + + switch (smc_fid) { + case ARM_SIP_SET_INTERRUPT_PENDING: + if (!secure_origin) { + SMC_RET1(handle, SMC_UNK); + } + + VERBOSE("SiP Call- Set interrupt pending %d\n", (uint32_t)x1); + plat_ic_set_interrupt_pending(x1); + + SMC_RET1(handle, SMC_OK); + break; /* Not reached */ + default: + break; + } +#endif + +#if ENABLE_SPMD_LP + return plat_spmd_logical_sp_smc_handler(smc_fid, x1, x2, x3, x4, + cookie, handle, flags); +#else + WARN("Unimplemented ARM SiP Service Call: 0x%x\n", smc_fid); + SMC_RET1(handle, SMC_UNK); +#endif +} diff --git a/atf-20231013-0ea67d76a/plat/arm/common/sp_min/arm_sp_min.mk b/atf-20240117-bacca82a8/plat/arm/common/sp_min/arm_sp_min.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/sp_min/arm_sp_min.mk rename to atf-20240117-bacca82a8/plat/arm/common/sp_min/arm_sp_min.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/common/sp_min/arm_sp_min_setup.c b/atf-20240117-bacca82a8/plat/arm/common/sp_min/arm_sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/sp_min/arm_sp_min_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/sp_min/arm_sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/trp/arm_trp.mk b/atf-20240117-bacca82a8/plat/arm/common/trp/arm_trp.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/trp/arm_trp.mk rename to atf-20240117-bacca82a8/plat/arm/common/trp/arm_trp.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/common/trp/arm_trp_setup.c b/atf-20240117-bacca82a8/plat/arm/common/trp/arm_trp_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/trp/arm_trp_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/trp/arm_trp_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/common/tsp/arm_tsp.mk b/atf-20240117-bacca82a8/plat/arm/common/tsp/arm_tsp.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/tsp/arm_tsp.mk rename to atf-20240117-bacca82a8/plat/arm/common/tsp/arm_tsp.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/common/tsp/arm_tsp_setup.c b/atf-20240117-bacca82a8/plat/arm/common/tsp/arm_tsp_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/common/tsp/arm_tsp_setup.c rename to atf-20240117-bacca82a8/plat/arm/common/tsp/arm_tsp_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/aarch32/css_helpers.S b/atf-20240117-bacca82a8/plat/arm/css/common/aarch32/css_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/aarch32/css_helpers.S rename to atf-20240117-bacca82a8/plat/arm/css/common/aarch32/css_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/aarch64/css_helpers.S b/atf-20240117-bacca82a8/plat/arm/css/common/aarch64/css_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/aarch64/css_helpers.S rename to atf-20240117-bacca82a8/plat/arm/css/common/aarch64/css_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/css_bl1_setup.c b/atf-20240117-bacca82a8/plat/arm/css/common/css_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/css_bl1_setup.c rename to atf-20240117-bacca82a8/plat/arm/css/common/css_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/css_bl2_setup.c b/atf-20240117-bacca82a8/plat/arm/css/common/css_bl2_setup.c similarity index 93% rename from atf-20231013-0ea67d76a/plat/arm/css/common/css_bl2_setup.c rename to atf-20240117-bacca82a8/plat/arm/css/common/css_bl2_setup.c index 002c6eb93..1e055c599 100644 --- a/atf-20231013-0ea67d76a/plat/arm/css/common/css_bl2_setup.c +++ b/atf-20240117-bacca82a8/plat/arm/css/common/css_bl2_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -84,3 +84,8 @@ void bl2_platform_setup(void) # endif /* EL3_PAYLOAD_BASE */ #endif /* CSS_USE_SCMI_SDS_DRIVER */ + +int bl2_plat_handle_post_image_load(unsigned int image_id) +{ + return arm_bl2_plat_handle_post_image_load(image_id); +} diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/css_bl2u_setup.c b/atf-20240117-bacca82a8/plat/arm/css/common/css_bl2u_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/css_bl2u_setup.c rename to atf-20240117-bacca82a8/plat/arm/css/common/css_bl2u_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/css_common.mk b/atf-20240117-bacca82a8/plat/arm/css/common/css_common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/css_common.mk rename to atf-20240117-bacca82a8/plat/arm/css/common/css_common.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/css_pm.c b/atf-20240117-bacca82a8/plat/arm/css/common/css_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/css_pm.c rename to atf-20240117-bacca82a8/plat/arm/css/common/css_pm.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/css_topology.c b/atf-20240117-bacca82a8/plat/arm/css/common/css_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/css_topology.c rename to atf-20240117-bacca82a8/plat/arm/css/common/css_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/common/sp_min/css_sp_min.mk b/atf-20240117-bacca82a8/plat/arm/css/common/sp_min/css_sp_min.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/common/sp_min/css_sp_min.mk rename to atf-20240117-bacca82a8/plat/arm/css/common/sp_min/css_sp_min.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/aarch64/sgi_helper.S b/atf-20240117-bacca82a8/plat/arm/css/sgi/aarch64/sgi_helper.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/aarch64/sgi_helper.S rename to atf-20240117-bacca82a8/plat/arm/css/sgi/aarch64/sgi_helper.S diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/plat_macros.S b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_base_platform_def.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_base_platform_def.h similarity index 93% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_base_platform_def.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_base_platform_def.h index b9c785f81..dab5f8b21 100644 --- a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_base_platform_def.h +++ b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_base_platform_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -33,11 +33,11 @@ * chips are accessed - secure ram, css device and soc device regions. */ #if defined(IMAGE_BL31) -# if SPM_MM -# define PLAT_ARM_MMAP_ENTRIES (9 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) -# define MAX_XLAT_TABLES (7 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) -# define PLAT_SP_IMAGE_MMAP_REGIONS 10 -# define PLAT_SP_IMAGE_MAX_XLAT_TABLES 12 +# if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) +# define PLAT_ARM_MMAP_ENTRIES (10 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) +# define MAX_XLAT_TABLES (8 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) +# define PLAT_SP_IMAGE_MMAP_REGIONS 12 +# define PLAT_SP_IMAGE_MAX_XLAT_TABLES 14 # else # define PLAT_ARM_MMAP_ENTRIES (5 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) # define MAX_XLAT_TABLES (6 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) @@ -105,7 +105,7 @@ * A buffer of ~35KB is added to account for future expansion of the image, * making it a total of 100KB. */ -#define CSS_SGI_BL31_SIZE (100 * 1024) /* 100 KB */ +#define CSS_SGI_BL31_SIZE (116 * 1024) /* 116 KB */ #define PLAT_ARM_MAX_BL31_SIZE (CSS_SGI_BL31_SIZE + \ PLAT_ARM_MAX_BL2_SIZE + \ PLAT_ARM_MAX_BL1_RW_SIZE) @@ -204,20 +204,20 @@ SOC_CSS_DEVICE_SIZE, \ MT_DEVICE | MT_RW | MT_SECURE | MT_USER) -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT #define PLAT_SP_PRI PLAT_RAS_PRI #else #define PLAT_SP_PRI 0x10 #endif -#if SPM_MM && RAS_FFH_SUPPORT +#if (SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP)) && ENABLE_FEAT_RAS && FFH_SUPPORT /* * CPER buffer memory of 128KB is reserved and it is placed adjacent to the * memory shared between EL3 and S-EL0. */ #define CSS_SGI_SP_CPER_BUF_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ PLAT_SP_IMAGE_NS_BUF_SIZE) -#define CSS_SGI_SP_CPER_BUF_SIZE ULL(0x20000) +#define CSS_SGI_SP_CPER_BUF_SIZE ULL(0x10000) #define CSS_SGI_SP_CPER_BUF_MMAP MAP_REGION2( \ CSS_SGI_SP_CPER_BUF_BASE, \ CSS_SGI_SP_CPER_BUF_BASE, \ @@ -232,14 +232,14 @@ #define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ PLAT_SP_IMAGE_NS_BUF_SIZE + \ CSS_SGI_SP_CPER_BUF_SIZE) -#elif SPM_MM +#elif (SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP)) /* * Secure partition stack follows right after the memory region that is shared * between EL3 and S-EL0. */ #define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ PLAT_SP_IMAGE_NS_BUF_SIZE) -#endif /* SPM_MM && RAS_FFH_SUPPORT */ +#endif /* SPM_MM && ENABLE_FEAT_RAS && FFH_SUPPORT */ /* Platform ID address */ #define SSC_VERSION (SSC_REG_BASE + SSC_VERSION_OFFSET) diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_dmc620_tzc_regions.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_dmc620_tzc_regions.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_dmc620_tzc_regions.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_dmc620_tzc_regions.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_plat.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_plat.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_plat.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_ras.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_ras.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_ras.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_ras.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_sdei.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_sdei.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_sdei.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_sdei.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_css_def.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_css_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_css_def.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_css_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_css_def_v2.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_css_def_v2.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_css_def_v2.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_css_def_v2.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_platform_def.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_platform_def.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_platform_def_v2.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_platform_def_v2.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_soc_platform_def_v2.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_soc_platform_def_v2.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_variant.h b/atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_variant.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/include/sgi_variant.h rename to atf-20240117-bacca82a8/plat/arm/css/sgi/include/sgi_variant.h diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/ras/sgi_ras_common.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/ras/sgi_ras_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/ras/sgi_ras_common.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/ras/sgi_ras_common.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/ras/sgi_ras_cpu.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/ras/sgi_ras_cpu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/ras/sgi_ras_cpu.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/ras/sgi_ras_cpu.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/ras/sgi_ras_sram.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/ras/sgi_ras_sram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/ras/sgi_ras_sram.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/ras/sgi_ras_sram.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi-common.mk b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi-common.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi-common.mk rename to atf-20240117-bacca82a8/plat/arm/css/sgi/sgi-common.mk index 358316caa..2cd703422 100644 --- a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi-common.mk +++ b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi-common.mk @@ -10,8 +10,6 @@ CSS_ENT_BASE := plat/arm/css/sgi ENABLE_FEAT_RAS := 1 -RAS_FFH_SUPPORT := 0 - SDEI_SUPPORT := 0 EL3_EXCEPTION_HANDLING := 0 diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_bl31_setup.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_bl31_setup.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_image_load.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_image_load.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_interconnect.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_interconnect.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_interconnect.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_interconnect.c diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_plat.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_plat.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_plat.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_plat.c index 7f79d5409..01b426e88 100644 --- a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_plat.c +++ b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_plat.c @@ -93,7 +93,7 @@ const mmap_region_t plat_arm_secure_partition_mmap[] = { PLAT_ARM_SECURE_MAP_DEVICE, ARM_SP_IMAGE_MMAP, ARM_SP_IMAGE_NS_BUF_MMAP, -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT CSS_SGI_SP_CPER_BUF_MMAP, #endif ARM_SP_IMAGE_RW_MMAP, diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_plat_v2.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_plat_v2.c similarity index 96% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_plat_v2.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_plat_v2.c index 8de0efe30..624fed34f 100644 --- a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_plat_v2.c +++ b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_plat_v2.c @@ -54,7 +54,7 @@ const mmap_region_t plat_arm_mmap[] = { #if ARM_BL31_IN_DRAM ARM_MAP_BL31_SEC_DRAM, #endif -#if SPM_MM +#if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) ARM_SP_IMAGE_MMAP, #endif #if TRUSTED_BOARD_BOOT && !RESET_TO_BL2 @@ -73,7 +73,7 @@ const mmap_region_t plat_arm_mmap[] = { CSS_SGI_MAP_DEVICE, SOC_PLATFORM_PERIPH_MAP_DEVICE, SOC_SYSTEM_PERIPH_MAP_DEVICE, -#if SPM_MM +#if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) ARM_SPM_BUF_EL3_MMAP, #endif {0} @@ -87,7 +87,7 @@ const mmap_region_t plat_arm_secure_partition_mmap[] = { SOC_PLATFORM_PERIPH_MAP_DEVICE_USER, ARM_SP_IMAGE_MMAP, ARM_SP_IMAGE_NS_BUF_MMAP, -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT CSS_SGI_SP_CPER_BUF_MMAP, #endif ARM_SP_IMAGE_RW_MMAP, diff --git a/atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_topology.c b/atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/css/sgi/sgi_topology.c rename to atf-20240117-bacca82a8/plat/arm/css/sgi/sgi_topology.c diff --git a/atf-20231013-0ea67d76a/plat/arm/soc/common/soc_css.mk b/atf-20240117-bacca82a8/plat/arm/soc/common/soc_css.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/soc/common/soc_css.mk rename to atf-20240117-bacca82a8/plat/arm/soc/common/soc_css.mk diff --git a/atf-20231013-0ea67d76a/plat/arm/soc/common/soc_css_security.c b/atf-20240117-bacca82a8/plat/arm/soc/common/soc_css_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/arm/soc/common/soc_css_security.c rename to atf-20240117-bacca82a8/plat/arm/soc/common/soc_css_security.c diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/include/plat_macros.S b/atf-20240117-bacca82a8/plat/aspeed/ast2700/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/include/platform_def.h b/atf-20240117-bacca82a8/plat/aspeed/ast2700/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/include/platform_def.h rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/include/platform_reg.h b/atf-20240117-bacca82a8/plat/aspeed/ast2700/include/platform_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/include/platform_reg.h rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/include/platform_reg.h diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_bl31_setup.c b/atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_bl31_setup.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_bl31_setup.c rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_bl31_setup.c index fde5dbbc6..92a48ff80 100644 --- a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_bl31_setup.c +++ b/atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_bl31_setup.c @@ -76,6 +76,12 @@ void bl31_plat_arch_setup(void) BL_END - BL_CODE_END, MT_RW_DATA | MT_SECURE); +#if USE_COHERENT_MEM + mmap_add_region(BL_COHERENT_RAM_BASE, BL_COHERENT_RAM_BASE, + BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE, + MT_DEVICE | MT_RW | MT_SECURE); +#endif + mmap_add_region(BL32_BASE, BL32_BASE, BL32_SIZE, MT_MEMORY | MT_RW); diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_helpers.S b/atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_helpers.S rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_pm.c b/atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_pm.c rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_topology.c b/atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/plat_topology.c rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/aspeed/ast2700/platform.mk b/atf-20240117-bacca82a8/plat/aspeed/ast2700/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/aspeed/ast2700/platform.mk rename to atf-20240117-bacca82a8/plat/aspeed/ast2700/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_console.c b/atf-20240117-bacca82a8/plat/brcm/board/common/bcm_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_console.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/bcm_console.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_elog.c b/atf-20240117-bacca82a8/plat/brcm/board/common/bcm_elog.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_elog.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/bcm_elog.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_elog_ddr.c b/atf-20240117-bacca82a8/plat/brcm/board/common/bcm_elog_ddr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_elog_ddr.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/bcm_elog_ddr.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_elog_ddr.h b/atf-20240117-bacca82a8/plat/brcm/board/common/bcm_elog_ddr.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/bcm_elog_ddr.h rename to atf-20240117-bacca82a8/plat/brcm/board/common/bcm_elog_ddr.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/board_arm_trusted_boot.c b/atf-20240117-bacca82a8/plat/brcm/board/common/board_arm_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/board_arm_trusted_boot.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/board_arm_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/board_common.c b/atf-20240117-bacca82a8/plat/brcm/board/common/board_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/board_common.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/board_common.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/board_common.mk b/atf-20240117-bacca82a8/plat/brcm/board/common/board_common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/board_common.mk rename to atf-20240117-bacca82a8/plat/brcm/board/common/board_common.mk diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/brcm_mbedtls.c b/atf-20240117-bacca82a8/plat/brcm/board/common/brcm_mbedtls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/brcm_mbedtls.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/brcm_mbedtls.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/chip_id.h b/atf-20240117-bacca82a8/plat/brcm/board/common/chip_id.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/chip_id.h rename to atf-20240117-bacca82a8/plat/brcm/board/common/chip_id.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_plat_def.h b/atf-20240117-bacca82a8/plat/brcm/board/common/cmn_plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_plat_def.h rename to atf-20240117-bacca82a8/plat/brcm/board/common/cmn_plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_plat_util.h b/atf-20240117-bacca82a8/plat/brcm/board/common/cmn_plat_util.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_plat_util.h rename to atf-20240117-bacca82a8/plat/brcm/board/common/cmn_plat_util.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_sec.c b/atf-20240117-bacca82a8/plat/brcm/board/common/cmn_sec.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_sec.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/cmn_sec.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_sec.h b/atf-20240117-bacca82a8/plat/brcm/board/common/cmn_sec.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/cmn_sec.h rename to atf-20240117-bacca82a8/plat/brcm/board/common/cmn_sec.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/err.c b/atf-20240117-bacca82a8/plat/brcm/board/common/err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/err.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/err.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/plat_setup.c b/atf-20240117-bacca82a8/plat/brcm/board/common/plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/plat_setup.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/platform_common.c b/atf-20240117-bacca82a8/plat/brcm/board/common/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/platform_common.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/sbl_util.c b/atf-20240117-bacca82a8/plat/brcm/board/common/sbl_util.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/sbl_util.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/sbl_util.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/sbl_util.h b/atf-20240117-bacca82a8/plat/brcm/board/common/sbl_util.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/sbl_util.h rename to atf-20240117-bacca82a8/plat/brcm/board/common/sbl_util.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/common/timer_sync.c b/atf-20240117-bacca82a8/plat/brcm/board/common/timer_sync.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/common/timer_sync.c rename to atf-20240117-bacca82a8/plat/brcm/board/common/timer_sync.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/brcm/board/stingray/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/bcm958742t-ns3.mk b/atf-20240117-bacca82a8/plat/brcm/board/stingray/bcm958742t-ns3.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/bcm958742t-ns3.mk rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/bcm958742t-ns3.mk diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/bcm958742t.mk b/atf-20240117-bacca82a8/plat/brcm/board/stingray/bcm958742t.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/bcm958742t.mk rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/bcm958742t.mk diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ddr/soc/include/board_family.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ddr/soc/include/board_family.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ddr/soc/include/board_family.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ddr/soc/include/board_family.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ext_sram_init/ext_sram_init.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ihost_pll_config.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ihost_pll_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/ihost_pll_config.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/ihost_pll_config.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/plat_emmc.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/plat_emmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/plat_emmc.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/plat_emmc.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/sr_usb.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/sr_usb.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/sr_usb.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/sr_usb.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/swreg.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/swreg.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/swreg.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/swreg.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/usb.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/usb.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/usb.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/usb.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/usb_phy.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/usb_phy.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/driver/usb_phy.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/driver/usb_phy.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/bl33_info.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/bl33_info.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/bl33_info.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/bl33_info.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/board_info.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/board_info.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/board_info.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/board_info.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/crmu_def.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/crmu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/crmu_def.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/crmu_def.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/ddr_init.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/ddr_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/ddr_init.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/ddr_init.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/fsx.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/fsx.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/fsx.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/fsx.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/ihost_pm.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/ihost_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/ihost_pm.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/ihost_pm.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/iommu.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/iommu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/iommu.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/iommu.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/ncsi.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/ncsi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/ncsi.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/ncsi.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/paxb.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/paxb.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/paxb.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/paxb.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/paxc.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/paxc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/paxc.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/paxc.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/plat_macros.S b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/platform_def.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/platform_def.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/platform_sotp.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/platform_sotp.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/platform_sotp.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/platform_sotp.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/platform_usb.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/platform_usb.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/platform_usb.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/platform_usb.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/scp_cmd.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/scp_cmd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/scp_cmd.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/scp_cmd.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/scp_utils.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/scp_utils.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/scp_utils.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/scp_utils.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/sdio.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/sdio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/sdio.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/sdio.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/sr_def.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/sr_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/sr_def.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/sr_def.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/sr_utils.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/sr_utils.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/sr_utils.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/sr_utils.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/swreg.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/swreg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/swreg.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/swreg.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/timer_sync.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/timer_sync.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/timer_sync.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/timer_sync.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/usb_phy.h b/atf-20240117-bacca82a8/plat/brcm/board/stingray/include/usb_phy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/include/usb_phy.h rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/include/usb_phy.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/platform.mk b/atf-20240117-bacca82a8/plat/brcm/board/stingray/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/platform.mk rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/bl2_setup.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/bl2_setup.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/bl31_setup.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/bl31_setup.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/brcm_pm_ops.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/brcm_pm_ops.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/brcm_pm_ops.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/brcm_pm_ops.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/fsx.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/fsx.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/fsx.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/fsx.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/ihost_pm.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/ihost_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/ihost_pm.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/ihost_pm.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/iommu.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/iommu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/iommu.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/iommu.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/ncsi.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/ncsi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/ncsi.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/ncsi.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/paxb.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/paxb.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/paxb.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/paxb.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/paxc.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/paxc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/paxc.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/paxc.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/pm.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/pm.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/pm.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/scp_cmd.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/scp_cmd.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/scp_cmd.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/scp_cmd.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/scp_utils.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/scp_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/scp_utils.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/scp_utils.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/sdio.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/sdio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/sdio.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/sdio.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/sr_paxb_phy.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/sr_paxb_phy.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/sr_paxb_phy.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/sr_paxb_phy.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/topology.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/topology.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/topology.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/tz_sec.c b/atf-20240117-bacca82a8/plat/brcm/board/stingray/src/tz_sec.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/board/stingray/src/tz_sec.c rename to atf-20240117-bacca82a8/plat/brcm/board/stingray/src/tz_sec.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_bl2_setup.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_bl2_setup.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_bl31_setup.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_bl31_setup.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_ccn.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_ccn.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_ccn.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_ccn.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_common.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_common.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_common.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_gicv3.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_gicv3.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_image_load.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_image_load.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_io_storage.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_io_storage.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_mhu.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_mhu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_mhu.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_mhu.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_mhu.h b/atf-20240117-bacca82a8/plat/brcm/common/brcm_mhu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_mhu.h rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_mhu.h diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_scpi.c b/atf-20240117-bacca82a8/plat/brcm/common/brcm_scpi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_scpi.c rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_scpi.c diff --git a/atf-20231013-0ea67d76a/plat/brcm/common/brcm_scpi.h b/atf-20240117-bacca82a8/plat/brcm/common/brcm_scpi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/brcm/common/brcm_scpi.h rename to atf-20240117-bacca82a8/plat/brcm/common/brcm_scpi.h diff --git a/atf-20231013-0ea67d76a/plat/common/aarch32/crash_console_helpers.S b/atf-20240117-bacca82a8/plat/common/aarch32/crash_console_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch32/crash_console_helpers.S rename to atf-20240117-bacca82a8/plat/common/aarch32/crash_console_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/common/aarch32/plat_common.c b/atf-20240117-bacca82a8/plat/common/aarch32/plat_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch32/plat_common.c rename to atf-20240117-bacca82a8/plat/common/aarch32/plat_common.c diff --git a/atf-20231013-0ea67d76a/plat/common/aarch32/plat_sp_min_common.c b/atf-20240117-bacca82a8/plat/common/aarch32/plat_sp_min_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch32/plat_sp_min_common.c rename to atf-20240117-bacca82a8/plat/common/aarch32/plat_sp_min_common.c diff --git a/atf-20231013-0ea67d76a/plat/common/aarch32/platform_helpers.S b/atf-20240117-bacca82a8/plat/common/aarch32/platform_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch32/platform_helpers.S rename to atf-20240117-bacca82a8/plat/common/aarch32/platform_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/common/aarch32/platform_mp_stack.S b/atf-20240117-bacca82a8/plat/common/aarch32/platform_mp_stack.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch32/platform_mp_stack.S rename to atf-20240117-bacca82a8/plat/common/aarch32/platform_mp_stack.S diff --git a/atf-20231013-0ea67d76a/plat/common/aarch32/platform_up_stack.S b/atf-20240117-bacca82a8/plat/common/aarch32/platform_up_stack.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch32/platform_up_stack.S rename to atf-20240117-bacca82a8/plat/common/aarch32/platform_up_stack.S diff --git a/atf-20231013-0ea67d76a/plat/common/aarch64/crash_console_helpers.S b/atf-20240117-bacca82a8/plat/common/aarch64/crash_console_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch64/crash_console_helpers.S rename to atf-20240117-bacca82a8/plat/common/aarch64/crash_console_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/common/aarch64/plat_common.c b/atf-20240117-bacca82a8/plat/common/aarch64/plat_common.c similarity index 96% rename from atf-20231013-0ea67d76a/plat/common/aarch64/plat_common.c rename to atf-20240117-bacca82a8/plat/common/aarch64/plat_common.c index eca81b11f..ab99b1589 100644 --- a/atf-20231013-0ea67d76a/plat/common/aarch64/plat_common.c +++ b/atf-20240117-bacca82a8/plat/common/aarch64/plat_common.c @@ -11,7 +11,7 @@ #include #include #include -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS #include #endif #include @@ -29,7 +29,9 @@ #pragma weak plat_sdei_validate_entry_point #endif +#if FFH_SUPPORT #pragma weak plat_ea_handler = plat_default_ea_handler +#endif void bl31_plat_runtime_setup(void) { @@ -77,11 +79,12 @@ const char *get_el_str(unsigned int el) return "EL1"; } +#if FFH_SUPPORT /* Handler for External Aborts from lower EL including RAS errors */ void plat_default_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie, void *handle, uint64_t flags) { -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS /* Call RAS EA handler */ int handled = ras_ea_handler(ea_reason, syndrome, cookie, handle, flags); if (handled != 0) @@ -99,3 +102,4 @@ void plat_default_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *co */ lower_el_panic(); } +#endif diff --git a/atf-20231013-0ea67d76a/plat/common/aarch64/plat_ehf.c b/atf-20240117-bacca82a8/plat/common/aarch64/plat_ehf.c similarity index 82% rename from atf-20231013-0ea67d76a/plat/common/aarch64/plat_ehf.c rename to atf-20240117-bacca82a8/plat/common/aarch64/plat_ehf.c index be0fac170..6100a2009 100644 --- a/atf-20231013-0ea67d76a/plat/common/aarch64/plat_ehf.c +++ b/atf-20240117-bacca82a8/plat/common/aarch64/plat_ehf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2020, Broadcom * SPDX-License-Identifier: BSD-3-Clause */ @@ -12,7 +12,7 @@ * Enumeration of priority levels on ARM platforms. */ ehf_pri_desc_t plat_exceptions[] = { -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT /* RAS Priority */ EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_RAS_PRI), #endif @@ -25,8 +25,8 @@ ehf_pri_desc_t plat_exceptions[] = { EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SDEI_NORMAL_PRI), #endif -#if SPM_MM -#if RAS_FFH_SUPPORT +#if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) +#if ENABLE_FEAT_RAS && FFH_SUPPORT #if (PLAT_SP_PRI != PLAT_RAS_PRI) EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SP_PRI), #endif diff --git a/atf-20231013-0ea67d76a/plat/common/aarch64/platform_helpers.S b/atf-20240117-bacca82a8/plat/common/aarch64/platform_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch64/platform_helpers.S rename to atf-20240117-bacca82a8/plat/common/aarch64/platform_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/common/aarch64/platform_mp_stack.S b/atf-20240117-bacca82a8/plat/common/aarch64/platform_mp_stack.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch64/platform_mp_stack.S rename to atf-20240117-bacca82a8/plat/common/aarch64/platform_mp_stack.S diff --git a/atf-20231013-0ea67d76a/plat/common/aarch64/platform_up_stack.S b/atf-20240117-bacca82a8/plat/common/aarch64/platform_up_stack.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/aarch64/platform_up_stack.S rename to atf-20240117-bacca82a8/plat/common/aarch64/platform_up_stack.S diff --git a/atf-20231013-0ea67d76a/plat/common/plat_bl1_common.c b/atf-20240117-bacca82a8/plat/common/plat_bl1_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/plat_bl1_common.c rename to atf-20240117-bacca82a8/plat/common/plat_bl1_common.c diff --git a/atf-20231013-0ea67d76a/plat/common/plat_bl_common.c b/atf-20240117-bacca82a8/plat/common/plat_bl_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/plat_bl_common.c rename to atf-20240117-bacca82a8/plat/common/plat_bl_common.c diff --git a/atf-20231013-0ea67d76a/plat/common/plat_gicv2.c b/atf-20240117-bacca82a8/plat/common/plat_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/plat_gicv2.c rename to atf-20240117-bacca82a8/plat/common/plat_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/common/plat_gicv3.c b/atf-20240117-bacca82a8/plat/common/plat_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/plat_gicv3.c rename to atf-20240117-bacca82a8/plat/common/plat_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/common/plat_log_common.c b/atf-20240117-bacca82a8/plat/common/plat_log_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/plat_log_common.c rename to atf-20240117-bacca82a8/plat/common/plat_log_common.c diff --git a/atf-20231013-0ea67d76a/plat/common/plat_psci_common.c b/atf-20240117-bacca82a8/plat/common/plat_psci_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/plat_psci_common.c rename to atf-20240117-bacca82a8/plat/common/plat_psci_common.c diff --git a/atf-20231013-0ea67d76a/plat/common/plat_spmd_manifest.c b/atf-20240117-bacca82a8/plat/common/plat_spmd_manifest.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/plat_spmd_manifest.c rename to atf-20240117-bacca82a8/plat/common/plat_spmd_manifest.c diff --git a/atf-20231013-0ea67d76a/plat/common/tbbr/plat_tbbr.c b/atf-20240117-bacca82a8/plat/common/tbbr/plat_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/tbbr/plat_tbbr.c rename to atf-20240117-bacca82a8/plat/common/tbbr/plat_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/common/ubsan.c b/atf-20240117-bacca82a8/plat/common/ubsan.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/common/ubsan.c rename to atf-20240117-bacca82a8/plat/common/ubsan.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/aarch64/hikey_common.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/aarch64/hikey_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/aarch64/hikey_common.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/aarch64/hikey_common.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/aarch64/hikey_helpers.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey/aarch64/hikey_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/aarch64/hikey_helpers.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/aarch64/hikey_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl1_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl1_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl2_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl2_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl31_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl31_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl_common.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_bl_common.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_bl_common.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_ddr.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_ddr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_ddr.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_ddr.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_image_load.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_image_load.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_io_storage.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_io_storage.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_pm.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_pm.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_pm.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_private.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_private.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_private.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_rotpk.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_rotpk.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_security.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_security.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_security.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_security.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_tbbr.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_tbbr.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_topology.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hikey_topology.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hikey_topology.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_dvfs.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_dvfs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_dvfs.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_dvfs.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_ipc.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_ipc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_ipc.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_ipc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_mcu.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_mcu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_mcu.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_mcu.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_pwrc.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_pwrc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_pwrc.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_pwrc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_pwrc_sram.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_pwrc_sram.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_pwrc_sram.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_pwrc_sram.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_sip_svc.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/hisi_sip_svc.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/hisi_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_acpu.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_acpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_acpu.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_acpu.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_ao.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_ao.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_ao.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_ao.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_peri.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_peri.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_peri.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_peri.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_pin.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_pin.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_pin.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_pin.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_pmctrl.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_pmctrl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6220_regs_pmctrl.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6220_regs_pmctrl.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6553.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6553.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hi6553.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hi6553.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hikey_def.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hikey_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hikey_def.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hikey_def.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hikey_layout.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hikey_layout.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hikey_layout.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hikey_layout.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_ipc.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_ipc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_ipc.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_ipc.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_mcu.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_mcu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_mcu.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_mcu.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_pwrc.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_pwrc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_pwrc.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_pwrc.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_sip_svc.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_sip_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_sip_svc.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_sip_svc.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_sram_map.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_sram_map.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/hisi_sram_map.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/hisi_sram_map.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/plat_macros.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/platform_def.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/include/platform_def.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey/platform.mk b/atf-20240117-bacca82a8/plat/hisilicon/hikey/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey/platform.mk rename to atf-20240117-bacca82a8/plat/hisilicon/hikey/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/aarch64/hikey960_common.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/aarch64/hikey960_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/aarch64/hikey960_common.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/aarch64/hikey960_common.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/aarch64/hikey960_helpers.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/aarch64/hikey960_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/aarch64/hikey960_helpers.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/aarch64/hikey960_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/drivers/ipc/hisi_ipc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/drivers/pwrc/hisi_pwrc.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl1_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl1_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl2_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl2_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl31_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl31_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl_common.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_bl_common.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_bl_common.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_boardid.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_boardid.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_boardid.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_boardid.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_def.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_def.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_def.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_el3_spmc_logical_sp.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_el3_spmc_logical_sp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_el3_spmc_logical_sp.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_el3_spmc_logical_sp.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_image_load.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_image_load.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_io_storage.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_io_storage.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_mcu_load.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_mcu_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_mcu_load.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_mcu_load.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_pm.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_pm.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_pm.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_private.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_private.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_private.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_rotpk.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_rotpk.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_tbbr.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_tbbr.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_topology.c b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/hikey960_topology.c rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/hikey960_topology.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660_crg.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660_crg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660_crg.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660_crg.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660_hkadc.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660_hkadc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660_hkadc.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660_hkadc.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660_mem_map.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660_mem_map.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hi3660_mem_map.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hi3660_mem_map.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hisi_ipc.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hisi_ipc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/hisi_ipc.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/hisi_ipc.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/plat.ld.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/plat_macros.S b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/platform_def.h b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/include/platform_def.h rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/hikey960/platform.mk b/atf-20240117-bacca82a8/plat/hisilicon/hikey960/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/hikey960/platform.mk rename to atf-20240117-bacca82a8/plat/hisilicon/hikey960/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/aarch64/poplar_helpers.S b/atf-20240117-bacca82a8/plat/hisilicon/poplar/aarch64/poplar_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/aarch64/poplar_helpers.S rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/aarch64/poplar_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl1_plat_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/bl1_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl1_plat_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/bl1_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl2_plat_mem_params_desc.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/bl2_plat_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl2_plat_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/bl2_plat_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/bl2_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/bl2_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/hi3798cv200.h b/atf-20240117-bacca82a8/plat/hisilicon/poplar/include/hi3798cv200.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/hi3798cv200.h rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/include/hi3798cv200.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/plat_macros.S b/atf-20240117-bacca82a8/plat/hisilicon/poplar/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/plat_private.h b/atf-20240117-bacca82a8/plat/hisilicon/poplar/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/plat_private.h rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/platform_def.h b/atf-20240117-bacca82a8/plat/hisilicon/poplar/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/platform_def.h rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/poplar_layout.h b/atf-20240117-bacca82a8/plat/hisilicon/poplar/include/poplar_layout.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/include/poplar_layout.h rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/include/poplar_layout.h diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/plat_pm.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/plat_pm.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/plat_storage.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/plat_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/plat_storage.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/plat_storage.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/plat_topology.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/plat_topology.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/platform.mk b/atf-20240117-bacca82a8/plat/hisilicon/poplar/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/platform.mk rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/poplar_gicv2.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/poplar_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/poplar_gicv2.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/poplar_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/hisilicon/poplar/poplar_image_load.c b/atf-20240117-bacca82a8/plat/hisilicon/poplar/poplar_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/hisilicon/poplar/poplar_image_load.c rename to atf-20240117-bacca82a8/plat/hisilicon/poplar/poplar_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/aarch32/imx_uart_console.S b/atf-20240117-bacca82a8/plat/imx/common/aarch32/imx_uart_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/aarch32/imx_uart_console.S rename to atf-20240117-bacca82a8/plat/imx/common/aarch32/imx_uart_console.S diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx7_clock.c b/atf-20240117-bacca82a8/plat/imx/common/imx7_clock.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx7_clock.c rename to atf-20240117-bacca82a8/plat/imx/common/imx7_clock.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx8_helpers.S b/atf-20240117-bacca82a8/plat/imx/common/imx8_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx8_helpers.S rename to atf-20240117-bacca82a8/plat/imx/common/imx8_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx8_psci.c b/atf-20240117-bacca82a8/plat/imx/common/imx8_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx8_psci.c rename to atf-20240117-bacca82a8/plat/imx/common/imx8_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx8_topology.c b/atf-20240117-bacca82a8/plat/imx/common/imx8_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx8_topology.c rename to atf-20240117-bacca82a8/plat/imx/common/imx8_topology.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_aips.c b/atf-20240117-bacca82a8/plat/imx/common/imx_aips.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_aips.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_aips.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_caam.c b/atf-20240117-bacca82a8/plat/imx/common/imx_caam.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_caam.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_caam.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_clock.c b/atf-20240117-bacca82a8/plat/imx/common/imx_clock.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_clock.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_clock.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_csu.c b/atf-20240117-bacca82a8/plat/imx/common/imx_csu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_csu.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_csu.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_ehf.c b/atf-20240117-bacca82a8/plat/imx/common/imx_ehf.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_ehf.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_ehf.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_io_mux.c b/atf-20240117-bacca82a8/plat/imx/common/imx_io_mux.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_io_mux.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_io_mux.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_io_storage.c b/atf-20240117-bacca82a8/plat/imx/common/imx_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_io_storage.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_sdei.c b/atf-20240117-bacca82a8/plat/imx/common/imx_sdei.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_sdei.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_sdei.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_sip_handler.c b/atf-20240117-bacca82a8/plat/imx/common/imx_sip_handler.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_sip_handler.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_sip_handler.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_sip_svc.c b/atf-20240117-bacca82a8/plat/imx/common/imx_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_sip_svc.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_snvs.c b/atf-20240117-bacca82a8/plat/imx/common/imx_snvs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_snvs.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_snvs.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_uart_console.S b/atf-20240117-bacca82a8/plat/imx/common/imx_uart_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_uart_console.S rename to atf-20240117-bacca82a8/plat/imx/common/imx_uart_console.S diff --git a/atf-20231013-0ea67d76a/plat/imx/common/imx_wdog.c b/atf-20240117-bacca82a8/plat/imx/common/imx_wdog.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/imx_wdog.c rename to atf-20240117-bacca82a8/plat/imx/common/imx_wdog.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx8_iomux.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx8_iomux.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx8_iomux.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx8_iomux.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx8_lpuart.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx8_lpuart.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx8_lpuart.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx8_lpuart.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx8qm_pads.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx8qm_pads.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx8qm_pads.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx8qm_pads.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx8qx_pads.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx8qx_pads.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx8qx_pads.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx8qx_pads.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_aips.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_aips.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_aips.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_aips.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_caam.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_caam.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_caam.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_caam.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_clock.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_clock.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_clock.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_clock.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_csu.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_csu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_csu.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_csu.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_hab.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_hab.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_hab.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_hab.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_io_mux.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_io_mux.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_io_mux.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_io_mux.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_sip_svc.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_sip_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_sip_svc.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_sip_svc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_snvs.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_snvs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_snvs.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_snvs.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_uart.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_uart.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_uart.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_uart.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/imx_wdog.h b/atf-20240117-bacca82a8/plat/imx/common/include/imx_wdog.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/imx_wdog.h rename to atf-20240117-bacca82a8/plat/imx/common/include/imx_wdog.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/plat_imx8.h b/atf-20240117-bacca82a8/plat/imx/common/include/plat_imx8.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/plat_imx8.h rename to atf-20240117-bacca82a8/plat/imx/common/include/plat_imx8.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/imx/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/imx/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/sci.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/sci.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_ipc.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_ipc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_ipc.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_ipc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_rpc.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_rpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_rpc.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_rpc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_scfw.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_scfw.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_scfw.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_scfw.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_types.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_types.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/sci_types.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/sci_types.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/misc/sci_misc_api.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/misc/sci_misc_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/misc/sci_misc_api.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/misc/sci_misc_api.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/pad/sci_pad_api.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/pad/sci_pad_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/pad/sci_pad_api.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/pad/sci_pad_api.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/pm/sci_pm_api.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/pm/sci_pm_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/pm/sci_pm_api.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/pm/sci_pm_api.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/rm/sci_rm_api.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/rm/sci_rm_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/rm/sci_rm_api.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/rm/sci_rm_api.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/timer/sci_timer_api.h b/atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/timer/sci_timer_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/include/sci/svc/timer/sci_timer_api.h rename to atf-20240117-bacca82a8/plat/imx/common/include/sci/svc/timer/sci_timer_api.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/lpuart_console.S b/atf-20240117-bacca82a8/plat/imx/common/lpuart_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/lpuart_console.S rename to atf-20240117-bacca82a8/plat/imx/common/lpuart_console.S diff --git a/atf-20231013-0ea67d76a/plat/imx/common/plat_imx8_gic.c b/atf-20240117-bacca82a8/plat/imx/common/plat_imx8_gic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/plat_imx8_gic.c rename to atf-20240117-bacca82a8/plat/imx/common/plat_imx8_gic.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/imx8_mu.c b/atf-20240117-bacca82a8/plat/imx/common/sci/imx8_mu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/imx8_mu.c rename to atf-20240117-bacca82a8/plat/imx/common/sci/imx8_mu.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/imx8_mu.h b/atf-20240117-bacca82a8/plat/imx/common/sci/imx8_mu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/imx8_mu.h rename to atf-20240117-bacca82a8/plat/imx/common/sci/imx8_mu.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/ipc.c b/atf-20240117-bacca82a8/plat/imx/common/sci/ipc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/ipc.c rename to atf-20240117-bacca82a8/plat/imx/common/sci/ipc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/sci_api.mk b/atf-20240117-bacca82a8/plat/imx/common/sci/sci_api.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/sci_api.mk rename to atf-20240117-bacca82a8/plat/imx/common/sci/sci_api.mk diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/misc/sci_misc_rpc.h b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/misc/sci_misc_rpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/misc/sci_misc_rpc.h rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/misc/sci_misc_rpc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pad/pad_rpc_clnt.c b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/pad/pad_rpc_clnt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pad/pad_rpc_clnt.c rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/pad/pad_rpc_clnt.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pad/sci_pad_rpc.h b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/pad/sci_pad_rpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pad/sci_pad_rpc.h rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/pad/sci_pad_rpc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pm/pm_rpc_clnt.c b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/pm/pm_rpc_clnt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pm/pm_rpc_clnt.c rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/pm/pm_rpc_clnt.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pm/sci_pm_rpc.h b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/pm/sci_pm_rpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/pm/sci_pm_rpc.h rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/pm/sci_pm_rpc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/rm/rm_rpc_clnt.c b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/rm/rm_rpc_clnt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/rm/rm_rpc_clnt.c rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/rm/rm_rpc_clnt.c diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/rm/sci_rm_rpc.h b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/rm/sci_rm_rpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/rm/sci_rm_rpc.h rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/rm/sci_rm_rpc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/timer/sci_timer_rpc.h b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/timer/sci_timer_rpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/timer/sci_timer_rpc.h rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/timer/sci_timer_rpc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/common/sci/svc/timer/timer_rpc_clnt.c b/atf-20240117-bacca82a8/plat/imx/common/sci/svc/timer/timer_rpc_clnt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/common/sci/svc/timer/timer_rpc_clnt.c rename to atf-20240117-bacca82a8/plat/imx/common/sci/svc/timer/timer_rpc_clnt.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7.mk b/atf-20240117-bacca82a8/plat/imx/imx7/common/imx7.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7.mk rename to atf-20240117-bacca82a8/plat/imx/imx7/common/imx7.mk diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_bl2_el3_common.c b/atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_bl2_el3_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_bl2_el3_common.c rename to atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_bl2_el3_common.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_helpers.S b/atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_helpers.S rename to atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_image_load.c b/atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_image_load.c rename to atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_rotpk.S b/atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_rotpk.S rename to atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_trusted_boot.c b/atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/common/imx7_trusted_boot.c rename to atf-20240117-bacca82a8/plat/imx/imx7/common/imx7_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/include/imx7_def.h b/atf-20240117-bacca82a8/plat/imx/imx7/include/imx7_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/include/imx7_def.h rename to atf-20240117-bacca82a8/plat/imx/imx7/include/imx7_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/include/imx_hab_arch.h b/atf-20240117-bacca82a8/plat/imx/imx7/include/imx_hab_arch.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/include/imx_hab_arch.h rename to atf-20240117-bacca82a8/plat/imx/imx7/include/imx_hab_arch.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/include/imx_regs.h b/atf-20240117-bacca82a8/plat/imx/imx7/include/imx_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/include/imx_regs.h rename to atf-20240117-bacca82a8/plat/imx/imx7/include/imx_regs.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/picopi/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx7/picopi/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/picopi/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx7/picopi/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/picopi/picopi_bl2_el3_setup.c b/atf-20240117-bacca82a8/plat/imx/imx7/picopi/picopi_bl2_el3_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/picopi/picopi_bl2_el3_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx7/picopi/picopi_bl2_el3_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/picopi/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx7/picopi/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/picopi/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx7/picopi/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/warp7/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx7/warp7/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/warp7/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx7/warp7/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/warp7/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx7/warp7/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/warp7/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx7/warp7/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c b/atf-20240117-bacca82a8/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx7/warp7/warp7_bl2_el3_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/clock.c b/atf-20240117-bacca82a8/plat/imx/imx8m/ddr/clock.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/clock.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/ddr/clock.c index 31f2f560e..21a1b6842 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/clock.c +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/ddr/clock.c @@ -91,12 +91,16 @@ void dram_pll_init(unsigned int drate) case 4000: mmio_write_32(DRAM_PLL_CTRL + 0x4, (250 << 12) | (3 << 4) | 1); break; + case 3734: case 3733: case 3732: mmio_write_32(DRAM_PLL_CTRL + 0x4, (311 << 12) | (4 << 4) | 1); break; + case 3600: + mmio_write_32(DRAM_PLL_CTRL + 0x4, (300 << 12) | (8 << 4) | 0); + break; case 3200: - mmio_write_32(DRAM_PLL_CTRL + 0x4, (200 << 12) | (3 << 4) | 1); + mmio_write_32(DRAM_PLL_CTRL + 0x4, (300 << 12) | (9 << 4) | 0); break; case 2400: mmio_write_32(DRAM_PLL_CTRL + 0x4, (300 << 12) | (3 << 4) | 2); diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/ddr4_dvfs.c b/atf-20240117-bacca82a8/plat/imx/imx8m/ddr/ddr4_dvfs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/ddr4_dvfs.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/ddr/ddr4_dvfs.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/dram.c b/atf-20240117-bacca82a8/plat/imx/imx8m/ddr/dram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/dram.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/ddr/dram.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/dram_retention.c b/atf-20240117-bacca82a8/plat/imx/imx8m/ddr/dram_retention.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/dram_retention.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/ddr/dram_retention.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/lpddr4_dvfs.c b/atf-20240117-bacca82a8/plat/imx/imx8m/ddr/lpddr4_dvfs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/ddr/lpddr4_dvfs.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/ddr/lpddr4_dvfs.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/gpc_common.c b/atf-20240117-bacca82a8/plat/imx/imx8m/gpc_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/gpc_common.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/gpc_common.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_caam.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_caam.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_caam.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_caam.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_ccm.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_ccm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_ccm.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_ccm.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_csu.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_csu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_csu.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_csu.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_dyn_cfg_helpers.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_dyn_cfg_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_dyn_cfg_helpers.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_dyn_cfg_helpers.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_image_load.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_image_load.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_measured_boot.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_measured_boot.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_measured_boot.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_psci_common.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_psci_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_psci_common.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_psci_common.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_snvs.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_snvs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8m_snvs.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8m_snvs.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/gpc.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/gpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/gpc.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/gpc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_bl2_el3_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_bl2_el3_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_bl2_el3_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_bl2_el3_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_psci.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_psci.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_rotpk.S b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_rotpk.S rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_trusted_boot.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/imx8mm_trusted_boot.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/imx8mm_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/gpc_reg.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/gpc_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/gpc_reg.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/gpc_reg.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/imx8mm_private.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/imx8mm_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/imx8mm_private.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/imx8mm_private.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/imx_sec_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/imx_sec_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/imx_sec_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/imx_sec_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/platform_def.h index 65749f348..349233abc 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/include/platform_def.h @@ -60,7 +60,9 @@ #define BL31_LIMIT (BL31_BASE + BL31_SIZE) /* non-secure uboot base */ +#ifndef PLAT_NS_IMAGE_OFFSET #define PLAT_NS_IMAGE_OFFSET U(0x40200000) +#endif #define PLAT_NS_IMAGE_SIZE U(0x00200000) #define BL32_FDT_OVERLAY_ADDR (PLAT_NS_IMAGE_OFFSET + 0x3000000) diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/platform.mk similarity index 97% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/platform.mk index 97f4f2488..613682087 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mm/platform.mk +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mm/platform.mk @@ -153,6 +153,10 @@ ERRATA_A53_835769 := 1 ERRATA_A53_843419 := 1 ERRATA_A53_855873 := 1 +ifneq (${PRELOADED_BL33_BASE},) +$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE})) +endif + BL32_BASE ?= 0xbe000000 $(eval $(call add_define,BL32_BASE)) diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/gpc.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/gpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/gpc.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/gpc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/imx8mn_psci.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/imx8mn_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/imx8mn_psci.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/imx8mn_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/include/gpc_reg.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/include/gpc_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/include/gpc_reg.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/include/gpc_reg.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/include/imx_sec_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/include/imx_sec_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/include/imx_sec_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/include/imx_sec_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/include/platform_def.h index d5176dd17..8e7be98ec 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/include/platform_def.h @@ -45,7 +45,9 @@ #define BL31_LIMIT (BL31_BASE + BL31_SIZE) /* non-secure uboot base */ +#ifndef PLAT_NS_IMAGE_OFFSET #define PLAT_NS_IMAGE_OFFSET U(0x40200000) +#endif #define BL32_FDT_OVERLAY_ADDR (PLAT_NS_IMAGE_OFFSET + 0x3000000) diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/platform.mk similarity index 95% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/platform.mk index e0826e29a..6036b6adf 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mn/platform.mk +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mn/platform.mk @@ -59,6 +59,10 @@ ERRATA_A53_835769 := 1 ERRATA_A53_843419 := 1 ERRATA_A53_855873 := 1 +ifneq (${PRELOADED_BL33_BASE},) +$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE})) +endif + BL32_BASE ?= 0xbe000000 $(eval $(call add_define,BL32_BASE)) diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/gpc.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/gpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/gpc.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/gpc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_bl2_el3_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_bl2_el3_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_bl2_el3_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_bl2_el3_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_psci.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_psci.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_rotpk.S b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_rotpk.S rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_trusted_boot.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/imx8mp_trusted_boot.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/imx8mp_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/gpc_reg.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/gpc_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/gpc_reg.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/gpc_reg.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/imx8mp_private.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/imx8mp_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/imx8mp_private.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/imx8mp_private.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/imx_sec_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/imx_sec_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/imx_sec_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/imx_sec_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/platform_def.h index 128127052..4a0383046 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/include/platform_def.h @@ -62,7 +62,9 @@ #define PLAT_SDEI_SGI_PRIVATE U(9) /* non-secure uboot base */ +#ifndef PLAT_NS_IMAGE_OFFSET #define PLAT_NS_IMAGE_OFFSET U(0x40200000) +#endif #define PLAT_NS_IMAGE_SIZE U(0x00200000) #define BL32_FDT_OVERLAY_ADDR (PLAT_NS_IMAGE_OFFSET + 0x3000000) diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/platform.mk similarity index 97% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/platform.mk index ce6907195..40764b151 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mp/platform.mk +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mp/platform.mk @@ -150,6 +150,10 @@ ERRATA_A53_835769 := 1 ERRATA_A53_843419 := 1 ERRATA_A53_855873 := 1 +ifneq (${PRELOADED_BL33_BASE},) +$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE})) +endif + BL32_BASE ?= 0x56000000 $(eval $(call add_define,BL32_BASE)) diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/gpc.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/gpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/gpc.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/gpc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/imx8mq_psci.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/imx8mq_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/imx8mq_psci.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/imx8mq_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/include/gpc_reg.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/include/gpc_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/include/gpc_reg.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/include/gpc_reg.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/include/imx_sec_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/include/imx_sec_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/include/imx_sec_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/include/imx_sec_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/include/platform_def.h index 2526a02db..b04f3915e 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/include/platform_def.h @@ -38,7 +38,9 @@ #define BL31_LIMIT (BL31_BASE + BL31_SIZE) /* non-secure uboot base */ +#ifndef PLAT_NS_IMAGE_OFFSET #define PLAT_NS_IMAGE_OFFSET U(0x40200000) +#endif #define BL32_FDT_OVERLAY_ADDR (PLAT_NS_IMAGE_OFFSET + 0x3000000) /* GICv3 base address */ diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/platform.mk similarity index 94% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/platform.mk index b1c189fa0..2356cbd03 100644 --- a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx8mq/platform.mk +++ b/atf-20240117-bacca82a8/plat/imx/imx8m/imx8mq/platform.mk @@ -55,6 +55,10 @@ ERRATA_A53_835769 := 1 ERRATA_A53_843419 := 1 ERRATA_A53_855873 := 1 +ifneq (${PRELOADED_BL33_BASE},) +$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE})) +endif + BL32_BASE ?= 0xfe000000 $(eval $(call add_define,BL32_BASE)) diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx_aipstz.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx_aipstz.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx_aipstz.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx_aipstz.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx_hab.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx_hab.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx_hab.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx_hab.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/imx_rdc.c b/atf-20240117-bacca82a8/plat/imx/imx8m/imx_rdc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/imx_rdc.c rename to atf-20240117-bacca82a8/plat/imx/imx8m/imx_rdc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/ddrc.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/ddrc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/ddrc.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/ddrc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/dram.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/dram.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/dram.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/dram.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/gpc.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/gpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/gpc.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/gpc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_caam.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_caam.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_caam.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_caam.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_ccm.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_ccm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_ccm.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_ccm.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_csu.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_csu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_csu.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_csu.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_measured_boot.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_measured_boot.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_measured_boot.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_measured_boot.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_psci.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_psci.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_psci.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_psci.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_snvs.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_snvs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx8m_snvs.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx8m_snvs.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx_aipstz.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx_aipstz.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx_aipstz.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx_aipstz.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx_rdc.h b/atf-20240117-bacca82a8/plat/imx/imx8m/include/imx_rdc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8m/include/imx_rdc.h rename to atf-20240117-bacca82a8/plat/imx/imx8m/include/imx_rdc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qm/imx8qm_bl31_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8qm/imx8qm_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qm/imx8qm_bl31_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8qm/imx8qm_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qm/imx8qm_psci.c b/atf-20240117-bacca82a8/plat/imx/imx8qm/imx8qm_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qm/imx8qm_psci.c rename to atf-20240117-bacca82a8/plat/imx/imx8qm/imx8qm_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qm/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx8qm/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qm/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8qm/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qm/include/sec_rsrc.h b/atf-20240117-bacca82a8/plat/imx/imx8qm/include/sec_rsrc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qm/include/sec_rsrc.h rename to atf-20240117-bacca82a8/plat/imx/imx8qm/include/sec_rsrc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qm/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx8qm/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qm/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx8qm/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qx/imx8qx_bl31_setup.c b/atf-20240117-bacca82a8/plat/imx/imx8qx/imx8qx_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qx/imx8qx_bl31_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx8qx/imx8qx_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qx/imx8qx_psci.c b/atf-20240117-bacca82a8/plat/imx/imx8qx/imx8qx_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qx/imx8qx_psci.c rename to atf-20240117-bacca82a8/plat/imx/imx8qx/imx8qx_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qx/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx8qx/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qx/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx8qx/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qx/include/sec_rsrc.h b/atf-20240117-bacca82a8/plat/imx/imx8qx/include/sec_rsrc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qx/include/sec_rsrc.h rename to atf-20240117-bacca82a8/plat/imx/imx8qx/include/sec_rsrc.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx8qx/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx8qx/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx8qx/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx8qx/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/imx/imx93/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/imx/imx93/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/imx93_bl31_setup.c b/atf-20240117-bacca82a8/plat/imx/imx93/imx93_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/imx93_bl31_setup.c rename to atf-20240117-bacca82a8/plat/imx/imx93/imx93_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/imx93_psci.c b/atf-20240117-bacca82a8/plat/imx/imx93/imx93_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/imx93_psci.c rename to atf-20240117-bacca82a8/plat/imx/imx93/imx93_psci.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/include/platform_def.h b/atf-20240117-bacca82a8/plat/imx/imx93/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/include/platform_def.h rename to atf-20240117-bacca82a8/plat/imx/imx93/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/include/pwr_ctrl.h b/atf-20240117-bacca82a8/plat/imx/imx93/include/pwr_ctrl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/include/pwr_ctrl.h rename to atf-20240117-bacca82a8/plat/imx/imx93/include/pwr_ctrl.h diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/plat_topology.c b/atf-20240117-bacca82a8/plat/imx/imx93/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/plat_topology.c rename to atf-20240117-bacca82a8/plat/imx/imx93/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/platform.mk b/atf-20240117-bacca82a8/plat/imx/imx93/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/platform.mk rename to atf-20240117-bacca82a8/plat/imx/imx93/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/pwr_ctrl.c b/atf-20240117-bacca82a8/plat/imx/imx93/pwr_ctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/pwr_ctrl.c rename to atf-20240117-bacca82a8/plat/imx/imx93/pwr_ctrl.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/trdc.c b/atf-20240117-bacca82a8/plat/imx/imx93/trdc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/trdc.c rename to atf-20240117-bacca82a8/plat/imx/imx93/trdc.c diff --git a/atf-20231013-0ea67d76a/plat/imx/imx93/trdc_config.h b/atf-20240117-bacca82a8/plat/imx/imx93/trdc_config.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/imx/imx93/trdc_config.h rename to atf-20240117-bacca82a8/plat/imx/imx93/trdc_config.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex/bl2_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/bl2_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex/bl31_plat_setup.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/bl31_plat_setup.c index b4e19def9..6e4515894 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/bl31_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex/bl31_plat_setup.c @@ -136,8 +136,6 @@ void bl31_platform_setup(void) (uint64_t)plat_secondary_cpus_bl31_entry); mailbox_hps_stage_notify(HPS_EXECUTION_STATE_SSBL); - - ncore_enable_ocram_firewall(); } const mmap_region_t plat_agilex_mmap[] = { diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_clock_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_clock_manager.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_clock_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_clock_manager.h index ee2224187..2ca694788 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_clock_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_clock_manager.h @@ -129,5 +129,6 @@ uint32_t get_uart_clk(void); uint32_t get_mmc_clk(void); uint32_t get_mpu_clk(void); uint32_t get_cpu_clk(void); +uint32_t get_mpu_periph_clk(void); #endif diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_memory_controller.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_memory_controller.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_memory_controller.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_memory_controller.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_mmc.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_mmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_mmc.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_mmc.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_pinmux.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_pinmux.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_pinmux.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_pinmux.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_system_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_system_manager.h similarity index 94% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_system_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_system_manager.h index cb9222d5a..20a62bec9 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/agilex_system_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/agilex_system_manager.h @@ -143,6 +143,18 @@ #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_8 0x278 #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_9 0x27C +/* QSPI ECC from SDM register */ +#define SOCFPGA_ECC_QSPI_CTRL 0x08 +#define SOCFPGA_ECC_QSPI_ERRINTEN 0x10 +#define SOCFPGA_ECC_QSPI_ERRINTENS 0x14 +#define SOCFPGA_ECC_QSPI_ERRINTENR 0x18 +#define SOCFPGA_ECC_QSPI_INTMODE 0x1C +#define SOCFPGA_ECC_QSPI_INTSTAT 0x20 +#define SOCFPGA_ECC_QSPI_INTTEST 0x24 +#define SOCFPGA_ECC_QSPI_ECC_ACCCTRL 0x78 +#define SOCFPGA_ECC_QSPI_ECC_STARTACC 0x7C +#define SOCFPGA_ECC_QSPI_ECC_WDCTRL 0x80 + #define DMA0_STREAM_CTRL_REG 0x10D1217C #define DMA1_STREAM_CTRL_REG 0x10D12180 #define SDM_STREAM_CTRL_REG 0x10D12184 @@ -183,6 +195,9 @@ #define RMMUSECSID_REG_VAL BIT(5) /* Macros */ +#define SOCFPGA_ECC_QSPI(_reg) (SOCFPGA_ECC_QSPI_REG_BASE \ + + (SOCFPGA_ECC_QSPI_##_reg)) + #define SOCFPGA_SYSMGR(_reg) (SOCFPGA_SYSMGR_REG_BASE \ + (SOCFPGA_SYSMGR_##_reg)) diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/socfpga_plat_def.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/socfpga_plat_def.h similarity index 72% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/socfpga_plat_def.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/include/socfpga_plat_def.h index a744d0935..9ef75986a 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/include/socfpga_plat_def.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex/include/socfpga_plat_def.h @@ -9,14 +9,15 @@ #define PLAT_SOCFPGA_DEF_H #include "agilex_system_manager.h" +#include #include /* Platform Setting */ -#define PLATFORM_MODEL PLAT_SOCFPGA_AGILEX -#define BOOT_SOURCE BOOT_SOURCE_SDMMC -#define PLAT_PRIMARY_CPU 0 +#define PLATFORM_MODEL PLAT_SOCFPGA_AGILEX +#define BOOT_SOURCE BOOT_SOURCE_SDMMC +#define PLAT_PRIMARY_CPU 0 #define PLAT_CLUSTER_ID_MPIDR_AFF_SHIFT MPIDR_AFF1_SHIFT -#define PLAT_CPU_ID_MPIDR_AFF_SHIFT MPIDR_AFF0_SHIFT +#define PLAT_CPU_ID_MPIDR_AFF_SHIFT MPIDR_AFF0_SHIFT /* FPGA config helpers */ #define INTEL_SIP_SMC_FPGA_CONFIG_ADDR 0x400000 @@ -34,6 +35,7 @@ #define SOCFPGA_MEMCTRL_REG_BASE 0xf8011100 #define SOCFPGA_RSTMGR_REG_BASE 0xffd11000 #define SOCFPGA_SYSMGR_REG_BASE 0xffd12000 +#define SOCFPGA_ECC_QSPI_REG_BASE 0xffa22000 #define SOCFPGA_L4_PER_SCR_REG_BASE 0xffd21000 #define SOCFPGA_L4_SYS_SCR_REG_BASE 0xffd21100 @@ -64,34 +66,39 @@ #define DEVICE4_BASE (0x2000000000) #define DEVICE4_SIZE (0x0100000000) -#define BL2_BASE (0xffe00000) -#define BL2_LIMIT (0xffe1b000) +#define BL2_BASE (0xffe00000) +#define BL2_LIMIT (0xffe2b000) -#define BL31_BASE (0x1000) -#define BL31_LIMIT (0x81000) +#define BL31_BASE (0x1000) +#define BL31_LIMIT (0x81000) /******************************************************************************* * UART related constants ******************************************************************************/ -#define PLAT_UART0_BASE (0xFFC02000) -#define PLAT_UART1_BASE (0xFFC02100) +#define PLAT_UART0_BASE (0xFFC02000) +#define PLAT_UART1_BASE (0xFFC02100) + +/******************************************************************************* + * WDT related constants + ******************************************************************************/ +#define WDT_BASE (0xFFD00200) /******************************************************************************* * GIC related constants ******************************************************************************/ -#define PLAT_GIC_BASE (0xFFFC0000) -#define PLAT_GICC_BASE (PLAT_GIC_BASE + 0x2000) -#define PLAT_GICD_BASE (PLAT_GIC_BASE + 0x1000) -#define PLAT_GICR_BASE 0 +#define PLAT_GIC_BASE (0xFFFC0000) +#define PLAT_GICC_BASE (PLAT_GIC_BASE + 0x2000) +#define PLAT_GICD_BASE (PLAT_GIC_BASE + 0x1000) +#define PLAT_GICR_BASE 0 -#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (400000000) -#define PLAT_HZ_CONVERT_TO_MHZ (1000000) +#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (400000000) +#define PLAT_HZ_CONVERT_TO_MHZ (1000000) /******************************************************************************* * SDMMC related pointer function ******************************************************************************/ -#define SDMMC_READ_BLOCKS mmc_read_blocks -#define SDMMC_WRITE_BLOCKS mmc_write_blocks +#define SDMMC_READ_BLOCKS mmc_read_blocks +#define SDMMC_WRITE_BLOCKS mmc_write_blocks /******************************************************************************* * sysmgr.boot_scratch_cold6 & 7 (64bit) are used to indicate L2 reset @@ -100,6 +107,6 @@ #define L2_RESET_DONE_REG 0xFFD12218 /* Platform specific system counter */ -#define PLAT_SYS_COUNTER_FREQ_IN_MHZ get_cpu_clk() +#define PLAT_SYS_COUNTER_FREQ_IN_MHZ U(400) #endif /* PLAT_SOCFPGA_DEF_H */ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/platform.mk b/atf-20240117-bacca82a8/plat/intel/soc/agilex/platform.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/platform.mk rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/platform.mk index 5c92f7255..f81480d7d 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/platform.mk +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex/platform.mk @@ -53,6 +53,7 @@ BL2_SOURCES += \ plat/intel/soc/common/soc/socfpga_handoff.c \ plat/intel/soc/common/soc/socfpga_mailbox.c \ plat/intel/soc/common/soc/socfpga_reset_manager.c \ + plat/intel/soc/common/drivers/ddr/ddr.c \ plat/intel/soc/common/drivers/qspi/cadence_qspi.c \ plat/intel/soc/common/drivers/wdt/watchdog.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_clock_manager.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_clock_manager.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_clock_manager.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_clock_manager.c index d32c3f149..391eac635 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_clock_manager.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_clock_manager.c @@ -398,12 +398,36 @@ uint32_t get_mpu_clk(void) return mpu_clk; } +uint32_t get_l4_clk(void) +{ + uint32_t l4_clk; + + l4_clk = get_clk_freq(CLKMGR_MAINPLL_NOCCLK, CLKMGR_MAINPLL_PLLC1, + CLKMGR_PERPLL_PLLC1); + return l4_clk; +} + /* Get cpu freq clock */ uint32_t get_cpu_clk(void) { uint32_t cpu_clk; - cpu_clk = get_mpu_clk()/PLAT_HZ_CONVERT_TO_MHZ; + cpu_clk = get_l4_clk()/PLAT_HZ_CONVERT_TO_MHZ; return cpu_clk; } + +/* Return mpu_periph_clk clock frequency */ +uint32_t get_mpu_periph_clk(void) +{ + uint32_t mpu_periph_clk = 0; + /* mpu_periph_clk is mpu_clk, via a static /4 divider */ + mpu_periph_clk = (get_mpu_clk()/4)/PLAT_HZ_CONVERT_TO_MHZ; + return mpu_periph_clk; +} + +/* Return mpu_periph_clk tick */ +unsigned int plat_get_syscnt_freq2(void) +{ + return PLAT_SYS_COUNTER_FREQ_IN_TICKS; +} diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_memory_controller.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_memory_controller.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_memory_controller.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_memory_controller.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_mmc.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_mmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_mmc.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_mmc.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_pinmux.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_pinmux.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex/soc/agilex_pinmux.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex/soc/agilex_pinmux.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/bl2_plat_setup.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/bl2_plat_setup.c index a2fafd2ff..5c15148b6 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/bl2_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/bl2_plat_setup.c @@ -84,7 +84,13 @@ void bl2_el3_early_platform_setup(u_register_t x0, u_register_t x1, PLAT_BAUDRATE, &console); /* Store magic number */ - mmio_write_32(L2_RESET_DONE_REG, PLAT_L2_RESET_REQ); + // TODO: Temp workaround to ungate testing + // mmio_write_32(L2_RESET_DONE_REG, PLAT_L2_RESET_REQ); + + if (!intel_mailbox_is_fpga_not_ready()) { + socfpga_bridges_enable(SOC2FPGA_MASK | LWHPS2FPGA_MASK | + FPGA2SOC_MASK | F2SDRAM0_MASK); + } } void bl2_el3_plat_arch_setup(void) diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/bl31_plat_setup.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/bl31_plat_setup.c index 5ae4bf77f..0d4f2cc52 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/bl31_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/bl31_plat_setup.c @@ -167,10 +167,6 @@ void bl31_platform_setup(void) gicv3_rdistif_init(plat_my_core_pos()); gicv3_cpuif_enable(plat_my_core_pos()); mailbox_hps_stage_notify(HPS_EXECUTION_STATE_SSBL); -#if !defined(SIMICS_RUN) - ncore_enable_ocram_firewall(); -#endif - } const mmap_region_t plat_agilex_mmap[] = { diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_clock_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_clock_manager.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_clock_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_clock_manager.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_memory_controller.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_memory_controller.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_memory_controller.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_memory_controller.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_mmc.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_mmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_mmc.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_mmc.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_pinmux.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_pinmux.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_pinmux.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_pinmux.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_power_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_power_manager.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_power_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_power_manager.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_system_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_system_manager.h similarity index 93% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_system_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_system_manager.h index 9a58cdb1f..46596bfa4 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/agilex5_system_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/agilex5_system_manager.h @@ -142,6 +142,20 @@ #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_7 0x274 #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_8 0x278 #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_9 0x27C +#define SOCFPGA_SYSMGR_SDM_BE_AWADDR_REMAP 0x280 +#define SOCFPGA_SYSMGR_SDM_BE_ARADDR_REMAP 0x284 + +/* QSPI ECC from SDM register */ +#define SOCFPGA_ECC_QSPI_CTRL 0x08 +#define SOCFPGA_ECC_QSPI_ERRINTEN 0x10 +#define SOCFPGA_ECC_QSPI_ERRINTENS 0x14 +#define SOCFPGA_ECC_QSPI_ERRINTENR 0x18 +#define SOCFPGA_ECC_QSPI_INTMODE 0x1C +#define SOCFPGA_ECC_QSPI_INTSTAT 0x20 +#define SOCFPGA_ECC_QSPI_INTTEST 0x24 +#define SOCFPGA_ECC_QSPI_ECC_ACCCTRL 0x78 +#define SOCFPGA_ECC_QSPI_ECC_STARTACC 0x7C +#define SOCFPGA_ECC_QSPI_ECC_WDCTRL 0x80 #define DMA0_STREAM_CTRL_REG 0x10D1217C #define DMA1_STREAM_CTRL_REG 0x10D12180 @@ -187,9 +201,10 @@ #define RMMUSECSID_REG_VAL BIT(5) /* Macros */ +#define SOCFPGA_ECC_QSPI(_reg) (SOCFPGA_ECC_QSPI_REG_BASE \ + + (SOCFPGA_ECC_QSPI_##_reg)) #define SOCFPGA_SYSMGR(_reg) (SOCFPGA_SYSMGR_REG_BASE \ + (SOCFPGA_SYSMGR_##_reg)) - #define ENABLE_STREAMID WSTREAMIDEN_REG_CTRL \ | RSTREAMIDEN_REG_CTRL #define ENABLE_STREAMID_SECURE_TX WSTREAMIDEN_REG_CTRL \ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/socfpga_plat_def.h b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/socfpga_plat_def.h similarity index 88% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/socfpga_plat_def.h rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/socfpga_plat_def.h index 8a49d613b..1ce1cff1e 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/include/socfpga_plat_def.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/include/socfpga_plat_def.h @@ -23,9 +23,12 @@ #define PLAT_CPU_ID_MPIDR_AFF_SHIFT MPIDR_AFF1_SHIFT #define PLAT_L2_RESET_REQ 0xB007C0DE -/* System Counter */ /* TODO: Update back to 400MHz */ -#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (80000000) -#define PLAT_SYS_COUNTER_FREQ_IN_MHZ (80) +/* System Counter */ +/* TODO: Update back to 400MHz. + * This shall be updated to read from L4 clock instead of hardcoded. + */ +#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (400000000) +#define PLAT_SYS_COUNTER_FREQ_IN_MHZ (400) /* FPGA config helpers */ #define INTEL_SIP_SMC_FPGA_CONFIG_ADDR 0x400000 @@ -45,6 +48,7 @@ #define SOCFPGA_SYSMGR_REG_BASE 0x10d12000 #define SOCFPGA_PINMUX_REG_BASE 0x10d13000 #define SOCFPGA_NAND_REG_BASE 0x10B80000 +#define SOCFPGA_ECC_QSPI_REG_BASE 0x10A22000 #define SOCFPGA_L4_PER_SCR_REG_BASE 0x10d21000 #define SOCFPGA_L4_SYS_SCR_REG_BASE 0x10d21100 @@ -83,7 +87,7 @@ #define GIC_SIZE (0x00100000) #define BL2_BASE (0x00000000) -#define BL2_LIMIT (0x0001b000) +#define BL2_LIMIT (0x0002b000) #define BL31_BASE (0x80000000) #define BL31_LIMIT (0x82000000) @@ -94,6 +98,11 @@ #define PLAT_UART0_BASE (0x10C02000) #define PLAT_UART1_BASE (0x10C02100) +/******************************************************************************* + * WDT related constants + ******************************************************************************/ +#define WDT_BASE (0x10D00200) + /******************************************************************************* * GIC related constants ******************************************************************************/ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/platform.mk b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/platform.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/platform.mk rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/platform.mk index 546bc2e72..b42253b38 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/platform.mk +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/platform.mk @@ -83,6 +83,7 @@ BL31_SOURCES += \ lib/cpus/aarch64/cortex_a76.S \ plat/common/plat_psci_common.c \ plat/intel/soc/agilex5/bl31_plat_setup.c \ + plat/intel/soc/agilex5/soc/agilex5_clock_manager.c \ plat/intel/soc/agilex5/soc/agilex5_power_manager.c \ plat/intel/soc/common/socfpga_psci.c \ plat/intel/soc/common/socfpga_sip_svc.c \ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_clock_manager.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_clock_manager.c similarity index 97% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_clock_manager.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_clock_manager.c index cc681532f..fdf1a82aa 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_clock_manager.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_clock_manager.c @@ -14,6 +14,7 @@ #include "agilex5_clock_manager.h" #include "agilex5_system_manager.h" #include "socfpga_handoff.h" +#include "socfpga_system_manager.h" uint32_t wait_pll_lock(void) { @@ -251,3 +252,9 @@ uint32_t get_mmc_clk(void) return mmc_clk; } + +/* Return mpu_periph_clk tick */ +unsigned int plat_get_syscnt_freq2(void) +{ + return PLAT_SYS_COUNTER_FREQ_IN_TICKS; +} diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_memory_controller.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_memory_controller.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_memory_controller.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_memory_controller.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_mmc.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_mmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_mmc.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_mmc.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_pinmux.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_pinmux.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_pinmux.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_pinmux.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_power_manager.c b/atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_power_manager.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/agilex5/soc/agilex5_power_manager.c rename to atf-20240117-bacca82a8/plat/intel/soc/agilex5/soc/agilex5_power_manager.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/intel/soc/common/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/intel/soc/common/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/intel/soc/common/aarch64/platform_common.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/aarch64/platform_common.c index b79a63c86..a0f50dcd0 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/aarch64/platform_common.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/aarch64/platform_common.c @@ -11,12 +11,6 @@ #include "socfpga_private.h" - -unsigned int plat_get_syscnt_freq2(void) -{ - return PLAT_SYS_COUNTER_FREQ_IN_TICKS; -} - unsigned long socfpga_get_ns_image_entrypoint(void) { return PLAT_NS_IMAGE_OFFSET; diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/bl2_plat_mem_params_desc.c b/atf-20240117-bacca82a8/plat/intel/soc/common/bl2_plat_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/bl2_plat_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/bl2_plat_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ccu/ncore_ccu.c b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ccu/ncore_ccu.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ccu/ncore_ccu.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ccu/ncore_ccu.c index 684a62562..2094c65e3 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ccu/ncore_ccu.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ccu/ncore_ccu.c @@ -134,7 +134,7 @@ void setup_smmu_stream_id(void) /* Enabled Stream ctrl register for Agilex5 */ mmio_write_32(SOCFPGA_SYSMGR(DMA_TBU_STREAM_CTRL_REG_0_DMA0), ENABLE_STREAMID); mmio_write_32(SOCFPGA_SYSMGR(DMA_TBU_STREAM_CTRL_REG_0_DMA1), ENABLE_STREAMID); - mmio_write_32(SOCFPGA_SYSMGR(SDM_TBU_STREAM_CTRL_REG_1_SDM), ENABLE_STREAMID_SECURE_TX); + mmio_write_32(SOCFPGA_SYSMGR(SDM_TBU_STREAM_CTRL_REG_1_SDM), ENABLE_STREAMID); mmio_write_32(SOCFPGA_SYSMGR(IO_TBU_STREAM_CTRL_REG_2_USB2), ENABLE_STREAMID); mmio_write_32(SOCFPGA_SYSMGR(IO_TBU_STREAM_CTRL_REG_2_USB3), ENABLE_STREAMID); mmio_write_32(SOCFPGA_SYSMGR(IO_TBU_STREAM_CTRL_REG_2_SDMMC), ENABLE_STREAMID); diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ccu/ncore_ccu.h b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ccu/ncore_ccu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ccu/ncore_ccu.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ccu/ncore_ccu.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/combophy/combophy.c b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/combophy/combophy.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/combophy/combophy.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/combophy/combophy.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/combophy/combophy.h b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/combophy/combophy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/combophy/combophy.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/combophy/combophy.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ddr/ddr.c b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ddr/ddr.c similarity index 63% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ddr/ddr.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ddr/ddr.c index 188302f7a..62f03ef2c 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ddr/ddr.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ddr/ddr.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "ddr.h" #include #include "socfpga_handoff.h" @@ -340,3 +341,143 @@ int ddr_init(void) NOTICE("DDR init successfully\n"); return status; } + +int ddr_config_scrubber(phys_addr_t umctl2_base, enum ddr_type umctl2_type) +{ + uint32_t temp[9] = {0}; + int ret = 0; + + /* Write default value to prevent scrubber stop due to lower power */ + mmio_write_32(0, umctl2_base + DDR4_PWRCTL_OFFSET); + + /* To backup user configurations in temp array */ + temp[0] = mmio_read_32(umctl2_base + DDR4_SBRCTL_OFFSET); + temp[1] = mmio_read_32(umctl2_base + DDR4_SBRWDATA0_OFFSET); + temp[2] = mmio_read_32(umctl2_base + DDR4_SBRSTART0_OFFSET); + if (umctl2_type == DDR_TYPE_DDR4) { + temp[3] = mmio_read_32(umctl2_base + DDR4_SBRWDATA1_OFFSET); + temp[4] = mmio_read_32(umctl2_base + DDR4_SBRSTART1_OFFSET); + } + temp[5] = mmio_read_32(umctl2_base + DDR4_SBRRANGE0_OFFSET); + temp[6] = mmio_read_32(umctl2_base + DDR4_SBRRANGE1_OFFSET); + temp[7] = mmio_read_32(umctl2_base + DDR4_ECCCFG0_OFFSET); + temp[8] = mmio_read_32(umctl2_base + DDR4_ECCCFG1_OFFSET); + + if (umctl2_type != DDR_TYPE_DDR4) { + /* Lock ECC region, ensure this regions is not being accessed */ + mmio_setbits_32(umctl2_base + DDR4_ECCCFG1_OFFSET, + LPDDR4_ECCCFG1_ECC_REGIONS_PARITY_LOCK); + } + /* Disable input traffic per port */ + mmio_clrbits_32(umctl2_base + DDR4_PCTRL0_OFFSET, DDR4_PCTRL0_PORT_EN); + /* Disables scrubber */ + mmio_clrbits_32(umctl2_base + DDR4_SBRCTL_OFFSET, DDR4_SBRCTL_SCRUB_EN); + /* Polling all scrub writes data have been sent */ + ret = poll_idle_status((umctl2_base + DDR4_SBRSTAT_OFFSET), + DDR4_SBRSTAT_SCRUB_BUSY, true, 5000); + + if (ret) { + INFO("%s: Timeout while waiting for", __func__); + INFO(" sending all scrub data\n"); + return ret; + } + + /* LPDDR4 supports inline ECC only */ + if (umctl2_type != DDR_TYPE_DDR4) { + /* + * Setting all regions for protected, this is required for + * srubber to init whole LPDDR4 expect ECC region + */ + mmio_write_32(((ONE_EIGHT << + LPDDR4_ECCCFG0_ECC_REGION_MAP_GRANU_SHIFT) | + (ALL_PROTECTED << LPDDR4_ECCCFG0_ECC_REGION_MAP_SHIFT)), + umctl2_base + DDR4_ECCCFG0_OFFSET); + } + + /* Scrub_burst = 1, scrub_mode = 1(performs writes) */ + mmio_write_32(DDR4_SBRCTL_SCRUB_BURST_1 | DDR4_SBRCTL_SCRUB_WRITE, + umctl2_base + DDR4_SBRCTL_OFFSET); + + /* Wipe DDR content after calibration */ + ret = ddr_zerofill_scrubber(umctl2_base, umctl2_type); + if (ret) { + ERROR("Failed to clear DDR content\n"); + } + + /* Polling all scrub writes data have been sent */ + ret = poll_idle_status((umctl2_base + DDR4_SBRSTAT_OFFSET), + DDR4_SBRSTAT_SCRUB_BUSY, true, 5000); + if (ret) { + INFO("%s: Timeout while waiting for", __func__); + INFO(" sending all scrub data\n"); + return ret; + } + + /* Disables scrubber */ + mmio_clrbits_32(umctl2_base + DDR4_SBRCTL_OFFSET, DDR4_SBRCTL_SCRUB_EN); + + /* Restore user configurations */ + mmio_write_32(temp[0], umctl2_base + DDR4_SBRCTL_OFFSET); + mmio_write_32(temp[1], umctl2_base + DDR4_SBRWDATA0_OFFSET); + mmio_write_32(temp[2], umctl2_base + DDR4_SBRSTART0_OFFSET); + if (umctl2_type == DDR_TYPE_DDR4) { + mmio_write_32(temp[3], umctl2_base + DDR4_SBRWDATA1_OFFSET); + mmio_write_32(temp[4], umctl2_base + DDR4_SBRSTART1_OFFSET); + } + mmio_write_32(temp[5], umctl2_base + DDR4_SBRRANGE0_OFFSET); + mmio_write_32(temp[6], umctl2_base + DDR4_SBRRANGE1_OFFSET); + mmio_write_32(temp[7], umctl2_base + DDR4_ECCCFG0_OFFSET); + mmio_write_32(temp[8], umctl2_base + DDR4_ECCCFG1_OFFSET); + + /* Enables ECC scrub on scrubber */ + if (!(mmio_read_32(umctl2_base + DDR4_SBRCTL_OFFSET) & DDR4_SBRCTL_SCRUB_WRITE)) { + /* Enables scrubber */ + mmio_setbits_32(umctl2_base + DDR4_SBRCTL_OFFSET, DDR4_SBRCTL_SCRUB_EN); + } + + return 0; +} + +int ddr_zerofill_scrubber(phys_addr_t umctl2_base, enum ddr_type umctl2_type) +{ + int ret = 0; + + /* Zeroing whole DDR */ + mmio_write_32(0, umctl2_base + DDR4_SBRWDATA0_OFFSET); + mmio_write_32(0, umctl2_base + DDR4_SBRSTART0_OFFSET); + if (umctl2_type == DDR_TYPE_DDR4) { + mmio_write_32(0, umctl2_base + DDR4_SBRWDATA1_OFFSET); + mmio_write_32(0, umctl2_base + DDR4_SBRSTART1_OFFSET); + } + mmio_write_32(0, umctl2_base + DDR4_SBRRANGE0_OFFSET); + mmio_write_32(0, umctl2_base + DDR4_SBRRANGE1_OFFSET); + + NOTICE("Enabling scrubber (zeroing whole DDR) ...\n"); + + /* Enables scrubber */ + mmio_setbits_32(umctl2_base + DDR4_SBRCTL_OFFSET, DDR4_SBRCTL_SCRUB_EN); + /* Polling all scrub writes commands have been sent */ + ret = poll_idle_status((umctl2_base + DDR4_SBRSTAT_OFFSET), + DDR4_SBRSTAT_SCRUB_DONE, true, 5000); + if (ret) { + INFO("%s: Timeout while waiting for", __func__); + INFO(" sending all scrub commands\n"); + return ret; + } + + return 0; +} + +int poll_idle_status(uint32_t addr, uint32_t mask, uint32_t match, uint32_t delay_ms) +{ + int time_out = delay_ms; + + while (time_out-- > 0) { + + if ((mmio_read_32(addr) & mask) == match) { + return 0; + } + udelay(1000); + } + return -ETIMEDOUT; +} diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ddr/ddr.h b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ddr/ddr.h similarity index 68% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ddr/ddr.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ddr/ddr.h index 416b64e8b..e50cda83c 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/ddr/ddr.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/ddr/ddr.h @@ -10,6 +10,28 @@ #include #include "socfpga_handoff.h" +enum ddr_type { + DDR_TYPE_LPDDR4_0, + DDR_TYPE_LPDDR4_1, + DDR_TYPE_DDR4, + DDR_TYPE_LPDDR5_0, + DDR_TYPE_LPDDR5_1, + DDR_TYPE_DDR5, + DDR_TYPE_UNKNOWN +}; + +/* Region size for ECCCFG0.ecc_region_map */ +enum region_size { + ONE_EIGHT, + ONE_SIXTEENTH, + ONE_THIRTY_SECOND, + ONE_SIXTY_FOURTH +}; + +/* DATATYPE DEFINATION */ +typedef unsigned long long phys_addr_t; +typedef unsigned long long phys_size_t; + /* MACRO DEFINATION */ #define IO96B_0_REG_BASE 0x18400000 #define IO96B_1_REG_BASE 0x18800000 @@ -86,6 +108,34 @@ #define IOSSM_MB_WRITE(addr, data) mmio_write_32(addr, data) +/* DDR4 Register */ +#define DDR4_PWRCTL_OFFSET 0x30 +#define DDR4_SBRCTL_OFFSET 0x0F24 +#define DDR4_SBRSTAT_OFFSET 0x0F28 +#define DDR4_SBRWDATA0_OFFSET 0x0F2C +#define DDR4_SBRSTART0_OFFSET 0x0F38 +#define DDR4_SBRWDATA1_OFFSET 0x0F30 +#define DDR4_SBRSTART1_OFFSET 0x0F3C +#define DDR4_SBRRANGE0_OFFSET 0x0F40 +#define DDR4_SBRRANGE1_OFFSET 0x0F44 +#define DDR4_ECCCFG0_OFFSET 0x70 +#define DDR4_ECCCFG1_OFFSET 0x74 +#define DDR4_PCTRL0_OFFSET 0x0490 + +#define LPDDR4_ECCCFG0_ECC_REGION_MAP_GRANU_SHIFT 30 +#define ALL_PROTECTED 0x7F +#define LPDDR4_ECCCFG0_ECC_REGION_MAP_SHIFT 8 + + + +#define LPDDR4_ECCCFG1_ECC_REGIONS_PARITY_LOCK BIT(4) +#define DDR4_PCTRL0_PORT_EN BIT(0) +#define DDR4_SBRCTL_SCRUB_EN BIT(0) +#define DDR4_SBRSTAT_SCRUB_BUSY BIT(0) +#define DDR4_SBRCTL_SCRUB_BURST_1 BIT(4) +#define DDR4_SBRCTL_SCRUB_WRITE BIT(2) +#define DDR4_SBRSTAT_SCRUB_DONE BIT(1) + /* FUNCTION DEFINATION */ int ddr_calibration_check(void); @@ -109,4 +159,10 @@ void ddr_enable_firewall(void); bool is_ddr_init_in_progress(void); +int ddr_zerofill_scrubber(phys_addr_t umctl2_base, enum ddr_type umctl2_type); + +int ddr_config_scrubber(phys_addr_t umctl2_base, enum ddr_type umctl2_type); + +int poll_idle_status(uint32_t addr, uint32_t mask, uint32_t match, uint32_t delay_ms); + #endif diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/nand/nand.c b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/nand/nand.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/nand/nand.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/nand/nand.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/nand/nand.h b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/nand/nand.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/nand/nand.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/nand/nand.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/qspi/cadence_qspi.c b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/qspi/cadence_qspi.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/qspi/cadence_qspi.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/qspi/cadence_qspi.c index da8a8bdeb..6d8825fbc 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/qspi/cadence_qspi.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/qspi/cadence_qspi.c @@ -634,8 +634,9 @@ int cad_qspi_indirect_page_bound_write(uint32_t offset, int cad_qspi_read_bank(uint8_t *buffer, uint32_t offset, uint32_t size) { int status; - uint32_t read_count = 0, *read_data; + uint32_t read_count = 0; int level = 1, count = 0, i; + uint8_t *read_data; status = cad_qspi_indirect_read_start_bank(offset, size); @@ -647,11 +648,11 @@ int cad_qspi_read_bank(uint8_t *buffer, uint32_t offset, uint32_t size) level = CAD_QSPI_SRAMFILL_INDRDPART( mmio_read_32(CAD_QSPI_OFFSET + CAD_QSPI_SRAMFILL)); - read_data = (uint32_t *)(buffer + read_count); + read_data = (uint8_t *)(buffer + read_count); for (i = 0; i < level; ++i) - *read_data++ = mmio_read_32(CAD_QSPIDATA_OFST); + *read_data++ = mmio_read_8(CAD_QSPIDATA_OFST); - read_count += level * sizeof(uint32_t); + read_count += level * sizeof(uint8_t); count++; } while (level > 0); } diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/qspi/cadence_qspi.h b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/qspi/cadence_qspi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/qspi/cadence_qspi.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/qspi/cadence_qspi.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/sdmmc/sdmmc.c b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/sdmmc/sdmmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/sdmmc/sdmmc.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/sdmmc/sdmmc.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/sdmmc/sdmmc.h b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/sdmmc/sdmmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/sdmmc/sdmmc.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/sdmmc/sdmmc.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/wdt/watchdog.c b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/wdt/watchdog.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/wdt/watchdog.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/wdt/watchdog.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/wdt/watchdog.h b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/wdt/watchdog.h similarity index 87% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/wdt/watchdog.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/drivers/wdt/watchdog.h index 4ee4cff57..940ebf39f 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/drivers/wdt/watchdog.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/drivers/wdt/watchdog.h @@ -7,11 +7,8 @@ #ifndef CAD_WATCHDOG_H #define CAD_WATCHDOG_H -#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 -#define WDT_BASE (0x10D00200) -#else -#define WDT_BASE (0xFFD00200) -#endif +#include "socfpga_plat_def.h" + #define WDT_REG_SIZE_OFFSET (0x4) #define WDT_MIN_CYCLES (65536) #define WDT_PERIOD (20) diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/intel/soc/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/platform_def.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/platform_def.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_emac.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_emac.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_emac.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_emac.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_f2sdram_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_f2sdram_manager.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_f2sdram_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_f2sdram_manager.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_fcs.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_fcs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_fcs.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_fcs.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_handoff.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_handoff.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_handoff.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_handoff.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_mailbox.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_mailbox.h similarity index 95% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_mailbox.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_mailbox.h index 77d3af95c..3e4483337 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_mailbox.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_mailbox.h @@ -68,6 +68,7 @@ /* SEU Commands */ #define MBOX_CMD_SEU_ERR_READ 0x3C +#define MBOX_CMD_SAFE_INJECT_SEU_ERR 0x41 /* RSU Commands */ #define MBOX_GET_SUBPARTITION_TABLE 0x5A @@ -107,7 +108,7 @@ #define MBOX_GET_MEASUREMENT 0x183 /* Miscellaneous commands */ -#define MBOX_GET_ROM_PATCH_SHA384 0x1B0 +#define MBOX_GET_ROM_PATCH_SHA384 0x1B0 /* Mailbox Definitions */ @@ -196,9 +197,9 @@ #define RSU_VERSION_ACMF_MASK 0xff00 /* Config Status Macros */ -#define CONFIG_STATUS_WORD_SIZE 16U -#define CONFIG_STATUS_FW_VER_OFFSET 1 -#define CONFIG_STATUS_FW_VER_MASK 0x00FFFFFF +#define CONFIG_STATUS_WORD_SIZE 16U +#define CONFIG_STATUS_FW_VER_OFFSET 1 +#define CONFIG_STATUS_FW_VER_MASK 0x00FFFFFF /* Data structure */ @@ -242,6 +243,10 @@ void mailbox_clear_response(void); int intel_mailbox_get_config_status(uint32_t cmd, bool init_done); int intel_mailbox_is_fpga_not_ready(void); +#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 +void intel_smmu_hps_remapper_init(uint64_t *mem); +#endif + int mailbox_rsu_get_spt_offset(uint32_t *resp_buf, uint32_t resp_buf_len); int mailbox_rsu_status(uint32_t *resp_buf, uint32_t resp_buf_len); int mailbox_rsu_update(uint32_t *flash_offset); @@ -249,5 +254,6 @@ int mailbox_hps_stage_notify(uint32_t execution_stage); int mailbox_hwmon_readtemp(uint32_t chan, uint32_t *resp_buf); int mailbox_hwmon_readvolt(uint32_t chan, uint32_t *resp_buf); int mailbox_seu_err_status(uint32_t *resp_buf, uint32_t resp_buf_len); +int mailbox_safe_inject_seu_err(uint32_t *arg, unsigned int len); #endif /* SOCFPGA_MBOX_H */ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_noc.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_noc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_noc.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_noc.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_private.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_private.h similarity index 98% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_private.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_private.h index 9d389e3c4..242dd7394 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_private.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_private.h @@ -7,7 +7,6 @@ #ifndef SOCFPGA_PRIVATE_H #define SOCFPGA_PRIVATE_H -#include "socfpga_plat_def.h" #define EMMC_DESC_SIZE (1<<20) diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_reset_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_reset_manager.h similarity index 98% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_reset_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_reset_manager.h index 9d06a3d3f..93cc9456b 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_reset_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_reset_manager.h @@ -155,6 +155,8 @@ #define RSTMGR_HDSKACK_F2SDRAM0ACK 0x00000800 #define RSTMGR_HDSKACK_FPGA2SOCACK 0x00001000 #define RSTMGR_HDSKACK_FPGAHSACK_DASRT 0x00000000 +#define RSTMGR_HDSKACK_LWSOC2FPGAACK_DASRT 0x00000000 +#define RSTMGR_HDSKACK_SOC2FPGAACK_DASRT 0x00000000 #define RSTMGR_HDSKACK_F2SDRAM0ACK_DASRT 0x00000000 #define RSTMGR_HDSKACK_FPGA2SOCACK_DASRT 0x00000000 diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_sip_svc.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_sip_svc.h similarity index 58% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_sip_svc.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_sip_svc.h index 066830102..d45ab1184 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_sip_svc.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_sip_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022, Intel Corporation. All rights reserved. + * Copyright (c) 2019-2023, Intel Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -9,82 +9,82 @@ /* SiP status response */ -#define INTEL_SIP_SMC_STATUS_OK 0 -#define INTEL_SIP_SMC_STATUS_BUSY 0x1 -#define INTEL_SIP_SMC_STATUS_REJECTED 0x2 -#define INTEL_SIP_SMC_STATUS_NO_RESPONSE 0x3 -#define INTEL_SIP_SMC_STATUS_ERROR 0x4 -#define INTEL_SIP_SMC_RSU_ERROR 0x7 -#define INTEL_SIP_SMC_SEU_ERR_READ_ERROR 0x8 +#define INTEL_SIP_SMC_STATUS_OK 0 +#define INTEL_SIP_SMC_STATUS_BUSY 0x1 +#define INTEL_SIP_SMC_STATUS_REJECTED 0x2 +#define INTEL_SIP_SMC_STATUS_NO_RESPONSE 0x3 +#define INTEL_SIP_SMC_STATUS_ERROR 0x4 +#define INTEL_SIP_SMC_RSU_ERROR 0x7 +#define INTEL_SIP_SMC_SEU_ERR_READ_ERROR 0x8 /* SiP mailbox error code */ -#define GENERIC_RESPONSE_ERROR 0x3FF +#define GENERIC_RESPONSE_ERROR 0x3FF /* SiP V2 command code range */ -#define INTEL_SIP_SMC_CMD_MASK 0xFFFF -#define INTEL_SIP_SMC_CMD_V2_RANGE_BEGIN 0x400 -#define INTEL_SIP_SMC_CMD_V2_RANGE_END 0x4FF +#define INTEL_SIP_SMC_CMD_MASK 0xFFFF +#define INTEL_SIP_SMC_CMD_V2_RANGE_BEGIN 0x400 +#define INTEL_SIP_SMC_CMD_V2_RANGE_END 0x4FF /* SiP V2 protocol header */ -#define INTEL_SIP_SMC_HEADER_JOB_ID_MASK 0xF -#define INTEL_SIP_SMC_HEADER_JOB_ID_OFFSET 0U -#define INTEL_SIP_SMC_HEADER_CID_MASK 0xF -#define INTEL_SIP_SMC_HEADER_CID_OFFSET 4U -#define INTEL_SIP_SMC_HEADER_VERSION_MASK 0xF -#define INTEL_SIP_SMC_HEADER_VERSION_OFFSET 60U +#define INTEL_SIP_SMC_HEADER_JOB_ID_MASK 0xF +#define INTEL_SIP_SMC_HEADER_JOB_ID_OFFSET 0U +#define INTEL_SIP_SMC_HEADER_CID_MASK 0xF +#define INTEL_SIP_SMC_HEADER_CID_OFFSET 4U +#define INTEL_SIP_SMC_HEADER_VERSION_MASK 0xF +#define INTEL_SIP_SMC_HEADER_VERSION_OFFSET 60U /* SMC SiP service function identifier for version 1 */ /* FPGA Reconfig */ -#define INTEL_SIP_SMC_FPGA_CONFIG_START 0xC2000001 -#define INTEL_SIP_SMC_FPGA_CONFIG_WRITE 0x42000002 -#define INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE 0xC2000003 -#define INTEL_SIP_SMC_FPGA_CONFIG_ISDONE 0xC2000004 -#define INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM 0xC2000005 +#define INTEL_SIP_SMC_FPGA_CONFIG_START 0xC2000001 +#define INTEL_SIP_SMC_FPGA_CONFIG_WRITE 0x42000002 +#define INTEL_SIP_SMC_FPGA_CONFIG_COMPLETED_WRITE 0xC2000003 +#define INTEL_SIP_SMC_FPGA_CONFIG_ISDONE 0xC2000004 +#define INTEL_SIP_SMC_FPGA_CONFIG_GET_MEM 0xC2000005 /* FPGA Bitstream Flag */ -#define FLAG_PARTIAL_CONFIG BIT(0) -#define FLAG_AUTHENTICATION BIT(1) -#define CONFIG_TEST_FLAG(_flag, _type) (((flag) & FLAG_##_type) \ - == FLAG_##_type) +#define FLAG_PARTIAL_CONFIG BIT(0) +#define FLAG_AUTHENTICATION BIT(1) +#define CONFIG_TEST_FLAG(_flag, _type) (((flag) & FLAG_##_type) \ + == FLAG_##_type) /* Secure Register Access */ -#define INTEL_SIP_SMC_REG_READ 0xC2000007 -#define INTEL_SIP_SMC_REG_WRITE 0xC2000008 -#define INTEL_SIP_SMC_REG_UPDATE 0xC2000009 +#define INTEL_SIP_SMC_REG_READ 0xC2000007 +#define INTEL_SIP_SMC_REG_WRITE 0xC2000008 +#define INTEL_SIP_SMC_REG_UPDATE 0xC2000009 /* Remote System Update */ -#define INTEL_SIP_SMC_RSU_STATUS 0xC200000B -#define INTEL_SIP_SMC_RSU_UPDATE 0xC200000C -#define INTEL_SIP_SMC_RSU_NOTIFY 0xC200000E -#define INTEL_SIP_SMC_RSU_RETRY_COUNTER 0xC200000F -#define INTEL_SIP_SMC_RSU_DCMF_VERSION 0xC2000010 -#define INTEL_SIP_SMC_RSU_COPY_DCMF_VERSION 0xC2000011 -#define INTEL_SIP_SMC_RSU_MAX_RETRY 0xC2000012 -#define INTEL_SIP_SMC_RSU_COPY_MAX_RETRY 0xC2000013 -#define INTEL_SIP_SMC_RSU_DCMF_STATUS 0xC2000014 -#define INTEL_SIP_SMC_RSU_COPY_DCMF_STATUS 0xC2000015 +#define INTEL_SIP_SMC_RSU_STATUS 0xC200000B +#define INTEL_SIP_SMC_RSU_UPDATE 0xC200000C +#define INTEL_SIP_SMC_RSU_NOTIFY 0xC200000E +#define INTEL_SIP_SMC_RSU_RETRY_COUNTER 0xC200000F +#define INTEL_SIP_SMC_RSU_DCMF_VERSION 0xC2000010 +#define INTEL_SIP_SMC_RSU_COPY_DCMF_VERSION 0xC2000011 +#define INTEL_SIP_SMC_RSU_MAX_RETRY 0xC2000012 +#define INTEL_SIP_SMC_RSU_COPY_MAX_RETRY 0xC2000013 +#define INTEL_SIP_SMC_RSU_DCMF_STATUS 0xC2000014 +#define INTEL_SIP_SMC_RSU_COPY_DCMF_STATUS 0xC2000015 /* Hardware monitor */ -#define INTEL_SIP_SMC_HWMON_READTEMP 0xC2000020 -#define INTEL_SIP_SMC_HWMON_READVOLT 0xC2000021 -#define TEMP_CHANNEL_MAX (1 << 15) -#define VOLT_CHANNEL_MAX (1 << 15) +#define INTEL_SIP_SMC_HWMON_READTEMP 0xC2000020 +#define INTEL_SIP_SMC_HWMON_READVOLT 0xC2000021 +#define TEMP_CHANNEL_MAX (1 << 15) +#define VOLT_CHANNEL_MAX (1 << 15) /* ECC */ -#define INTEL_SIP_SMC_ECC_DBE 0xC200000D +#define INTEL_SIP_SMC_ECC_DBE 0xC200000D /* Generic Command */ -#define INTEL_SIP_SMC_SERVICE_COMPLETED 0xC200001E -#define INTEL_SIP_SMC_FIRMWARE_VERSION 0xC200001F -#define INTEL_SIP_SMC_HPS_SET_BRIDGES 0xC2000032 -#define INTEL_SIP_SMC_GET_ROM_PATCH_SHA384 0xC2000040 +#define INTEL_SIP_SMC_SERVICE_COMPLETED 0xC200001E +#define INTEL_SIP_SMC_FIRMWARE_VERSION 0xC200001F +#define INTEL_SIP_SMC_HPS_SET_BRIDGES 0xC2000032 +#define INTEL_SIP_SMC_GET_ROM_PATCH_SHA384 0xC2000040 -#define SERVICE_COMPLETED_MODE_ASYNC 0x00004F4E +#define SERVICE_COMPLETED_MODE_ASYNC 0x00004F4E /* Mailbox Command */ -#define INTEL_SIP_SMC_MBOX_SEND_CMD 0xC200003C -#define INTEL_SIP_SMC_GET_USERCODE 0xC200003D +#define INTEL_SIP_SMC_MBOX_SEND_CMD 0xC200003C +#define INTEL_SIP_SMC_GET_USERCODE 0xC200003D /* FPGA Crypto Services */ #define INTEL_SIP_SMC_FCS_RANDOM_NUMBER 0xC200005A @@ -140,21 +140,22 @@ #define INTEL_SIP_SMC_FCS_ECDH_REQUEST_FINALIZE 0xC200008E /* SEU ERR */ -#define INTEL_SIP_SMC_SEU_ERR_STATUS 0xC2000099 +#define INTEL_SIP_SMC_SEU_ERR_STATUS 0xC2000099 +#define INTEL_SIP_SMC_SAFE_INJECT_SEU_ERR 0xC200009A -#define INTEL_SIP_SMC_FCS_SHA_MODE_MASK 0xF -#define INTEL_SIP_SMC_FCS_DIGEST_SIZE_MASK 0xF -#define INTEL_SIP_SMC_FCS_DIGEST_SIZE_OFFSET 4U -#define INTEL_SIP_SMC_FCS_ECC_ALGO_MASK 0xF +#define INTEL_SIP_SMC_FCS_SHA_MODE_MASK 0xF +#define INTEL_SIP_SMC_FCS_DIGEST_SIZE_MASK 0xF +#define INTEL_SIP_SMC_FCS_DIGEST_SIZE_OFFSET 4U +#define INTEL_SIP_SMC_FCS_ECC_ALGO_MASK 0xF /* ECC DBE */ -#define WARM_RESET_WFI_FLAG BIT(31) -#define SYSMGR_ECC_DBE_COLD_RST_MASK (SYSMGR_ECC_OCRAM_MASK |\ - SYSMGR_ECC_DDR0_MASK |\ - SYSMGR_ECC_DDR1_MASK) +#define WARM_RESET_WFI_FLAG BIT(31) +#define SYSMGR_ECC_DBE_COLD_RST_MASK (SYSMGR_ECC_OCRAM_MASK |\ + SYSMGR_ECC_DDR0_MASK |\ + SYSMGR_ECC_DDR1_MASK) /* Non-mailbox SMC Call */ -#define INTEL_SIP_SMC_SVC_VERSION 0xC2000200 +#define INTEL_SIP_SMC_SVC_VERSION 0xC2000200 /** * SMC SiP service function identifier for version 2 @@ -162,31 +163,31 @@ */ /* V2: Non-mailbox function identifier */ -#define INTEL_SIP_SMC_V2_GET_SVC_VERSION 0xC2000400 -#define INTEL_SIP_SMC_V2_REG_READ 0xC2000401 -#define INTEL_SIP_SMC_V2_REG_WRITE 0xC2000402 -#define INTEL_SIP_SMC_V2_REG_UPDATE 0xC2000403 -#define INTEL_SIP_SMC_V2_HPS_SET_BRIDGES 0xC2000404 -#define INTEL_SIP_SMC_V2_RSU_UPDATE_ADDR 0xC2000405 +#define INTEL_SIP_SMC_V2_GET_SVC_VERSION 0xC2000400 +#define INTEL_SIP_SMC_V2_REG_READ 0xC2000401 +#define INTEL_SIP_SMC_V2_REG_WRITE 0xC2000402 +#define INTEL_SIP_SMC_V2_REG_UPDATE 0xC2000403 +#define INTEL_SIP_SMC_V2_HPS_SET_BRIDGES 0xC2000404 +#define INTEL_SIP_SMC_V2_RSU_UPDATE_ADDR 0xC2000405 /* V2: Mailbox function identifier */ -#define INTEL_SIP_SMC_V2_MAILBOX_SEND_COMMAND 0xC2000420 -#define INTEL_SIP_SMC_V2_MAILBOX_POLL_RESPONSE 0xC2000421 +#define INTEL_SIP_SMC_V2_MAILBOX_SEND_COMMAND 0xC2000420 +#define INTEL_SIP_SMC_V2_MAILBOX_POLL_RESPONSE 0xC2000421 /* SMC function IDs for SiP Service queries */ -#define SIP_SVC_CALL_COUNT 0x8200ff00 -#define SIP_SVC_UID 0x8200ff01 -#define SIP_SVC_VERSION 0x8200ff03 +#define SIP_SVC_CALL_COUNT 0x8200ff00 +#define SIP_SVC_UID 0x8200ff01 +#define SIP_SVC_VERSION 0x8200ff03 /* SiP Service Calls version numbers */ /* * Increase if there is any backward compatibility impact */ -#define SIP_SVC_VERSION_MAJOR 2 +#define SIP_SVC_VERSION_MAJOR 2 /* * Increase if there is new SMC function ID being added */ -#define SIP_SVC_VERSION_MINOR 2 +#define SIP_SVC_VERSION_MINOR 2 /* Structure Definitions */ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_system_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_system_manager.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_system_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_system_manager.h index f860f5750..1327b81d4 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_system_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_system_manager.h @@ -14,7 +14,6 @@ #define SOCFPGA_SYSMGR_SDMMC 0x28 /* Field Masking */ - #define SYSMGR_SDMMC_DRVSEL(x) (((x) & 0x7) << 0) #define SYSMGR_SDMMC_SMPLSEL(x) (((x) & 0x7) << 4) diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_vab.h b/atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_vab.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/include/socfpga_vab.h rename to atf-20240117-bacca82a8/plat/intel/soc/common/include/socfpga_vab.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/sip/socfpga_sip_ecc.c b/atf-20240117-bacca82a8/plat/intel/soc/common/sip/socfpga_sip_ecc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/sip/socfpga_sip_ecc.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/sip/socfpga_sip_ecc.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/sip/socfpga_sip_fcs.c b/atf-20240117-bacca82a8/plat/intel/soc/common/sip/socfpga_sip_fcs.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/sip/socfpga_sip_fcs.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/sip/socfpga_sip_fcs.c index beaa72081..adeb069d7 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/sip/socfpga_sip_fcs.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/sip/socfpga_sip_fcs.c @@ -247,14 +247,6 @@ uint32_t intel_fcs_encryption(uint32_t src_addr, uint32_t src_size, int status; uint32_t load_size; - fcs_encrypt_payload payload = { - FCS_ENCRYPTION_DATA_0, - src_addr, - src_size, - dst_addr, - dst_size }; - load_size = sizeof(payload) / MBOX_WORD_BYTE; - if (!is_address_in_ddr_range(src_addr, src_size) || !is_address_in_ddr_range(dst_addr, dst_size)) { return INTEL_SIP_SMC_STATUS_REJECTED; @@ -264,6 +256,14 @@ uint32_t intel_fcs_encryption(uint32_t src_addr, uint32_t src_size, return INTEL_SIP_SMC_STATUS_REJECTED; } + fcs_encrypt_payload payload = { + FCS_ENCRYPTION_DATA_0, + src_addr, + src_size, + dst_addr, + dst_size }; + load_size = sizeof(payload) / MBOX_WORD_BYTE; + status = mailbox_send_cmd_async(send_id, MBOX_FCS_ENCRYPT_REQ, (uint32_t *) &payload, load_size, CMD_INDIRECT); @@ -283,6 +283,15 @@ uint32_t intel_fcs_decryption(uint32_t src_addr, uint32_t src_size, uint32_t load_size; uintptr_t id_offset; + if (!is_address_in_ddr_range(src_addr, src_size) || + !is_address_in_ddr_range(dst_addr, dst_size)) { + return INTEL_SIP_SMC_STATUS_REJECTED; + } + + if (!is_size_4_bytes_aligned(src_size)) { + return INTEL_SIP_SMC_STATUS_REJECTED; + } + inv_dcache_range(src_addr, src_size); /* flush cache before mmio read to avoid reading old values */ id_offset = src_addr + FCS_OWNER_ID_OFFSET; fcs_decrypt_payload payload = { @@ -295,15 +304,6 @@ uint32_t intel_fcs_decryption(uint32_t src_addr, uint32_t src_size, dst_size }; load_size = sizeof(payload) / MBOX_WORD_BYTE; - if (!is_address_in_ddr_range(src_addr, src_size) || - !is_address_in_ddr_range(dst_addr, dst_size)) { - return INTEL_SIP_SMC_STATUS_REJECTED; - } - - if (!is_size_4_bytes_aligned(src_size)) { - return INTEL_SIP_SMC_STATUS_REJECTED; - } - status = mailbox_send_cmd_async(send_id, MBOX_FCS_DECRYPT_REQ, (uint32_t *) &payload, load_size, CMD_INDIRECT); @@ -2023,6 +2023,10 @@ int intel_fcs_ecdsa_get_pubkey_finalize(uint32_t session_id, uint32_t context_id return INTEL_SIP_SMC_STATUS_REJECTED; } + if (!is_address_in_ddr_range(dst_addr, *dst_size)) { + return INTEL_SIP_SMC_STATUS_REJECTED; + } + if (fcs_ecdsa_get_pubkey_param.session_id != session_id || fcs_ecdsa_get_pubkey_param.context_id != context_id) { return INTEL_SIP_SMC_STATUS_REJECTED; @@ -2171,14 +2175,28 @@ int intel_fcs_aes_crypt_init(uint32_t session_id, uint32_t context_id, param_addr_ptr = (uint64_t *) param_addr; - /* - * Since crypto param size vary between mode. - * Check ECB here and limit to size 12 bytes - */ - if (((*param_addr_ptr & FCS_CRYPTO_BLOCK_MODE_MASK) == FCS_CRYPTO_ECB_MODE) && - (param_size > FCS_CRYPTO_ECB_BUFFER_SIZE)) { + /* Check if mbox_error is not NULL or 0xF or 0x3FF */ + if (mbox_error == NULL || *mbox_error > 0xF || + (*mbox_error != 0 && *mbox_error != 0x3FF)) { return INTEL_SIP_SMC_STATUS_REJECTED; } + + /* Check if param_addr is not 0 or larger that 0xFFFFFFFFFF */ + if (param_addr == 0 || param_addr > 0xFFFFFFFFFF) { + return INTEL_SIP_SMC_STATUS_REJECTED; + } + + /* + * Check if not ECB, CBC and CTR mode, addr ptr is NULL. + * Return "Reject" status + */ + if ((param_addr_ptr == NULL) || + (((*param_addr_ptr & FCS_CRYPTO_BLOCK_MODE_MASK) != FCS_CRYPTO_ECB_MODE) && + ((*param_addr_ptr & FCS_CRYPTO_BLOCK_MODE_MASK) != FCS_CRYPTO_CBC_MODE) && + ((*param_addr_ptr & FCS_CRYPTO_BLOCK_MODE_MASK) != FCS_CRYPTO_CTR_MODE))) { + return INTEL_SIP_SMC_STATUS_REJECTED; + } + /* * Since crypto param size vary between mode. * Check CBC/CTR here and limit to size 28 bytes @@ -2189,7 +2207,12 @@ int intel_fcs_aes_crypt_init(uint32_t session_id, uint32_t context_id, return INTEL_SIP_SMC_STATUS_REJECTED; } - if (mbox_error == NULL) { + /* + * Since crypto param size vary between mode. + * Check ECB here and limit to size 12 bytes + */ + if (((*param_addr_ptr & FCS_CRYPTO_BLOCK_MODE_MASK) == FCS_CRYPTO_ECB_MODE) && + (param_size > FCS_CRYPTO_ECB_BUFFER_SIZE)) { return INTEL_SIP_SMC_STATUS_REJECTED; } @@ -2234,7 +2257,8 @@ int intel_fcs_aes_crypt_update_finalize(uint32_t session_id, } if ((!is_8_bytes_aligned(dst_addr)) || - (!is_32_bytes_aligned(dst_size))) { + (!is_32_bytes_aligned(dst_size)) || + (!is_address_in_ddr_range(dst_addr, dst_size))) { return INTEL_SIP_SMC_STATUS_REJECTED; } diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_emac.c b/atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_emac.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_emac.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_emac.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_firewall.c b/atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_firewall.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_firewall.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_firewall.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_handoff.c b/atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_handoff.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_handoff.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_handoff.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_mailbox.c b/atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_mailbox.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_mailbox.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_mailbox.c index d93fc8a5b..e2a25eaff 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_mailbox.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_mailbox.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, Intel Corporation. All rights reserved. + * Copyright (c) 2020-2023, Intel Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -696,3 +696,9 @@ int mailbox_seu_err_status(uint32_t *resp_buf, unsigned int resp_buf_len) CMD_CASUAL, resp_buf, &resp_buf_len); } + +int mailbox_safe_inject_seu_err(uint32_t *arg, unsigned int len) +{ + return mailbox_send_cmd(MBOX_JOB_ID, MBOX_CMD_SAFE_INJECT_SEU_ERR, arg, len, + CMD_CASUAL, NULL, NULL); +} diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_reset_manager.c b/atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_reset_manager.c similarity index 68% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_reset_manager.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_reset_manager.c index 7db86c785..520414670 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/soc/socfpga_reset_manager.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/soc/socfpga_reset_manager.c @@ -130,6 +130,7 @@ static int poll_idle_status_by_counter(uint32_t addr, uint32_t mask, } #endif +#if PLATFORM_MODEL != PLAT_SOCFPGA_AGILEX5 static int poll_idle_status_by_clkcycles(uint32_t addr, uint32_t mask, uint32_t match, uint32_t delay_clk_cycles) { @@ -144,6 +145,7 @@ static int poll_idle_status_by_clkcycles(uint32_t addr, uint32_t mask, } return -ETIMEDOUT; } +#endif static void socfpga_s2f_bridge_mask(uint32_t mask, uint32_t *brg_mask, @@ -407,6 +409,7 @@ int socfpga_bridges_reset(uint32_t mask) int socfpga_bridges_enable(uint32_t mask) { int ret = 0; + int ret_hps = 0; uint32_t brg_mask = 0; uint32_t noc_mask = 0; uint32_t f2s_idlereq = 0; @@ -424,12 +427,18 @@ int socfpga_bridges_enable(uint32_t mask) #if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 /* Enable SOC2FPGA bridge */ if (brg_mask & RSTMGR_BRGMODRSTMASK_SOC2FPGA) { - /* Write Reset Manager hdskreq[soc2fpga_flush_req] = 1 */ - NOTICE("Set S2F hdskreq ...\n"); + /* + * To request handshake + * Write Reset Manager hdskreq[soc2fpga_flush_req] = 1 + */ + VERBOSE("Set S2F hdskreq ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_SOC2FPGAREQ); - /* Read Reset Manager hdskack[soc2fpga] = 1 */ + /* + * To poll idle status + * Read Reset Manager hdskack[soc2fpga] = 1 + */ ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_SOC2FPGAACK, RSTMGR_HDSKACK_SOC2FPGAACK, 300); @@ -438,13 +447,19 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("S2F bridge enable: Timeout hdskack\n"); } - /* Write Reset Manager hdskreq[soc2fpga_flush_req] = 0 */ - NOTICE("Clear S2F hdskreq ...\n"); + /* + * To clear idle request + * Write Reset Manager hdskreq[soc2fpga_flush_req] = 0 + */ + VERBOSE("Clear S2F hdskreq ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_SOC2FPGAREQ); - /* Write Reset Manager brgmodrst[soc2fpga] = 1 */ - NOTICE("Assert S2F ...\n"); + /* + * To assert reset + * Write Reset Manager hdskreq[soc2fpga_flush_req] = 0 + */ + VERBOSE("Assert S2F ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_SOC2FPGA); @@ -453,20 +468,29 @@ int socfpga_bridges_enable(uint32_t mask) /* dummy delay */ } - /* Write Reset Manager brgmodrst[soc2fpga] = 0 */ - NOTICE("Deassert S2F ...\n"); + /* + * To deassert reset + * Write Reset Manager brgmodrst[soc2fpga] = 0 + */ + VERBOSE("Deassert S2F ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_SOC2FPGA); } /* Enable LWSOC2FPGA bridge */ if (brg_mask & RSTMGR_BRGMODRSTMASK_LWHPS2FPGA) { - /* Write Reset Manager hdskreq[lwsoc2fpga_flush_req] = 1 */ - NOTICE("Set LWS2F hdskreq ...\n"); + /* + * To request handshake + * Write Reset Manager hdskreq[lwsoc2fpga_flush_req] = 1 + */ + VERBOSE("Set LWS2F hdskreq ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_LWSOC2FPGAREQ); - /* Read Reset Manager hdskack[lwsoc2fpga] = 1 */ + /* + * To poll idle status + * Read Reset Manager hdskack[lwsoc2fpga] = 1 + */ ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_LWSOC2FPGAACK, RSTMGR_HDSKACK_LWSOC2FPGAACK, 300); @@ -475,13 +499,19 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("LWS2F bridge enable: Timeout hdskack\n"); } - /* Write Reset Manager hdskreq[lwsoc2fpga_flush_req] = 0 */ - NOTICE("Clear LWS2F hdskreq ...\n"); + /* + * To clear idle request + * Write Reset Manager hdskreq[lwsoc2fpga_flush_req] = 0 + */ + VERBOSE("Clear LWS2F hdskreq ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_LWSOC2FPGAREQ); - /* Write Reset Manager brgmodrst[lwsoc2fpga] = 1 */ - NOTICE("Assert LWS2F ...\n"); + /* + * To assert reset + * Write Reset Manager brgmodrst[lwsoc2fpga] = 1 + */ + VERBOSE("Assert LWS2F ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_LWHPS2FPGA); @@ -490,8 +520,11 @@ int socfpga_bridges_enable(uint32_t mask) /* dummy delay */ } - /* Write Reset Manager brgmodrst[lwsoc2fpga] = 0 */ - NOTICE("Deassert LWS2F ...\n"); + /* + * To deassert reset + * Write Reset Manager brgmodrst[lwsoc2fpga] = 0 + */ + VERBOSE("Deassert LWS2F ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_LWHPS2FPGA); } @@ -505,9 +538,9 @@ int socfpga_bridges_enable(uint32_t mask) mmio_clrbits_32(SOCFPGA_RSTMGR(BRGMODRST), brg_mask); /* Wait until idle ack becomes 0 */ - ret = poll_idle_status(SOCFPGA_SYSMGR(NOC_IDLEACK), + ret_hps = poll_idle_status(SOCFPGA_SYSMGR(NOC_IDLEACK), noc_mask, 0, 300); - if (ret < 0) { + if (ret_hps < 0) { ERROR("S2F bridge enable: Timeout idle ack\n"); } } @@ -520,16 +553,25 @@ int socfpga_bridges_enable(uint32_t mask) #if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 /* Enable FPGA2SOC bridge */ if (brg_mask & RSTMGR_BRGMODRSTMASK_FPGA2SOC) { - /* Write Reset Manager hdsken[fpgahsen] = 1 */ - NOTICE("Set FPGA hdsken(fpgahsen) ...\n"); + /* + * To request handshake + * Write Reset Manager hdsken[fpgahsen] = 1 + */ + VERBOSE("Set FPGA hdsken(fpgahsen) ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKEN), RSTMGR_HDSKEN_FPGAHSEN); - /* Write Reset Manager hdskreq[fpgahsreq] = 1 */ - NOTICE("Set FPGA hdskreq(fpgahsreq) ...\n"); + /* + * To request handshake + * Write Reset Manager hdskreq[fpgahsreq] = 1 + */ + VERBOSE("Set FPGA hdskreq(fpgahsreq) ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGAHSREQ); - /* Read Reset Manager hdskack[fpgahsack] = 1 */ - NOTICE("Get FPGA hdskack(fpgahsack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[fpgahsack] = 1 + */ + VERBOSE("Get FPGA hdskack(fpgahsack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_FPGAHSACK, RSTMGR_HDSKACK_FPGAHSACK, 300); @@ -538,13 +580,19 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("FPGA bridge fpga handshake fpgahsreq: Timeout\n"); } - /* Write Reset Manager hdskreq[f2s_flush_req] = 1 */ - NOTICE("Set F2S hdskreq(f2s_flush_req) ...\n"); + /* + * To fence and drain traffic + * Write Reset Manager hdskreq[f2s_flush_req] = 1 + */ + VERBOSE("Set F2S hdskreq(f2s_flush_req) ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGA2SOCREQ); - /* Read Reset Manager hdskack[f2s_flush_ack] = 1 */ - NOTICE("Get F2S hdskack(f2s_flush_ack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[f2s_flush_ack] = 1 + */ + VERBOSE("Get F2S hdskack(f2s_flush_ack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_FPGA2SOCACK, RSTMGR_HDSKACK_FPGA2SOCACK, 300); @@ -553,17 +601,26 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("F2S bridge fpga handshake f2sdram_flush_req: Timeout\n"); } - /* Write Reset Manager hdskreq[fpgahsreq] = 1 */ - NOTICE("Clear FPGA hdskreq(fpgahsreq) ...\n"); + /* + * To clear idle request + * Write Reset Manager hdskreq[fpgahsreq] = 1 + */ + VERBOSE("Clear FPGA hdskreq(fpgahsreq) ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGAHSREQ); - /* Write Reset Manager hdskreq[f2s_flush_req] = 1 */ - NOTICE("Clear F2S hdskreq(f2s_flush_req) ...\n"); + /* + * To clear idle request + * Write Reset Manager hdskreq[f2s_flush_req] = 1 + */ + VERBOSE("Clear F2S hdskreq(f2s_flush_req) ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGA2SOCREQ); - /* Read Reset Manager hdskack[f2s_flush_ack] = 0 */ - NOTICE("Get F2SDRAM hdskack(f2s_flush_ack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[f2s_flush_ack] = 0 + */ + VERBOSE("Get F2SDRAM hdskack(f2s_flush_ack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_FPGA2SOCACK, RSTMGR_HDSKACK_FPGA2SOCACK_DASRT, 300); @@ -572,8 +629,11 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("F2S bridge fpga handshake f2s_flush_ack: Timeout\n"); } - /* Read Reset Manager hdskack[fpgahsack] = 0 */ - NOTICE("Get FPGA hdskack(fpgahsack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[fpgahsack] = 0 + */ + VERBOSE("Get FPGA hdskack(fpgahsack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_FPGAHSACK, RSTMGR_HDSKACK_FPGAHSACK_DASRT, 300); @@ -582,8 +642,11 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("F2S bridge fpga handshake fpgahsack: Timeout\n"); } - /* Write Reset Manager brgmodrst[fpga2soc] = 1 */ - NOTICE("Assert F2S ...\n"); + /* + * To assert reset + * Write Reset Manager brgmodrst[fpga2soc] = 1 + */ + VERBOSE("Assert F2S ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_FPGA2SOC); /* ToDo: Shall use udelay for product release */ @@ -591,28 +654,40 @@ int socfpga_bridges_enable(uint32_t mask) /* dummy delay */ } - /* Write Reset Manager brgmodrst[fpga2soc] = 0 */ - NOTICE("Deassert F2S ...\n"); + /* + * To deassert reset + * Write Reset Manager brgmodrst[fpga2soc] = 0 + */ + VERBOSE("Deassert F2S ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_FPGA2SOC); /* Write System Manager f2s bridge control register[f2soc_enable] = 1 */ - NOTICE("Deassert F2S f2soc_enable ...\n"); + VERBOSE("Deassert F2S f2soc_enable ...\n"); mmio_setbits_32(SOCFPGA_SYSMGR(F2S_BRIDGE_CTRL), SYSMGR_F2S_BRIDGE_CTRL_EN); } /* Enable FPGA2SDRAM bridge */ if (brg_mask & RSTMGR_BRGMODRSTMASK_F2SDRAM0) { - /* Write Reset Manager hdsken[fpgahsen] = 1 */ - NOTICE("Set F2SDRAM hdsken(fpgahsen) ...\n"); + /* + * To request handshake + * Write Reset Manager hdsken[fpgahsen] = 1 + */ + VERBOSE("Set F2SDRAM hdsken(fpgahsen) ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKEN), RSTMGR_HDSKEN_FPGAHSEN); - /* Write Reset Manager hdskreq[fpgahsreq] = 1 */ - NOTICE("Set F2SDRAM hdskreq(fpgahsreq) ...\n"); + /* + * To request handshake + * Write Reset Manager hdskreq[fpgahsreq] = 1 + */ + VERBOSE("Set F2SDRAM hdskreq(fpgahsreq) ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGAHSREQ); - /* Read Reset Manager hdskack[fpgahsack] = 1 */ - NOTICE("Get F2SDRAM hdskack(fpgahsack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[fpgahsack] = 1 + */ + VERBOSE("Get F2SDRAM hdskack(fpgahsack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_FPGAHSACK, RSTMGR_HDSKACK_FPGAHSACK, 300); @@ -621,13 +696,19 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("F2SDRAM bridge fpga handshake fpgahsreq: Timeout\n"); } - /* Write Reset Manager hdskreq[f2sdram_flush_req] = 1 */ - NOTICE("Set F2SDRAM hdskreq(f2sdram_flush_req) ...\n"); + /* + * To fence and drain traffic + * Write Reset Manager hdskreq[f2sdram_flush_req] = 1 + */ + VERBOSE("Set F2SDRAM hdskreq(f2sdram_flush_req) ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_F2SDRAM0REQ); - /* Read Reset Manager hdskack[f2sdram_flush_ack] = 1 */ - NOTICE("Get F2SDRAM hdskack(f2sdram_flush_ack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[f2sdram_flush_ack] = 1 + */ + VERBOSE("Get F2SDRAM hdskack(f2sdram_flush_ack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_F2SDRAM0ACK, RSTMGR_HDSKACK_F2SDRAM0ACK, 300); @@ -636,16 +717,25 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("F2SDRAM bridge fpga handshake f2sdram_flush_req: Timeout\n"); } - /* Write Reset Manager hdskreq[fpgahsreq] = 1 */ - NOTICE("Clear F2SDRAM hdskreq(fpgahsreq) ...\n"); + /* + * To clear idle request + * Write Reset Manager hdskreq[fpgahsreq] = 1 + */ + VERBOSE("Clear F2SDRAM hdskreq(fpgahsreq) ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGAHSREQ); - /* Write Reset Manager hdskreq[f2sdram_flush_req] = 1 */ - NOTICE("Clear F2SDRAM hdskreq(f2sdram_flush_req) ...\n"); + /* + * To clear idle request + * Write Reset Manager hdskreq[f2sdram_flush_req] = 1 + */ + VERBOSE("Clear F2SDRAM hdskreq(f2sdram_flush_req) ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_F2SDRAM0REQ); - /* Read Reset Manager hdskack[f2sdram_flush_ack] = 0 */ - NOTICE("Get F2SDRAM hdskack(f2sdram_flush_ack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[f2sdram_flush_ack] = 0 + */ + VERBOSE("Get F2SDRAM hdskack(f2sdram_flush_ack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_F2SDRAM0ACK, RSTMGR_HDSKACK_F2SDRAM0ACK_DASRT, 300); @@ -654,8 +744,11 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("F2SDRAM bridge fpga handshake f2sdram_flush_ack: Timeout\n"); } - /* Read Reset Manager hdskack[fpgahsack] = 0 */ - NOTICE("Get F2SDRAM hdskack(fpgahsack) ...\n"); + /* + * To poll idle status + * Read Reset Manager hdskack[fpgahsack] = 0 + */ + VERBOSE("Get F2SDRAM hdskack(fpgahsack) ...\n"); ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), RSTMGR_HDSKACK_FPGAHSACK, RSTMGR_HDSKACK_FPGAHSACK_DASRT, 300); @@ -664,8 +757,11 @@ int socfpga_bridges_enable(uint32_t mask) ERROR("F2SDRAM bridge fpga handshake fpgahsack: Timeout\n"); } - /* Write Reset Manager brgmodrst[fpga2sdram] = 1 */ - NOTICE("Assert F2SDRAM ...\n"); + /* + * To assert reset + * Write Reset Manager brgmodrst[fpga2sdram] = 1 + */ + VERBOSE("Assert F2SDRAM ...\n"); mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_F2SSDRAM0); @@ -674,8 +770,11 @@ int socfpga_bridges_enable(uint32_t mask) /* dummy delay */ } - /* Write Reset Manager brgmodrst[fpga2sdram] = 0 */ - NOTICE("Deassert F2SDRAM ...\n"); + /* + * To deassert reset + * Write Reset Manager brgmodrst[fpga2sdram] = 0 + */ + VERBOSE("Deassert F2SDRAM ...\n"); mmio_clrbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_F2SSDRAM0); @@ -683,7 +782,7 @@ int socfpga_bridges_enable(uint32_t mask) * Clear fpga2sdram_manager_main_SidebandManager_FlagOutClr0 * f2s_ready_latency_enable */ - NOTICE("Clear F2SDRAM f2s_ready_latency_enable ...\n"); + VERBOSE("Clear F2SDRAM f2s_ready_latency_enable ...\n"); mmio_setbits_32(SOCFPGA_F2SDRAMMGR(SIDEBANDMGR_FLAGOUTCLR0), FLAGOUTCLR0_F2SDRAM0_ENABLE); } @@ -711,6 +810,7 @@ int socfpga_bridges_enable(uint32_t mask) udelay(5); } #endif + ret = ret | ret_hps; return ret; } @@ -771,9 +871,86 @@ int socfpga_bridges_disable(uint32_t mask) uint32_t f2s_idleack = 0; uint32_t f2s_respempty = 0; uint32_t f2s_cmdidle = 0; +#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 + uint32_t delay = 0; +#endif + /* Disable s2f bridge */ socfpga_s2f_bridge_mask(mask, &brg_mask, &noc_mask); +#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 + /* Disable SOC2FPGA bridge */ + if (brg_mask & RSTMGR_BRGMODRSTMASK_SOC2FPGA) { + /* + * To clear handshake + * Write Reset Manager hdskreq[soc2fpga_flush_req] = 0 + */ + VERBOSE("Set S2F hdskreq ...\n"); + mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), + RSTMGR_HDSKREQ_SOC2FPGAREQ); + + /* + * To poll idle status + * Read Reset Manager hdskack[soc2fpga] = 0 + */ + ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), + RSTMGR_HDSKACK_SOC2FPGAACK, RSTMGR_HDSKACK_SOC2FPGAACK_DASRT, + 300); + + if (ret < 0) { + ERROR("S2F bridge enable: Timeout hdskack\n"); + } + + /* + * To assert reset + * Write Reset Manager brgmodrst[soc2fpga] = 1 + */ + VERBOSE("Assert S2F ...\n"); + mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), + RSTMGR_BRGMODRST_SOC2FPGA); + + /* ToDo: Shall use udelay for product release */ + for (delay = 0; delay < 1000; delay++) { + /* dummy delay */ + } + } + + /* Disable LWSOC2FPGA bridge */ + if (brg_mask & RSTMGR_BRGMODRSTMASK_LWHPS2FPGA) { + /* + * To clear handshake + * Write Reset Manager hdskreq[lwsoc2fpga_flush_req] = 0 + */ + VERBOSE("Set LWS2F hdskreq ...\n"); + mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), + RSTMGR_HDSKREQ_LWSOC2FPGAREQ); + + /* + * To poll idle status + * Read Reset Manager hdskack[lwsoc2fpga] = 0 + */ + ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), + RSTMGR_HDSKACK_LWSOC2FPGAACK, RSTMGR_HDSKACK_LWSOC2FPGAACK_DASRT, + 300); + + if (ret < 0) { + ERROR("LWS2F bridge enable: Timeout hdskack\n"); + } + + /* + * To assert reset + * Write Reset Manager brgmodrst[lwsoc2fpga] = 1 + */ + VERBOSE("Assert LWS2F ...\n"); + mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), + RSTMGR_BRGMODRST_LWHPS2FPGA); + + /* ToDo: Shall use udelay for product release */ + for (delay = 0; delay < 1000; delay++) { + /* dummy delay */ + } + } +#else if (brg_mask != 0U) { mmio_setbits_32(SOCFPGA_SYSMGR(NOC_IDLEREQ_SET), noc_mask); @@ -796,11 +973,152 @@ int socfpga_bridges_disable(uint32_t mask) mmio_write_32(SOCFPGA_SYSMGR(NOC_TIMEOUT), 0); } +#endif /* Disable f2s bridge */ socfpga_f2s_bridge_mask(mask, &brg_mask, &f2s_idlereq, &f2s_force_drain, &f2s_en, &f2s_idleack, &f2s_respempty, &f2s_cmdidle); +#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 + /* Disable FPGA2SOC bridge */ + if (brg_mask & RSTMGR_BRGMODRSTMASK_FPGA2SOC) { + /* + * To request handshake + * Write Reset Manager hdsken[fpgahsen] = 1 + */ + VERBOSE("Set FPGA hdsken(fpgahsen) ...\n"); + mmio_setbits_32(SOCFPGA_RSTMGR(HDSKEN), RSTMGR_HDSKEN_FPGAHSEN); + + /* + * To clear handshake request + * Write Reset Manager hdskreq[fpgahsreq] = 0 + */ + VERBOSE("Clear FPGA hdskreq(fpgahsreq) ...\n"); + mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGAHSREQ); + + /* + * To clear handshake request + * Write Reset Manager hdskreq[f2s_flush_req] = 0 + */ + VERBOSE("Clear F2S hdskreq(f2s_flush_req) ...\n"); + mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), + RSTMGR_HDSKREQ_FPGA2SOCREQ); + + /* + * To poll idle status + * Read Reset Manager hdskack[f2s_flush_ack] = 0 + */ + VERBOSE("Get F2SDRAM hdskack(f2s_flush_ack) ...\n"); + ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), + RSTMGR_HDSKACK_FPGA2SOCACK, RSTMGR_HDSKACK_FPGA2SOCACK_DASRT, + 300); + + if (ret < 0) { + ERROR("F2S bridge fpga handshake f2s_flush_ack: Timeout\n"); + } + + /* + * To poll idle status + * Read Reset Manager hdskack[fpgahsack] = 0 + */ + VERBOSE("Get FPGA hdskack(fpgahsack) ...\n"); + ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), + RSTMGR_HDSKACK_FPGAHSACK, RSTMGR_HDSKACK_FPGAHSACK_DASRT, + 300); + + if (ret < 0) { + ERROR("F2S bridge fpga handshake fpgahsack: Timeout\n"); + } + + /* + * To assert reset + * Write Reset Manager brgmodrst[fpga2soc] = 1 + */ + VERBOSE("Assert F2S ...\n"); + mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), RSTMGR_BRGMODRST_FPGA2SOC); + + /* ToDo: Shall use udelay for product release */ + for (delay = 0; delay < 1000; delay++) { + /* dummy delay */ + } + + /* Write System Manager f2s bridge control register[f2soc_enable] = 0 */ + VERBOSE("Assert F2S f2soc_enable ...\n"); + mmio_clrbits_32(SOCFPGA_SYSMGR(F2S_BRIDGE_CTRL), + SYSMGR_F2S_BRIDGE_CTRL_EN); + } + + /* Disable FPGA2SDRAM bridge */ + if (brg_mask & RSTMGR_BRGMODRSTMASK_F2SDRAM0) { + /* + * To request handshake + * Write Reset Manager hdsken[fpgahsen] = 1 + */ + VERBOSE("Set F2SDRAM hdsken(fpgahsen) ...\n"); + mmio_setbits_32(SOCFPGA_RSTMGR(HDSKEN), RSTMGR_HDSKEN_FPGAHSEN); + + /* + * To clear handshake request + * Write Reset Manager hdskreq[fpgahsreq] = 0 + */ + VERBOSE("Clear F2SDRAM hdskreq(fpgahsreq) ...\n"); + mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_FPGAHSREQ); + + /* + * To clear handshake request + * Write Reset Manager hdskreq[f2sdram_flush_req] = 0 + */ + VERBOSE("Clear F2SDRAM hdskreq(f2sdram_flush_req) ...\n"); + mmio_clrbits_32(SOCFPGA_RSTMGR(HDSKREQ), RSTMGR_HDSKREQ_F2SDRAM0REQ); + + /* + * To poll idle status + * Read Reset Manager hdskack[f2sdram_flush_ack] = 0 + */ + VERBOSE("Get F2SDRAM hdskack(f2sdram_flush_ack) ...\n"); + ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), + RSTMGR_HDSKACK_F2SDRAM0ACK, RSTMGR_HDSKACK_F2SDRAM0ACK_DASRT, + 300); + + if (ret < 0) { + ERROR("F2SDRAM bridge fpga handshake f2sdram_flush_ack: Timeout\n"); + } + + /* + * To poll idle status + * Read Reset Manager hdskack[fpgahsack] = 0 + */ + VERBOSE("Get F2SDRAM hdskack(fpgahsack) ...\n"); + ret = poll_idle_status_by_counter(SOCFPGA_RSTMGR(HDSKACK), + RSTMGR_HDSKACK_FPGAHSACK, RSTMGR_HDSKACK_FPGAHSACK_DASRT, + 300); + + if (ret < 0) { + ERROR("F2SDRAM bridge fpga handshake fpgahsack: Timeout\n"); + } + + /* + * To assert reset + * Write Reset Manager brgmodrst[fpga2sdram] = 1 + */ + VERBOSE("Assert F2SDRAM ...\n"); + mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), + RSTMGR_BRGMODRST_F2SSDRAM0); + + /* ToDo: Shall use udelay for product release */ + for (delay = 0; delay < 1000; delay++) { + /* dummy delay */ + } + + /* + * Assert fpga2sdram_manager_main_SidebandManager_FlagOutClr0 + * f2s_ready_latency_enable + */ + VERBOSE("Assert F2SDRAM f2s_ready_latency_enable ...\n"); + mmio_clrbits_32(SOCFPGA_F2SDRAMMGR(SIDEBANDMGR_FLAGOUTCLR0), + FLAGOUTCLR0_F2SDRAM0_ENABLE); + } +#else if (brg_mask != 0U) { if (mmio_read_32(SOCFPGA_RSTMGR(BRGMODRST)) & brg_mask) { @@ -829,7 +1147,7 @@ int socfpga_bridges_disable(uint32_t mask) /* Bridge reset */ #if PLATFORM_MODEL == PLAT_SOCFPGA_STRATIX10 - /* Software must never write a 0x1 to FPGA2SOC_MASK bit */ + /* Software must never write a 0x1 to FPGA2SOC_M0ASK bit */ mmio_setbits_32(SOCFPGA_RSTMGR(BRGMODRST), brg_mask & ~RSTMGR_FIELD(BRG, FPGA2SOC)); #else @@ -843,6 +1161,7 @@ int socfpga_bridges_disable(uint32_t mask) mmio_setbits_32(SOCFPGA_F2SDRAMMGR(SIDEBANDMGR_FLAGOUTCLR0), f2s_idlereq); } +#endif return ret; } diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_delay_timer.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_delay_timer.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_delay_timer.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_delay_timer.c index 8fce5cf88..db173a48f 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_delay_timer.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_delay_timer.c @@ -52,8 +52,6 @@ void socfpga_delay_timer_init(void) socfpga_delay_timer_init_args(); mmio_write_32(SOCFPGA_GLOBAL_TIMER, SOCFPGA_GLOBAL_TIMER_EN); - NOTICE("BL31 CLK freq = %d MHz\n", PLAT_SYS_COUNTER_FREQ_IN_MHZ); - asm volatile("msr cntp_ctl_el0, %0" : : "r" (SOCFPGA_GLOBAL_TIMER_EN)); asm volatile("msr cntp_tval_el0, %0" : : "r" (~0)); diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_image_load.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_image_load.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_psci.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_psci.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_psci.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_psci.c index 5ffd512ac..c93e13f52 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_psci.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_psci.c @@ -62,7 +62,7 @@ int socfpga_pwr_domain_on(u_register_t mpidr) #if PLATFORM_MODEL != PLAT_SOCFPGA_AGILEX5 if (cpu_id == 0x00) { psci_boot = mmio_read_32(SOCFPGA_SYSMGR(BOOT_SCRATCH_COLD_8)); - psci_boot |= 0x20000; /* bit 17 */ + psci_boot |= 0x80000; /* bit 19 */ mmio_write_32(SOCFPGA_SYSMGR(BOOT_SCRATCH_COLD_8), psci_boot); } diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_sip_svc.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_sip_svc.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_sip_svc.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_sip_svc.c index c6530cf31..f68dc29e9 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_sip_svc.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_sip_svc.c @@ -229,6 +229,10 @@ static int intel_fpga_config_start(uint32_t flag) request_type = BITSTREAM_AUTH; } +#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 + intel_smmu_hps_remapper_init(0U); +#endif + mailbox_clear_response(); mailbox_send_cmd(MBOX_JOB_ID, MBOX_CMD_CANCEL, NULL, 0U, @@ -280,6 +284,9 @@ static bool is_fpga_config_buffer_full(void) bool is_address_in_ddr_range(uint64_t addr, uint64_t size) { + uint128_t dram_max_sz = (uint128_t)DRAM_BASE + (uint128_t)DRAM_SIZE; + uint128_t dram_region_end = (uint128_t)addr + (uint128_t)size; + if (!addr && !size) { return true; } @@ -289,7 +296,7 @@ bool is_address_in_ddr_range(uint64_t addr, uint64_t size) if (addr < BL31_LIMIT) { return false; } - if (addr + size > DRAM_BASE + DRAM_SIZE) { + if (dram_region_end > dram_max_sz) { return false; } @@ -307,6 +314,10 @@ static uint32_t intel_fpga_config_write(uint64_t mem, uint64_t size) return INTEL_SIP_SMC_STATUS_REJECTED; } +#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 + intel_smmu_hps_remapper_init(&mem); +#endif + for (i = 0; i < FPGA_CONFIG_BUFFER_SIZE; i++) { int j = (i + current_buffer) % FPGA_CONFIG_BUFFER_SIZE; @@ -420,8 +431,19 @@ static int is_out_of_sec_range(uint64_t reg_addr) case(SOCFPGA_SYSMGR(BOOT_SCRATCH_COLD_1)): /* BOOT_SCRATCH_COLD1 */ case(SOCFPGA_SYSMGR(BOOT_SCRATCH_COLD_8)): /* BOOT_SCRATCH_COLD8 */ case(SOCFPGA_SYSMGR(BOOT_SCRATCH_COLD_9)): /* BOOT_SCRATCH_COLD9 */ - return 0; #endif + case(SOCFPGA_ECC_QSPI(CTRL)): /* ECC_QSPI_CTRL */ + case(SOCFPGA_ECC_QSPI(ERRINTEN)): /* ECC_QSPI_ERRINTEN */ + case(SOCFPGA_ECC_QSPI(ERRINTENS)): /* ECC_QSPI_ERRINTENS */ + case(SOCFPGA_ECC_QSPI(ERRINTENR)): /* ECC_QSPI_ERRINTENR */ + case(SOCFPGA_ECC_QSPI(INTMODE)): /* ECC_QSPI_INTMODE */ + case(SOCFPGA_ECC_QSPI(ECC_ACCCTRL)): /* ECC_QSPI_ECC_ACCCTRL */ + case(SOCFPGA_ECC_QSPI(ECC_STARTACC)): /* ECC_QSPI_ECC_STARTACC */ + case(SOCFPGA_ECC_QSPI(ECC_WDCTRL)): /* ECC_QSPI_ECC_WDCTRL */ + case(SOCFPGA_ECC_QSPI(INTSTAT)): /* ECC_QSPI_INTSTAT */ + case(SOCFPGA_ECC_QSPI(INTTEST)): /* ECC_QSPI_INTMODE */ + return 0; + default: break; } @@ -448,7 +470,15 @@ uint32_t intel_secure_reg_write(uint64_t reg_addr, uint32_t val, return INTEL_SIP_SMC_STATUS_ERROR; } - mmio_write_32(reg_addr, val); + switch (reg_addr) { + case(SOCFPGA_ECC_QSPI(INTSTAT)): /* ECC_QSPI_INTSTAT */ + case(SOCFPGA_ECC_QSPI(INTTEST)): /* ECC_QSPI_INTMODE */ + mmio_write_16(reg_addr, val); + break; + default: + mmio_write_32(reg_addr, val); + break; + } return intel_secure_reg_read(reg_addr, retval); } @@ -689,15 +719,43 @@ uint32_t intel_hps_set_bridges(uint64_t enable, uint64_t mask) } /* SDM SEU Error services */ -static uint32_t intel_sdm_seu_err_read(uint64_t *respbuf, unsigned int respbuf_sz) +static uint32_t intel_sdm_seu_err_read(uint32_t *respbuf, unsigned int respbuf_sz) { - if (mailbox_seu_err_status((uint32_t *)respbuf, respbuf_sz) < 0) { + if (mailbox_seu_err_status(respbuf, respbuf_sz) < 0) { return INTEL_SIP_SMC_SEU_ERR_READ_ERROR; } return INTEL_SIP_SMC_STATUS_OK; } +/* SDM SAFE SEU Error inject services */ +static uint32_t intel_sdm_safe_inject_seu_err(uint32_t *command, uint32_t len) +{ + if (mailbox_safe_inject_seu_err(command, len) < 0) { + return INTEL_SIP_SMC_SEU_ERR_READ_ERROR; + } + + return INTEL_SIP_SMC_STATUS_OK; +} + +#if PLATFORM_MODEL == PLAT_SOCFPGA_AGILEX5 +/* SMMU HPS Remapper */ +void intel_smmu_hps_remapper_init(uint64_t *mem) +{ + /* Read out Bit 1 value */ + uint32_t remap = (mmio_read_32(SOCFPGA_SYSMGR(BOOT_SCRATCH_POR_1)) & 0x02); + + if (remap == 0x00) { + /* Update DRAM Base address for SDM SMMU */ + mmio_write_32(SOCFPGA_SYSMGR(SDM_BE_ARADDR_REMAP), DRAM_BASE); + mmio_write_32(SOCFPGA_SYSMGR(SDM_BE_AWADDR_REMAP), DRAM_BASE); + *mem = *mem - DRAM_BASE; + } else { + *mem = *mem - DRAM_BASE; + } +} +#endif + /* * This function is responsible for handling all SiP calls from the NS world */ @@ -714,7 +772,8 @@ uintptr_t sip_smc_handler_v1(uint32_t smc_fid, uint32_t retval = 0, completed_addr[3]; uint32_t retval2 = 0; uint32_t mbox_error = 0; - uint64_t retval64, rsu_respbuf[9], seu_respbuf[3]; + uint64_t retval64, rsu_respbuf[9]; + uint32_t seu_respbuf[3]; int status = INTEL_SIP_SMC_STATUS_OK; int mbox_status; unsigned int len_in_resp; @@ -1229,6 +1288,10 @@ uintptr_t sip_smc_handler_v1(uint32_t smc_fid, SMC_RET3(handle, seu_respbuf[0], seu_respbuf[1], seu_respbuf[2]); } + case INTEL_SIP_SMC_SAFE_INJECT_SEU_ERR: + status = intel_sdm_safe_inject_seu_err((uint32_t *)&x1, (uint32_t)x2); + SMC_RET1(handle, status); + default: return socfpga_sip_handler(smc_fid, x1, x2, x3, x4, cookie, handle, flags); diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_sip_svc_v2.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_sip_svc_v2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_sip_svc_v2.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_sip_svc_v2.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_storage.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_storage.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_storage.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_topology.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_topology.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_topology.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_vab.c b/atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_vab.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/common/socfpga_vab.c rename to atf-20240117-bacca82a8/plat/intel/soc/common/socfpga_vab.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/intel/soc/n5x/bl31_plat_setup.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/n5x/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/intel/soc/n5x/bl31_plat_setup.c index a5337ceec..cb5ced6f0 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/bl31_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/n5x/bl31_plat_setup.c @@ -116,8 +116,6 @@ void bl31_platform_setup(void) (uint64_t)plat_secondary_cpus_bl31_entry); mailbox_hps_stage_notify(HPS_EXECUTION_STATE_SSBL); - - ncore_enable_ocram_firewall(); } const mmap_region_t plat_dm_mmap[] = { diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/n5x_clock_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/n5x/include/n5x_clock_manager.h similarity index 92% rename from atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/n5x_clock_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/n5x/include/n5x_clock_manager.h index 14a571739..54477dadc 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/n5x_clock_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/n5x/include/n5x_clock_manager.h @@ -4,10 +4,9 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef CLOCKMANAGER_H -#define CLOCKMANAGER_H +#ifndef N5X_SOCFPGA_CLOCKMANAGER_H +#define N5X_SOCFPGA_CLOCKMANAGER_H -#include "socfpga_handoff.h" /* MACRO DEFINITION */ #define SOCFPGA_GLOBAL_TIMER 0xffd01000 @@ -56,5 +55,6 @@ uint64_t get_l4_clk(void); uint32_t get_clk_freq(uint32_t psrc_reg); uint32_t get_mpu_clk(void); uint32_t get_cpu_clk(void); +uint32_t get_mpu_periph_clk(void); -#endif +#endif /* N5X_SOCFPGA_CLOCKMANAGER_H */ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/n5x_system_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/n5x/include/n5x_system_manager.h similarity index 93% rename from atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/n5x_system_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/n5x/include/n5x_system_manager.h index b6282197a..3610a6e92 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/n5x_system_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/n5x/include/n5x_system_manager.h @@ -143,6 +143,18 @@ #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_8 0x278 #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_9 0x27C +/* QSPI ECC from SDM register */ +#define SOCFPGA_ECC_QSPI_CTRL 0x08 +#define SOCFPGA_ECC_QSPI_ERRINTEN 0x10 +#define SOCFPGA_ECC_QSPI_ERRINTENS 0x14 +#define SOCFPGA_ECC_QSPI_ERRINTENR 0x18 +#define SOCFPGA_ECC_QSPI_INTMODE 0x1C +#define SOCFPGA_ECC_QSPI_INTSTAT 0x20 +#define SOCFPGA_ECC_QSPI_INTTEST 0x24 +#define SOCFPGA_ECC_QSPI_ECC_ACCCTRL 0x78 +#define SOCFPGA_ECC_QSPI_ECC_STARTACC 0x7C +#define SOCFPGA_ECC_QSPI_ECC_WDCTRL 0x80 + #define DMA0_STREAM_CTRL_REG 0x10D1217C #define DMA1_STREAM_CTRL_REG 0x10D12180 #define SDM_STREAM_CTRL_REG 0x10D12184 @@ -186,6 +198,9 @@ #define RMMUSECSID_REG_VAL BIT(5) /* Macros */ +#define SOCFPGA_ECC_QSPI(_reg) (SOCFPGA_ECC_QSPI_REG_BASE \ + + (SOCFPGA_ECC_QSPI_##_reg)) + #define SOCFPGA_SYSMGR(_reg) (SOCFPGA_SYSMGR_REG_BASE \ + (SOCFPGA_SYSMGR_##_reg)) #define ENABLE_STREAMID WSTREAMIDEN_REG_CTRL | \ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/socfpga_plat_def.h b/atf-20240117-bacca82a8/plat/intel/soc/n5x/include/socfpga_plat_def.h similarity index 66% rename from atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/socfpga_plat_def.h rename to atf-20240117-bacca82a8/plat/intel/soc/n5x/include/socfpga_plat_def.h index a06bbc4c5..1eafeef07 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/include/socfpga_plat_def.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/n5x/include/socfpga_plat_def.h @@ -8,15 +8,16 @@ #ifndef PLAT_SOCFPGA_DEF_H #define PLAT_SOCFPGA_DEF_H -#include "n5x_system_manager.h" #include +#include +#include "n5x_system_manager.h" /* Platform Setting */ -#define PLATFORM_MODEL PLAT_SOCFPGA_N5X -#define BOOT_SOURCE BOOT_SOURCE_SDMMC -#define PLAT_PRIMARY_CPU 0 +#define PLATFORM_MODEL PLAT_SOCFPGA_N5X +#define BOOT_SOURCE BOOT_SOURCE_SDMMC +#define PLAT_PRIMARY_CPU 0 #define PLAT_CLUSTER_ID_MPIDR_AFF_SHIFT MPIDR_AFF1_SHIFT -#define PLAT_CPU_ID_MPIDR_AFF_SHIFT MPIDR_AFF0_SHIFT +#define PLAT_CPU_ID_MPIDR_AFF_SHIFT MPIDR_AFF0_SHIFT /* FPGA config helpers */ #define INTEL_SIP_SMC_FPGA_CONFIG_ADDR 0x400000 @@ -29,16 +30,15 @@ /* Register Mapping */ #define SOCFPGA_CCU_NOC_REG_BASE U(0xf7000000) #define SOCFPGA_F2SDRAMMGR_REG_BASE U(0xf8024000) - #define SOCFPGA_MMC_REG_BASE U(0xff808000) - #define SOCFPGA_RSTMGR_REG_BASE U(0xffd11000) #define SOCFPGA_SYSMGR_REG_BASE U(0xffd12000) +#define SOCFPGA_ECC_QSPI_REG_BASE U(0xffa22000) -#define SOCFPGA_L4_PER_SCR_REG_BASE U(0xffd21000) -#define SOCFPGA_L4_SYS_SCR_REG_BASE U(0xffd21100) -#define SOCFPGA_SOC2FPGA_SCR_REG_BASE U(0xffd21200) -#define SOCFPGA_LWSOC2FPGA_SCR_REG_BASE U(0xffd21300) +#define SOCFPGA_L4_PER_SCR_REG_BASE U(0xffd21000) +#define SOCFPGA_L4_SYS_SCR_REG_BASE U(0xffd21100) +#define SOCFPGA_SOC2FPGA_SCR_REG_BASE U(0xffd21200) +#define SOCFPGA_LWSOC2FPGA_SCR_REG_BASE U(0xffd21300) /******************************************************************************* @@ -65,34 +65,39 @@ #define DEVICE4_BASE (0x2000000000) #define DEVICE4_SIZE (0x0100000000) -#define BL2_BASE (0xffe00000) -#define BL2_LIMIT (0xffe1b000) +#define BL2_BASE (0xffe00000) +#define BL2_LIMIT (0xffe1b000) -#define BL31_BASE (0x1000) -#define BL31_LIMIT (0x81000) +#define BL31_BASE (0x1000) +#define BL31_LIMIT (0x81000) /******************************************************************************* * UART related constants ******************************************************************************/ -#define PLAT_UART0_BASE (0xFFC02000) -#define PLAT_UART1_BASE (0xFFC02100) +#define PLAT_UART0_BASE (0xFFC02000) +#define PLAT_UART1_BASE (0xFFC02100) + +/******************************************************************************* + * WDT related constants + ******************************************************************************/ +#define WDT_BASE (0xFFD00200) /******************************************************************************* * GIC related constants ******************************************************************************/ -#define PLAT_GIC_BASE (0xFFFC0000) -#define PLAT_GICC_BASE (PLAT_GIC_BASE + 0x2000) -#define PLAT_GICD_BASE (PLAT_GIC_BASE + 0x1000) -#define PLAT_GICR_BASE 0 +#define PLAT_GIC_BASE (0xFFFC0000) +#define PLAT_GICC_BASE (PLAT_GIC_BASE + 0x2000) +#define PLAT_GICD_BASE (PLAT_GIC_BASE + 0x1000) +#define PLAT_GICR_BASE 0 -#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (400000000) -#define PLAT_HZ_CONVERT_TO_MHZ (1000000) +#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (400000000) +#define PLAT_HZ_CONVERT_TO_MHZ (1000000) /******************************************************************************* * SDMMC related pointer function ******************************************************************************/ -#define SDMMC_READ_BLOCKS mmc_read_blocks -#define SDMMC_WRITE_BLOCKS mmc_write_blocks +#define SDMMC_READ_BLOCKS mmc_read_blocks +#define SDMMC_WRITE_BLOCKS mmc_write_blocks /******************************************************************************* * sysmgr.boot_scratch_cold6 & 7 (64bit) are used to indicate L2 reset @@ -101,6 +106,6 @@ #define L2_RESET_DONE_REG 0xFFD12218 /* Platform specific system counter */ -#define PLAT_SYS_COUNTER_FREQ_IN_MHZ get_cpu_clk() +#define PLAT_SYS_COUNTER_FREQ_IN_MHZ U(400) #endif /* PLAT_SOCFPGA_DEF_H */ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/platform.mk b/atf-20240117-bacca82a8/plat/intel/soc/n5x/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/n5x/platform.mk rename to atf-20240117-bacca82a8/plat/intel/soc/n5x/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/soc/n5x_clock_manager.c b/atf-20240117-bacca82a8/plat/intel/soc/n5x/soc/n5x_clock_manager.c similarity index 88% rename from atf-20231013-0ea67d76a/plat/intel/soc/n5x/soc/n5x_clock_manager.c rename to atf-20240117-bacca82a8/plat/intel/soc/n5x/soc/n5x_clock_manager.c index f32e0f8ba..c33140d4c 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/n5x/soc/n5x_clock_manager.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/n5x/soc/n5x_clock_manager.c @@ -12,8 +12,7 @@ #include "n5x_clock_manager.h" #include "n5x_system_manager.h" - - +#include "socfpga_handoff.h" uint64_t clk_get_pll_output_hz(void) { @@ -151,7 +150,22 @@ uint32_t get_cpu_clk(void) { uint32_t cpu_clk = 0; - cpu_clk = get_mpu_clk()/PLAT_HZ_CONVERT_TO_MHZ; + cpu_clk = get_l4_clk()/PLAT_HZ_CONVERT_TO_MHZ; return cpu_clk; } + +/* Return mpu_periph_clk clock frequency */ +uint32_t get_mpu_periph_clk(void) +{ + uint32_t mpu_periph_clk = 0; + /* mpu_periph_clk is mpu_clk, via a static /4 divider */ + mpu_periph_clk = (get_mpu_clk()/4)/PLAT_HZ_CONVERT_TO_MHZ; + return mpu_periph_clk; +} + +/* Return mpu_periph_clk tick */ +unsigned int plat_get_syscnt_freq2(void) +{ + return PLAT_SYS_COUNTER_FREQ_IN_TICKS; +} diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/bl2_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/bl2_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/bl31_plat_setup.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/bl31_plat_setup.c index ba00e8202..d0aa9729e 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/bl31_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/bl31_plat_setup.c @@ -123,8 +123,6 @@ void bl31_platform_setup(void) (uint64_t)plat_secondary_cpus_bl31_entry); mailbox_hps_stage_notify(HPS_EXECUTION_STATE_SSBL); - - enable_ocram_firewall(); } const mmap_region_t plat_stratix10_mmap[] = { diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_clock_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_clock_manager.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_clock_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_clock_manager.h index 5f763755a..c7632bed5 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_clock_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_clock_manager.h @@ -95,7 +95,8 @@ uint32_t get_wdt_clk(void); uint32_t get_uart_clk(void); uint32_t get_mmc_clk(void); uint32_t get_l3_clk(uint32_t ref_clk); -uint32_t get_ref_clk(uint32_t pllglob); uint32_t get_cpu_clk(void); +uint32_t get_ref_clk(uint32_t pllglob); +uint32_t get_mpu_periph_clk(void); #endif diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_memory_controller.h b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_memory_controller.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_memory_controller.h rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_memory_controller.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_mmc.h b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_mmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_mmc.h rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_mmc.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_pinmux.h b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_pinmux.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_pinmux.h rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_pinmux.h diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_system_manager.h b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_system_manager.h similarity index 93% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_system_manager.h rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_system_manager.h index 88c0b4693..e7bf73085 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/s10_system_manager.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/s10_system_manager.h @@ -142,6 +142,18 @@ #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_8 0x278 #define SOCFPGA_SYSMGR_BOOT_SCRATCH_POR_9 0x27C +/* QSPI ECC from SDM register */ +#define SOCFPGA_ECC_QSPI_CTRL 0x08 +#define SOCFPGA_ECC_QSPI_ERRINTEN 0x10 +#define SOCFPGA_ECC_QSPI_ERRINTENS 0x14 +#define SOCFPGA_ECC_QSPI_ERRINTENR 0x18 +#define SOCFPGA_ECC_QSPI_INTMODE 0x1C +#define SOCFPGA_ECC_QSPI_INTSTAT 0x20 +#define SOCFPGA_ECC_QSPI_INTTEST 0x24 +#define SOCFPGA_ECC_QSPI_ECC_ACCCTRL 0x78 +#define SOCFPGA_ECC_QSPI_ECC_STARTACC 0x7C +#define SOCFPGA_ECC_QSPI_ECC_WDCTRL 0x80 + #define DMA0_STREAM_CTRL_REG 0x10D1217C #define DMA1_STREAM_CTRL_REG 0x10D12180 #define SDM_STREAM_CTRL_REG 0x10D12184 @@ -182,6 +194,8 @@ #define RMMUSECSID_REG_VAL BIT(5) /* Macros */ +#define SOCFPGA_ECC_QSPI(_reg) (SOCFPGA_ECC_QSPI_REG_BASE \ + + (SOCFPGA_ECC_QSPI_##_reg)) #define SOCFPGA_SYSMGR(_reg) (SOCFPGA_SYSMGR_REG_BASE \ + (SOCFPGA_SYSMGR_##_reg)) diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/socfpga_plat_def.h b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/socfpga_plat_def.h similarity index 71% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/socfpga_plat_def.h rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/socfpga_plat_def.h index 7c9f15acf..7f452bd6e 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/include/socfpga_plat_def.h +++ b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/include/socfpga_plat_def.h @@ -8,14 +8,15 @@ #define PLAT_SOCFPGA_DEF_H #include +#include #include "s10_system_manager.h" /* Platform Setting */ -#define PLATFORM_MODEL PLAT_SOCFPGA_STRATIX10 -#define BOOT_SOURCE BOOT_SOURCE_SDMMC -#define PLAT_PRIMARY_CPU 0 +#define PLATFORM_MODEL PLAT_SOCFPGA_STRATIX10 +#define BOOT_SOURCE BOOT_SOURCE_SDMMC +#define PLAT_PRIMARY_CPU 0 #define PLAT_CLUSTER_ID_MPIDR_AFF_SHIFT MPIDR_AFF1_SHIFT -#define PLAT_CPU_ID_MPIDR_AFF_SHIFT MPIDR_AFF0_SHIFT +#define PLAT_CPU_ID_MPIDR_AFF_SHIFT MPIDR_AFF0_SHIFT /* FPGA config helpers */ #define INTEL_SIP_SMC_FPGA_CONFIG_ADDR 0x400000 @@ -33,6 +34,7 @@ #define SOCFPGA_RSTMGR_REG_BASE 0xffd11000 #define SOCFPGA_SYSMGR_REG_BASE 0xffd12000 +#define SOCFPGA_ECC_QSPI_REG_BASE 0xffa22000 #define SOCFPGA_L4_PER_SCR_REG_BASE 0xffd21000 #define SOCFPGA_L4_SYS_SCR_REG_BASE 0xffd21100 @@ -63,34 +65,39 @@ #define DEVICE4_BASE (0x2000000000) #define DEVICE4_SIZE (0x0100000000) -#define BL2_BASE (0xffe00000) -#define BL2_LIMIT (0xffe1b000) +#define BL2_BASE (0xffe00000) +#define BL2_LIMIT (0xffe2b000) -#define BL31_BASE (0x1000) -#define BL31_LIMIT (0x81000) +#define BL31_BASE (0x1000) +#define BL31_LIMIT (0x81000) /******************************************************************************* * UART related constants ******************************************************************************/ -#define PLAT_UART0_BASE (0xFFC02000) -#define PLAT_UART1_BASE (0xFFC02100) +#define PLAT_UART0_BASE (0xFFC02000) +#define PLAT_UART1_BASE (0xFFC02100) + +/******************************************************************************* + * WDT related constants + ******************************************************************************/ +#define WDT_BASE (0xFFD00200) /******************************************************************************* * GIC related constants ******************************************************************************/ -#define PLAT_GIC_BASE (0xFFFC0000) -#define PLAT_GICC_BASE (PLAT_GIC_BASE + 0x2000) -#define PLAT_GICD_BASE (PLAT_GIC_BASE + 0x1000) -#define PLAT_GICR_BASE 0 +#define PLAT_GIC_BASE (0xFFFC0000) +#define PLAT_GICC_BASE (PLAT_GIC_BASE + 0x2000) +#define PLAT_GICD_BASE (PLAT_GIC_BASE + 0x1000) +#define PLAT_GICR_BASE 0 -#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (400000000) -#define PLAT_HZ_CONVERT_TO_MHZ (1000000) +#define PLAT_SYS_COUNTER_FREQ_IN_TICKS (400000000) +#define PLAT_HZ_CONVERT_TO_MHZ (1000000) /******************************************************************************* * SDMMC related pointer function ******************************************************************************/ -#define SDMMC_READ_BLOCKS mmc_read_blocks -#define SDMMC_WRITE_BLOCKS mmc_write_blocks +#define SDMMC_READ_BLOCKS mmc_read_blocks +#define SDMMC_WRITE_BLOCKS mmc_write_blocks /******************************************************************************* * sysmgr.boot_scratch_cold6 & 7 (64bit) are used to indicate L2 reset @@ -99,7 +106,7 @@ #define L2_RESET_DONE_REG 0xFFD12218 /* Platform specific system counter */ -#define PLAT_SYS_COUNTER_FREQ_IN_MHZ get_cpu_clk() +#define PLAT_SYS_COUNTER_FREQ_IN_MHZ U(400) #endif /* PLATSOCFPGA_DEF_H */ diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/platform.mk b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/platform.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/platform.mk rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/platform.mk index 6bc96fb6c..9567c453a 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/platform.mk +++ b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/platform.mk @@ -53,6 +53,7 @@ BL2_SOURCES += \ plat/intel/soc/common/soc/socfpga_mailbox.c \ plat/intel/soc/common/soc/socfpga_reset_manager.c \ plat/intel/soc/common/drivers/qspi/cadence_qspi.c \ + plat/intel/soc/common/drivers/ddr/ddr.c \ plat/intel/soc/common/drivers/wdt/watchdog.c include lib/zlib/zlib.mk diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_clock_manager.c b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_clock_manager.c similarity index 87% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_clock_manager.c rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_clock_manager.c index 416d35923..0a3b77b1e 100644 --- a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_clock_manager.c +++ b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_clock_manager.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022, Intel Corporation. All rights reserved. + * Copyright (c) 2019-2023, Intel Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -230,6 +230,40 @@ uint32_t get_ref_clk(uint32_t pllglob) return ref_clk; } +/* Calculate clock frequency based on parameter */ +uint32_t get_clk_freq(uint32_t psrc_reg, uint32_t main_pllc, uint32_t per_pllc) +{ + uint32_t clk_psrc, ref_clk; + uint32_t pllc_reg, pllc_div, pllglob_reg; + + clk_psrc = mmio_read_32(ALT_CLKMGR_MAINPLL + psrc_reg); + + switch (ALT_CLKMGR_PSRC(clk_psrc)) { + case ALT_CLKMGR_SRC_MAIN: + pllc_reg = ALT_CLKMGR_MAINPLL + main_pllc; + pllglob_reg = ALT_CLKMGR_MAINPLL + ALT_CLKMGR_MAINPLL_PLLGLOB; + break; + case ALT_CLKMGR_SRC_PER: + pllc_reg = ALT_CLKMGR_PERPLL + per_pllc; + pllglob_reg = ALT_CLKMGR_PERPLL + ALT_CLKMGR_PERPLL_PLLGLOB; + break; + default: + return 0; + } + + ref_clk = get_ref_clk(mmio_read_32(pllglob_reg)); + + pllc_div = mmio_read_32(pllc_reg) & 0xff; + + if (pllc_div != 0) { + ref_clk = (ref_clk / pllc_div) / (clk_psrc + 1); + return ref_clk; + } else { + VERBOSE("PLL DIV is 0\n"); + return 0; + } +} + /* Calculate L3 interconnect main clock */ uint32_t get_l3_clk(uint32_t ref_clk) { @@ -308,6 +342,17 @@ uint32_t get_mmc_clk(void) return mmc_clk; } +/* Return MPU clock */ +uint32_t get_mpu_clk(void) +{ + uint32_t mpu_clk; + + mpu_clk = get_clk_freq(ALT_CLKMGR_MAINPLL_NOCCLK, ALT_CLKMGR_MAINPLL_PLLC0, + ALT_CLKMGR_PERPLL_PLLC0); + + return mpu_clk; +} + /* Get cpu freq clock */ uint32_t get_cpu_clk(void) { @@ -320,3 +365,18 @@ uint32_t get_cpu_clk(void) return cpu_clk; } + +/* Return mpu_periph_clk clock frequency */ +uint32_t get_mpu_periph_clk(void) +{ + uint32_t mpu_periph_clk = 0; + /* mpu_periph_clk is mpu_clk, via a static /4 divider */ + mpu_periph_clk = (get_mpu_clk()/4)/PLAT_HZ_CONVERT_TO_MHZ; + return mpu_periph_clk; +} + +/* Return mpu_periph_clk tick */ +unsigned int plat_get_syscnt_freq2(void) +{ + return PLAT_SYS_COUNTER_FREQ_IN_TICKS; +} diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_memory_controller.c b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_memory_controller.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_memory_controller.c rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_memory_controller.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_mmc.c b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_mmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_mmc.c rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_mmc.c diff --git a/atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_pinmux.c b/atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_pinmux.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/intel/soc/stratix10/soc/s10_pinmux.c rename to atf-20240117-bacca82a8/plat/intel/soc/stratix10/soc/s10_pinmux.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/board/pm_src.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/board/pm_src.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/board/pm_src.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/board/pm_src.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/plat_bl31_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/plat_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/plat_bl31_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/plat_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/platform.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/a3700/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/a3700/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/a3700_common.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/a3700_common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/a3700_common.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/a3700_common.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/a3700_ea.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/a3700_ea.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/a3700_ea.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/a3700_ea.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/a3700_sip_svc.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/a3700_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/a3700_sip_svc.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/a3700_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/aarch64/a3700_clock.S b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/aarch64/a3700_clock.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/aarch64/a3700_clock.S rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/aarch64/a3700_clock.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/aarch64/a3700_common.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/aarch64/a3700_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/aarch64/a3700_common.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/aarch64/a3700_common.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/cm3_system_reset.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/cm3_system_reset.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/cm3_system_reset.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/cm3_system_reset.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/dram_win.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/dram_win.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/dram_win.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/dram_win.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/a3700_plat_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/a3700_plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/a3700_plat_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/a3700_plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/a3700_pm.h b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/a3700_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/a3700_pm.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/a3700_pm.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/ddr_info.h b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/ddr_info.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/ddr_info.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/ddr_info.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/dram_win.h b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/dram_win.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/dram_win.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/dram_win.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/io_addr_dec.h b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/io_addr_dec.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/io_addr_dec.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/io_addr_dec.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/platform_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/include/platform_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/io_addr_dec.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/io_addr_dec.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/io_addr_dec.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/io_addr_dec.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/plat_cci.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/plat_cci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/plat_cci.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/plat_cci.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/plat_pm.c b/atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a3k/common/plat_pm.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a3k/common/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/board/dram_port.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/board/dram_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/board/dram_port.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/board/dram_port.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/platform.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/board/dram_port.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/board/dram_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/board/dram_port.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/board/dram_port.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/platform.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_amc/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_amc/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/board/dram_port.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/board/dram_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/board/dram_port.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/board/dram_port.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/board/phy-porting-layer.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/board/phy-porting-layer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/board/phy-porting-layer.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/board/phy-porting-layer.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/platform.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a70x0_mochabin/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a70x0_mochabin/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/board/dram_port.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/board/dram_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/board/dram_port.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/board/dram_port.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/board/phy-porting-layer.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/board/phy-porting-layer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/board/phy-porting-layer.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/board/phy-porting-layer.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/platform.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/board/dram_port.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/board/dram_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/board/dram_port.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/board/dram_port.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/platform.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_mcbin/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_mcbin/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/board/dram_port.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/board/dram_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/board/dram_port.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/board/dram_port.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/board/system_power.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/board/system_power.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/board/system_power.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/board/system_power.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/platform.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/a80x0_puzzle/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/a80x0_puzzle/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/a8k_common.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/a8k_common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/a8k_common.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/a8k_common.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/aarch64/a8k_common.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/aarch64/a8k_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/aarch64/a8k_common.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/aarch64/a8k_common.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/aarch64/plat_arch_config.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/aarch64/plat_arch_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/aarch64/plat_arch_config.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/aarch64/plat_arch_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble.ld.S b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble.ld.S rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble.ld.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble_main.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble_main.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble_main.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble_main.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble_mem.S b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble_mem.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/ble/ble_mem.S rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/ble/ble_mem.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/a8k_plat_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/a8k_plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/a8k_plat_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/a8k_plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/ddr_info.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/ddr_info.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/ddr_info.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/ddr_info.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/mentor_i2c_plat.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/mentor_i2c_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/mentor_i2c_plat.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/mentor_i2c_plat.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/platform_def.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/include/platform_def.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_a8k.mk b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_a8k.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_a8k.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_a8k.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_bl2_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_bl2_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_bl31_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_bl31_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_defs.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_defs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_defs.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_defs.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.h b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.h rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/mss/mss_pm_ipc.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_bl1_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_bl1_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_bl31_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_bl31_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_ble_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_ble_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_ble_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_ble_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_pm.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_pm.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_pm_trace.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_pm_trace.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_pm_trace.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_pm_trace.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_thermal.c b/atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_thermal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/a8k/common/plat_thermal.c rename to atf-20240117-bacca82a8/plat/marvell/armada/a8k/common/plat_thermal.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/aarch64/marvell_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/aarch64/marvell_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/aarch64/marvell_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/aarch64/marvell_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/aarch64/marvell_common.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/aarch64/marvell_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/aarch64/marvell_common.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/aarch64/marvell_common.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/aarch64/marvell_helpers.S b/atf-20240117-bacca82a8/plat/marvell/armada/common/aarch64/marvell_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/aarch64/marvell_helpers.S rename to atf-20240117-bacca82a8/plat/marvell/armada/common/aarch64/marvell_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_bl1_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_bl1_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_bl2_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_bl2_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_bl31_setup.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_bl31_setup.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_cci.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_cci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_cci.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_cci.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_common.mk b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_common.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_common.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_console.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_console.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_console.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_ddr_info.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_ddr_info.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_ddr_info.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_ddr_info.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_gicv2.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_gicv2.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_gicv3.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_gicv3.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_image_load.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_image_load.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_io_storage.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_io_storage.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_pm.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_pm.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_pm.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_topology.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/marvell_topology.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/marvell_topology.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mrvl_sip_svc.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/mrvl_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mrvl_sip_svc.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mrvl_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_common.mk b/atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_common.mk rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_common.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_ipc_drv.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_ipc_drv.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_ipc_drv.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_ipc_drv.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_ipc_drv.h b/atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_ipc_drv.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_ipc_drv.h rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_ipc_drv.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_mem.h b/atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_mem.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_mem.h rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_mem.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_scp_bl2_format.h b/atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_scp_bl2_format.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_scp_bl2_format.h rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_scp_bl2_format.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_scp_bootloader.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_scp_bootloader.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_scp_bootloader.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_scp_bootloader.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_scp_bootloader.h b/atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_scp_bootloader.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/mss/mss_scp_bootloader.h rename to atf-20240117-bacca82a8/plat/marvell/armada/common/mss/mss_scp_bootloader.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/armada/common/plat_delay_timer.c b/atf-20240117-bacca82a8/plat/marvell/armada/common/plat_delay_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/armada/common/plat_delay_timer.c rename to atf-20240117-bacca82a8/plat/marvell/armada/common/plat_delay_timer.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/marvell.mk b/atf-20240117-bacca82a8/plat/marvell/marvell.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/marvell.mk rename to atf-20240117-bacca82a8/plat/marvell/marvell.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c b/atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c rename to atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/board/dram_port.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/board/phy-porting-layer.h b/atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/board/phy-porting-layer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/board/phy-porting-layer.h rename to atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/board/phy-porting-layer.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/mvebu_def.h b/atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/mvebu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/mvebu_def.h rename to atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/mvebu_def.h diff --git a/atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/platform.mk b/atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/board/marvell_plat_config.c b/atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/board/marvell_plat_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/board/marvell_plat_config.c rename to atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/board/marvell_plat_config.c diff --git a/atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/platform.mk b/atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/platform.mk rename to atf-20240117-bacca82a8/plat/marvell/octeontx/otx2/t91/t9130_cex7_eval/platform.mk diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/Config.in b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/Config.in new file mode 100644 index 000000000..f42c1bf4b --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/Config.in @@ -0,0 +1,826 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# Main configurations for MediaTek ApSoc platforms +# + +mainmenu "MediaTek ATF Configuration" + +config _AARCH32 + bool + +choice + prompt "Platform" + + config _PLAT_MT7622 + bool "MT7622" + select _SUPPORTS_BOOT_DEVICE_EMMC_SD + select _DEFAULT_BOOT_DEVICE_SNFI_NAND + select _BROM_NAND_HEADER_LEGACY + select _DEFAULT_NAND_NMBM + select _SUPPORTS_AR_V1 + + config _PLAT_MT7629 + bool "MT7629" + select _AARCH32 + select _DEFAULT_BOOT_DEVICE_SNFI_NAND + select _BROM_NAND_HEADER_LEGACY + select _DEFAULT_NAND_NMBM + + config _PLAT_MT7981 + bool "MT7981" + select _SUPPORTS_DDR3_256MB + select _SUPPORTS_DDR3_512MB + select _SUPPORTS_DDR4 + select _SUPPORTS_DDR4_512MB + select _SUPPORTS_DDR4_1GB + select _SUPPORTS_DDR3_FREQ + select _SUPPORTS_DDR3_1866 + select _SUPPORTS_DDR3_2133 + select _DEFAULT_DDR3_2133 + select _SUPPORTS_DRAM_DEBUG_LOG + select _SUPPORTS_BOOT_DEVICE_SPIM_NAND + select _SUPPORTS_BOOT_DEVICE_EMMC_SD + select _DEFAULT_BOOT_DEVICE_SPIM_NAND + select _BROM_NAND_HEADER_HSM + select _DEFAULT_NAND_NMBM + select _SUPPORTS_EMERG_MEM_DUMP + select _SUPPORTS_AR_V2 + + config _PLAT_MT7986 + bool "MT7986" + select _SUPPORTS_DDR3_256MB + select _SUPPORTS_DDR3_512MB + select _SUPPORTS_DDR4 + select _SUPPORTS_DDR4_512MB + select _SUPPORTS_DDR4_1GB + select _SUPPORTS_DDR4_2GB + select _SUPPORTS_DDR4_FREQ + select _SUPPORTS_DDR4_2666 + select _SUPPORTS_DDR4_3200 + select _DEFAULT_DDR4_3200 + select _SUPPORTS_DRAM_DEBUG_LOG + select _SUPPORTS_BOOT_DEVICE_SPIM_NAND + select _SUPPORTS_BOOT_DEVICE_EMMC_SD + select _DEFAULT_BOOT_DEVICE_SPIM_NAND + select _BROM_NAND_HEADER_HSM + select _DEFAULT_NAND_NMBM + select _SUPPORTS_I2C + select _SUPPORTS_EMERG_MEM_DUMP + select _SUPPORTS_AR_V2 + select _SUPPORTS_FSEK + + config _PLAT_MT7988 + bool "MT7988" + select _SUPPORTS_DDR3_256MB + select _SUPPORTS_DDR3_512MB + select _SUPPORTS_DDR4 + select _SUPPORTS_DDR4_1GB + select _SUPPORTS_DDR4_2GB + select _SUPPORTS_DDR_COMB + select _SUPPORTS_DDR3_FREQ + select _SUPPORTS_DDR3_1866 + select _SUPPORTS_DDR3_2133 + select _DEFAULT_DDR3_2133 + select _SUPPORTS_DDR4_FREQ + select _SUPPORTS_DDR4_2666 + select _SUPPORTS_DDR4_3200 + select _DEFAULT_DDR4_3200 + select _SUPPORTS_DRAM_DEBUG_LOG + select _SUPPORTS_BOOT_DEVICE_SPIM_NAND + select _SUPPORTS_BOOT_DEVICE_EMMC_SD + select _DEFAULT_BOOT_DEVICE_SPIM_NAND + select _BROM_NAND_HEADER_HSM20 + select _DEFAULT_NAND_NMBM + select _SUPPORTS_I2C + select _SUPPORTS_EMERG_MEM_DUMP + select _SUPPORTS_AR_V2 +endchoice + +# Makefile options +config ARCH + string + depends on _AARCH32 + default "aarch32" + +config PLAT + string + default "mt7622" if _PLAT_MT7622 + default "mt7629" if _PLAT_MT7629 + default "mt7981" if _PLAT_MT7981 + default "mt7986" if _PLAT_MT7986 + default "mt7988" if _PLAT_MT7988 + +################################################################################ + +config _SUPPORTS_DDR4 + bool + +config _SUPPORTS_DDR_COMB + bool + +choice + prompt "DRAM type" + +if !_ENABLE_FPGA + config _DRAM_DDR3 + bool "DDR3" + + config _DRAM_DDR4 + bool "DDR4" + depends on _SUPPORTS_DDR4 + + config _DRAM_DDR_COMB + bool "DDR comb" + depends on _SUPPORTS_DDR_COMB +endif + +endchoice + +# Makefile option +config DRAM_USE_DDR4 + int + default 1 + depends on _DRAM_DDR4 + +config DRAM_USE_COMB + int + default 1 + depends on _DRAM_DDR_COMB + +################################################################################ + +config _SUPPORTS_DDR3_256MB + bool + +config _SUPPORTS_DDR3_512MB + bool + +config _SUPPORTS_DDR4_512MB + bool + +config _SUPPORTS_DDR4_1GB + bool + +config _SUPPORTS_DDR4_2GB + bool + +config _SUPPORTS_DDR3_FREQ + bool + +config _SUPPORTS_DDR3_1866 + bool + +config _SUPPORTS_DDR3_2133 + bool + +config _DEFAULT_DDR3_1866 + bool + +config _DEFAULT_DDR3_2133 + bool + +config _SUPPORTS_DDR4_FREQ + bool + +config _SUPPORTS_DDR4_2666 + bool + +config _SUPPORTS_DDR4_3200 + bool + +config _DEFAULT_DDR4_2666 + bool + +config _DEFAULT_DDR4_3200 + bool + +config _SUPPORTS_DRAM_DEBUG_LOG + bool + +################################################################################ + +menu "Advanced DRAM configurations" + depends on !_ENABLE_FPGA + +choice + prompt "DRAM size limitation" + + config _DRAM_SIZE_AUTO + bool "No limit" + + config _DRAM_SIZE_256MB + bool "256MB" + depends on _DRAM_DDR3 && _SUPPORTS_DDR3_256MB + + config _DRAM_SIZE_512MB + bool "512MB" + depends on (_DRAM_DDR3 && _SUPPORTS_DDR3_512MB) || \ + (_DRAM_DDR4 && _SUPPORTS_DDR4_512MB) + + config _DRAM_SIZE_1GB + bool "1GB" + depends on _DRAM_DDR4 && _SUPPORTS_DDR4_1GB + + config _DRAM_SIZE_2GB + bool "2GB" + depends on _DRAM_DDR4 && _SUPPORTS_DDR4_2GB +endchoice + +# Makefile option +config DRAM_SIZE_LIMIT + int + depends on !_DRAM_SIZE_AUTO + default 256 if _DRAM_SIZE_256MB + default 512 if _DRAM_SIZE_512MB + default 1024 if _DRAM_SIZE_1GB + default 2048 if _DRAM_SIZE_2GB + +################################################################################ + +choice + prompt "DDR3 frequency" + depends on _SUPPORTS_DDR3_FREQ && (_DRAM_DDR3 || _DRAM_DDR_COMB) + default _DDR3_FREQ_1866 if _DEFAULT_DDR3_1866 + default _DDR3_FREQ_2133 if _DEFAULT_DDR3_2133 + + config _DDR3_FREQ_1866 + bool "1866MT/s" + + config _DDR3_FREQ_2133 + bool "2133MT/s" +endchoice + +# Makefile options +config DDR3_FREQ_1866 + int + default 1 + depends on _DDR3_FREQ_1866 + +config DDR3_FREQ_2133 + int + default 1 + depends on _DDR3_FREQ_2133 + +################################################################################ + +choice + prompt "DDR4 frequency" + depends on _SUPPORTS_DDR4_FREQ && (_DRAM_DDR4 || _DRAM_DDR_COMB) + default _DDR4_FREQ_2666 if _DEFAULT_DDR4_2666 + default _DDR4_FREQ_3200 if _DEFAULT_DDR4_3200 + + config _DDR4_FREQ_2666 + bool "2666MT/s" + + config _DDR4_FREQ_3200 + bool "3200MT/s" +endchoice + +# Makefile options +config DDR4_FREQ_2666 + int + default 1 + depends on _DDR4_FREQ_2666 + +config DDR4_FREQ_3200 + int + default 1 + depends on _DDR4_FREQ_3200 + +################################################################################ + +source "plat/mediatek/mt7622/drivers/dram/Config.in" +source "plat/mediatek/mt7981/drivers/dram/Config.in" +source "plat/mediatek/mt7988/drivers/dram/Config.in" + +################################################################################ + +config _DRAM_DEBUG_LOG + bool "Enable verbose DRAM log" + default n + depends on _SUPPORTS_DRAM_DEBUG_LOG + +# Makefile option +config DRAM_DEBUG_LOG + int + default 1 + depends on _DRAM_DEBUG_LOG + +endmenu # Advanced DRAM configurations + +################################################################################ + +config _SUPPORTS_BOOT_DEVICE_SPIM_NAND + bool + +config _SUPPORTS_BOOT_DEVICE_EMMC_SD + bool + +config _DEFAULT_BOOT_DEVICE_SNFI_NAND + bool + +config _DEFAULT_BOOT_DEVICE_SPIM_NAND + bool + +choice + prompt "Boot device" + default _BOOT_DEVICE_SNFI_NAND if _DEFAULT_BOOT_DEVICE_SNFI_NAND + default _BOOT_DEVICE_SPIM_NAND if _DEFAULT_BOOT_DEVICE_SPIM_NAND + + config _BOOT_DEVICE_SPI_NOR + bool "SPI-NOR" + + config _BOOT_DEVICE_SNFI_NAND + bool "SPI-NAND (SNFI)" + + config _BOOT_DEVICE_SPIM_NAND + bool "SPI-NAND (SPIM)" + depends on _SUPPORTS_BOOT_DEVICE_SPIM_NAND + + config _BOOT_DEVICE_EMMC + bool "eMMC" + depends on _SUPPORTS_BOOT_DEVICE_EMMC_SD + + config _BOOT_DEVICE_SD + bool "SD" + depends on _SUPPORTS_BOOT_DEVICE_EMMC_SD + + config _BOOT_DEVICE_RAM + bool "RAM" +endchoice + +menu "Advanced boot device configuration" + +config _BROM_NAND_HEADER_LEGACY + bool + +config _BROM_NAND_HEADER_HSM + bool + +config _BROM_NAND_HEADER_HSM20 + bool + +choice + prompt "NAND type" + depends on _BOOT_DEVICE_SNFI_NAND || _BOOT_DEVICE_SPIM_NAND + default _NAND_TYPE_2K_64 + + config _NAND_TYPE_2K_64 + bool "2k+64" + + config _NAND_TYPE_2K_120 + bool "2k+120" + depends on _BROM_NAND_HEADER_LEGACY + + config _NAND_TYPE_2K_128 + bool "2k+128" + + config _NAND_TYPE_4K_256 + bool "4k+256" +endchoice + +config _RAM_BOOT_DEBUGGER_HOOK + bool "Enable RAM boot debugger hook" + depends on _BOOT_DEVICE_RAM + default n + +osource "plat/mediatek/apsoc_common/bl2/Config-uart_dl.in" + +config _DEFAULT_NAND_NMBM + bool + +config _DEFAULT_NAND_UBI + bool + +choice + prompt "NAND bad block management" + depends on _BOOT_DEVICE_SNFI_NAND || _BOOT_DEVICE_SPIM_NAND + default _NAND_NMBM if _DEFAULT_NAND_NMBM + default _NAND_UBI if _DEFAULT_NAND_UBI + + config _NAND_SKIP_BAD + bool "Skip bad block" + + config _NAND_NMBM + bool "NMBM" + + config _NAND_UBI + bool "UBI" +endchoice + +menuconfig _NMBM_CONFIGS + bool "Advanced NMBM Configurations" + depends on _NAND_NMBM + +if _NMBM_CONFIGS + +config NMBM_MAX_RATIO + int "Default ratio for reserved block for management (N/16)" + range 1 8 + default 1 + help + This option determines how many blocks at the high adress of NAND + can be used for NMBM. For a large size NAND, 1/16 of total blocks + are still too large for NMBM. For this situation please set + CONFIG_NMBM_MAX_BLOCKS to a proper value to limit the maximum + reserved blocks. + +config NMBM_MAX_RESERVED_BLOCKS + int "Maximum blocks allowed for reserved block for management" + range 32 2147483647 + default 256 + help + This option is applied after NMBM_MAX_RATIO to ensure maximum + blocks reserved block for NMBM will not exceed the value set by + this option. + +choice + prompt "Default log level" + default _NMBM_LOG_LEVEL_INFO + +config _NMBM_LOG_LEVEL_DEBUG + bool "0 - Debug" + +config _NMBM_LOG_LEVEL_INFO + bool "1 - Info" + +config _NMBM_LOG_LEVEL_WARN + bool "2 - Warn" + +config _NMBM_LOG_LEVEL_ERR + bool "3 - Error" + +config _NMBM_LOG_LEVEL_EMERG + bool "4 - Emergency" + +config _NMBM_LOG_LEVEL_NONE + bool "5 - None" + +endchoice + +# Makefile options +config NMBM_DEFAULT_LOG_LEVEL + int + default 0 if _NMBM_LOG_LEVEL_DEBUG + default 1 if _NMBM_LOG_LEVEL_INFO + default 2 if _NMBM_LOG_LEVEL_WARN + default 3 if _NMBM_LOG_LEVEL_ERR + default 4 if _NMBM_LOG_LEVEL_EMERG + default 5 if _NMBM_LOG_LEVEL_NONE + +endif # _NMBM_CONFIGS + +config _ENABLE_OVERRIDE_FIP_BASE + bool "Override default FIP offset" + depends on (_BOOT_DEVICE_SPI_NOR || _BOOT_DEVICE_SNFI_NAND || _BOOT_DEVICE_SPIM_NAND) && !_NAND_UBI + default n + +config OVERRIDE_FIP_BASE + hex "FIP offset" + depends on _ENABLE_OVERRIDE_FIP_BASE + +config _ENABLE_OVERRIDE_FIP_SIZE + bool "Override default FIP size" + depends on (_BOOT_DEVICE_SPI_NOR || _BOOT_DEVICE_SNFI_NAND || _BOOT_DEVICE_SPIM_NAND) && !_NAND_UBI + default n + +config OVERRIDE_FIP_SIZE + hex "FIP size" + depends on _ENABLE_OVERRIDE_FIP_SIZE + +config _ENABLE_OVERRIDE_UBI_START_ADDR + bool "Override default UBI partition start address" + depends on _NAND_UBI + default n + +config OVERRIDE_UBI_START_ADDR + hex "UBI partition start address" + depends on _ENABLE_OVERRIDE_UBI_START_ADDR + default 0x200000 + +config _ENABLE_OVERRIDE_UBI_END_ADDR + bool "Override default UBI partition end address" + depends on _NAND_UBI + default n + +config OVERRIDE_UBI_END_ADDR + hex "UBI partition end address (0 means end of NAND)" + depends on _ENABLE_OVERRIDE_UBI_END_ADDR + default 0 + +endmenu # Advanced boot device configuration + +# Makefile options +config BOOT_DEVICE + string + default "nor" if _BOOT_DEVICE_SPI_NOR + default "snand" if _BOOT_DEVICE_SNFI_NAND + default "spim-nand" if _BOOT_DEVICE_SPIM_NAND + default "emmc" if _BOOT_DEVICE_EMMC + default "sdmmc" if _BOOT_DEVICE_SD + default "ram" if _BOOT_DEVICE_RAM + +config NAND_TYPE + string + depends on _BOOT_DEVICE_SNFI_NAND || _BOOT_DEVICE_SPIM_NAND + default "2k+64" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_LEGACY && _NAND_TYPE_2K_64 + default "hsm:2k+64" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_HSM && _NAND_TYPE_2K_64 + default "hsm20:2k+64" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_HSM20 && _NAND_TYPE_2K_64 + default "spim:2k+64" if _BOOT_DEVICE_SPIM_NAND && _NAND_TYPE_2K_64 + default "2k+120" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_LEGACY && _NAND_TYPE_2K_120 + default "2k+128" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_LEGACY && _NAND_TYPE_2K_128 + default "hsm:2k+128" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_HSM && _NAND_TYPE_2K_128 + default "hsm20:2k+128" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_HSM20 && _NAND_TYPE_2K_128 + default "spim:2k+128" if _BOOT_DEVICE_SPIM_NAND && _NAND_TYPE_2K_128 + default "4k+256" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_LEGACY && _NAND_TYPE_4K_256 + default "hsm:4k+256" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_HSM && _NAND_TYPE_4K_256 + default "hsm20:4k+256" if _BOOT_DEVICE_SNFI_NAND && _BROM_NAND_HEADER_HSM20 && _NAND_TYPE_4K_256 + default "spim:4k+256" if _BOOT_DEVICE_SPIM_NAND && _NAND_TYPE_4K_256 + +config DEVICE_HEADER_OFFSET + hex "Device header offset for SD" + default 0x80000 + depends on _PLAT_MT7622 && _BOOT_DEVICE_SD + +config RAM_BOOT_DEBUGGER_HOOK + int + default 1 + depends on _RAM_BOOT_DEBUGGER_HOOK + +config NMBM + int + default 1 + depends on _NAND_NMBM + +config UBI + int + default 1 + depends on _NAND_UBI + +################################################################################ + +menu "Platform configurations" + +config _SUPPORTS_I2C + bool + +config _SUPPORTS_EMERG_MEM_DUMP + bool + +config _ENABLE_I2C_SUPPORT + bool "Enable I2C driver support" + depends on _SUPPORTS_I2C + default n + +config _ENABLE_EMERG_MEM_DUMP + bool "Enable emergency memory dump support" + depends on _SUPPORTS_EMERG_MEM_DUMP + default n + +config _ENABLE_JTAG + bool "Enable JTAG function" + default y if _INTERNAL + default n + +# Makefile options +config I2C_SUPPORT + int + default 1 + depends on _ENABLE_I2C_SUPPORT + +config EMERG_MEM_DUMP + int + default 1 + depends on _ENABLE_EMERG_MEM_DUMP + +config ENABLE_JTAG + int + default 1 + depends on _ENABLE_JTAG + +source "plat/mediatek/mt7988/Config.in" + +endmenu # Platform configurations + +################################################################################ + +osource "plat/mediatek/apsoc_common/Config-fpga.in" + +################################################################################ + +config _REQUIRE_MBEDTLS + bool + +config _BUILD_FIP + bool "Build FIP" + default y + +# Makefile options +config BL33 + string "BL33 payload path" + depends on _BUILD_FIP + default "u-boot.bin" + +config BL32 + string "BL32 payload path" + depends on _BUILD_FIP && _ENABLE_BL32 + default "tee.bin" + +config MBEDTLS_DIR + string "mbedTLS source path" + depends on _REQUIRE_MBEDTLS + +menu "Advanced build configurations" + +config _ENABLE_BL2_COMPRESS + bool "Compress BL2" + default n + +config _ENABLE_FIP_COMPRESS + bool "Compress FIP" + depends on _BUILD_FIP + default n + +config _USE_MKIMAGE + bool "Use mkimage to generate BL2 image" + default n + +# Makefile options +config BL2_COMPRESS + int + default 1 + depends on _ENABLE_BL2_COMPRESS + +config FIP_COMPRESS + int + default 1 + depends on _ENABLE_FIP_COMPRESS + +config MKIMAGE + string "mkimage program path" + default "mkimage" + depends on _USE_MKIMAGE + +config USE_MKIMAGE + int + default 1 + depends on _USE_MKIMAGE + +endmenu # Advanced build configurations + +################################################################################ + +config _SUPPORTS_AR_V1 + bool + +config _SUPPORTS_AR_V2 + bool + +config _SUPPORTS_FSEK + bool + +menuconfig _ENABLE_SBC + bool "Enable Secure Boot framework" + select _REQUIRE_MBEDTLS + select _BUILD_FIP + default n + +if _ENABLE_SBC + +config _ENABLE_AR + bool "Enable Anti-rollback" + default n + +config _ENABLE_BL32 + bool "Enable OP-TEE" + default n + +config _ENABLE_NO_ROT_KEY + bool "ROT_KEY (private) not present" + default n + +config _ENABLE_FSEK + bool "Enable FSEK" + depends on _SUPPORTS_FSEK + default n + +config _ENABLE_ENC_ROEK + bool "Encrypted ROEK" + depends on _ENABLE_FSEK + default n + +# Makefile options +config ROT_KEY + string "ROT_KEY (private) path" + default "fip_private_key.pem" + depends on !_ENABLE_NO_ROT_KEY + +config ROT_PUB_KEY + string "ROT_KEY (public) path" + default "fip_public_key.pem" + depends on _ENABLE_NO_ROT_KEY + +config BROM_SIGN_KEY + string "BootROM signing key path" + default "bl2_private_key.pem" + +config AR_TABLE_XML + string "Anti-rollback table path" + default "ar_table.xml" + depends on _ENABLE_AR && _SUPPORTS_AR_V1 + +config ANTI_ROLLBACK_TABLE + string "Anti-rollback table path" + default "bl_ar_table.xml" + depends on _ENABLE_AR && _SUPPORTS_AR_V2 + +config SPD + string "Secure Payload (BL32) Dispatcher" + depends on _ENABLE_BL32 + default "opteed" + +config TRUSTED_BOARD_BOOT + int + default 1 + +config GENERATE_COT + int + default 1 + +config ANTI_ROLLBACK + int + default 1 + depends on _ENABLE_AR + +config FSEK + int + default 1 + depends on _ENABLE_FSEK + +config ENC_ROEK + int + default 1 + depends on _ENABLE_ENC_ROEK + +endif # _ENABLE_SBC + +################################################################################ + +CC64_1 := /mtkoss/aarch64/7.5.0/x86_64/bin/aarch64-linux-gnu- +TEST64_1 := $(shell, test -e $(CC64_1)gcc && echo "1" || echo "0") +CC64_2 := /usr/bin/aarch64-linux-gnu- +TEST64_2 := $(shell, test -e $(CC64_2)gcc && echo "1" || echo "0") + +CC32_1 := /mtkoss/buildroot/buildroot-gcc740_arm_musl/usr/bin/arm-linux- +TEST32_1 := $(shell, test -e $(CC32_1)gcc && echo "1" || echo "0") +CC32_2 := /usr/bin/arm-linux-gnueabi- +TEST32_2 := $(shell, test -e $(CC32_2)gcc && echo "1" || echo "0") + +config CROSS_COMPILE + string "Cross compiler prefix" + default "$(CC64_1)" if $(TEST64_1)="1" && !_AARCH32 + default "$(CC64_2)" if $(TEST64_2)="1" && !_AARCH32 + default "$(CC32_1)" if $(TEST32_1)="1" && _AARCH32 + default "$(CC32_2)" if $(TEST32_2)="1" && _AARCH32 + +################################################################################ + +choice + prompt "Log level" + default _LOG_LEVEL_WARNING + + config _LOG_LEVEL_NONE + bool "None" + + config _LOG_LEVEL_ERROR + bool "Error" + + config _LOG_LEVEL_NOTICE + bool "Notice" + + config _LOG_LEVEL_WARNING + bool "Warning" + + config _LOG_LEVEL_INFO + bool "Info" + + config _LOG_LEVEL_VERBOSE + bool "Verbose" +endchoice + +# Makefile option +config LOG_LEVEL + int + default 0 if _LOG_LEVEL_NONE + default 10 if _LOG_LEVEL_ERROR + default 20 if _LOG_LEVEL_NOTICE + default 30 if _LOG_LEVEL_WARNING + default 40 if _LOG_LEVEL_INFO + default 50 if _LOG_LEVEL_VERBOSE + +################################################################################ + +osource "plat/mediatek/apsoc_common/Config-internal.in" diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/Config-uart_dl.in b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/Config-uart_dl.in new file mode 100644 index 000000000..e37c07844 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/Config-uart_dl.in @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# UART DL internal configurations +# + +config _RAM_BOOT_RAM_BOOT_UART_DL + bool "Enable RAM boot UART download support" + depends on _BOOT_DEVICE_RAM + depends on !_RAM_BOOT_DEBUGGER_HOOK + # depends on _INTERNAL + default n + +# Makefile options +config RAM_BOOT_UART_DL + int + default 1 + depends on _RAM_BOOT_RAM_BOOT_UART_DL diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/ar.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/ar.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/ar.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/ar.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/ar_post.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/ar_post.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/ar_post.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/ar_post.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_mmc.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_mmc.c similarity index 59% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_mmc.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_mmc.c index cb8a20a2d..d56c4bee4 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_mmc.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_mmc.c @@ -9,10 +9,10 @@ #include #include #include +#include #include #include #include -#include #include "bl2_plat_setup.h" static io_block_dev_spec_t mmc_dev_spec = { @@ -28,20 +28,27 @@ static io_block_dev_spec_t mmc_dev_spec = { .block_size = MMC_BLOCK_SIZE, }; -static io_block_spec_t mmc_dev_gpt_spec = { +static const io_block_spec_t mmc_dev_gpt_spec = { .offset = 0 * MMC_BLOCK_SIZE, .length = 34 * MMC_BLOCK_SIZE, }; +static io_block_spec_t mmc_dev_bkup_gpt_spec = { + .offset = 0 * MMC_BLOCK_SIZE, + .length = 0, /* To be refilled by partition.c */ +}; + static io_block_spec_t mmc_dev_fip_spec; static uintptr_t mmc_dev_handle; +static uint32_t num_sectors; -int mtk_mmc_gpt_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec) +int mtk_mmc_gpt_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec, + uintptr_t *bkup_image_spec) { const io_dev_connector_t *dev_con; int ret; - ret = mtk_plat_mmc_setup(); + ret = mtk_plat_mmc_setup(&num_sectors); if (ret) return ret; @@ -55,6 +62,7 @@ int mtk_mmc_gpt_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec) *dev_handle = mmc_dev_handle; *image_spec = (uintptr_t)&mmc_dev_gpt_spec; + *bkup_image_spec = (uintptr_t)&mmc_dev_bkup_gpt_spec; return 0; } @@ -62,24 +70,18 @@ int mtk_mmc_gpt_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec) int mtk_fip_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec) { const partition_entry_t *entry; - uint64_t uda_size; + int ret; - partition_init(GPT_IMAGE_ID); + ret = gpt_partition_init(); + if (ret != 0) { + ERROR("Failed to initialize GPT partitions\n"); + return -ENOENT; + } entry = get_partition_entry("fip"); if (!entry) { - INFO("Partition 'fip' not found in parimary GPT\n"); - - uda_size = mtk_mmc_device_size(); - mmc_dev_gpt_spec.offset = uda_size - 33 * MMC_BLOCK_SIZE; - mmc_dev_gpt_spec.length = 33 * MMC_BLOCK_SIZE; - - partition_init_secondary_gpt(GPT_IMAGE_ID); - entry = get_partition_entry("fip"); - if (!entry) { - ERROR("Partition 'fip' not found in secondary GPT\n"); - return -ENOENT; - } + ERROR("Partition 'fip' not found\n"); + return -ENOENT; } INFO("Located partition 'fip' at 0x%" PRIx64 ", size 0x%" PRIx64 "\n", @@ -93,3 +95,22 @@ int mtk_fip_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec) return 0; } + +void plat_patch_mbr_header(void *mbr) +{ + mbr_entry_t *mbr_entry; + uint32_t num; + + /* mbr may not be 4-bytes aligned, so use a 4-bytes aligned address + * to access its member + */ + mbr_entry = (mbr_entry_t *)(mbr + MBR_PRIMARY_ENTRY_OFFSET); + memcpy(&num, &mbr_entry->sector_nums, sizeof(uint32_t)); + if (num != num_sectors) { + INFO("Patching MBR num of sectors: 0x%x -> 0x%x\n", + num, num_sectors - 1); + + num = num_sectors -1; + memcpy(&mbr_entry->sector_nums, &num, sizeof(uint32_t)); + } +} diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nand.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nand.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nand.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_nmbm.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_nmbm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_nmbm.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_nmbm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_ubi.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_ubi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_ubi.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nand_ubi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nor.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nor.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nor.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nor_mmap.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nor_mmap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_nor_mmap.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_nor_mmap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_ram.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_ram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_boot_ram.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_boot_ram.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c index 301d8c249..9346dce57 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c @@ -29,8 +29,10 @@ static int snfi_mtd_read_page(struct nand_device *nand, unsigned int page, int ret; ret = mtk_snand_read_page(snf, addr, (void *)buffer, NULL, false); - if (ret == -EBADMSG) + if (ret > 0) { + NOTICE("corrected %d bitflips while reading page %u\n", ret, page); ret = 0; + } return ret; } diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nand_init.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nand_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nand_init.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nand_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nor_init.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nor_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nor_init.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_dev_spi_nor_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_image.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_image.mk similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_image.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_image.mk index 5bee31cdc..f8d227476 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_image.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_image.mk @@ -26,9 +26,11 @@ BROM_HEADER_TYPE := nor ifeq ($(RAM_BOOT_DEBUGGER_HOOK), 1) BL2_CPPFLAGS += -DRAM_BOOT_DEBUGGER_HOOK endif +ifeq ($(RAM_BOOT_UART_DL), 1) ENABLE_CONSOLE_GETC := 1 BL2_SOURCES += $(APSOC_COMMON)/bl2/uart_dl.c BL2_CPPFLAGS += -DRAM_BOOT_UART_DL +endif endef # End of BL2_BOOT_RAM define BL2_BOOT_NOR_MMAP diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_image_post.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_image_post.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_image_post.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_image_post.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_memmap.txt b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_memmap.txt similarity index 82% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_memmap.txt rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_memmap.txt index 8b2b33a09..eb03dfecd 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_memmap.txt +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_memmap.txt @@ -1,5 +1,7 @@ BL2 memory map: +00100200 - 00100203 (000004) : Flag of debugger hook for RAM boot + 40100000 - 401fffff (100000) : Scratch buffer for mtk-qspi/mtk-snand driver 40400000 - 407fffff (400000) : Scratch buffer for UBI/NMBM/RAM-load 40800000 - 40bfffff (400000) : FIP XZ decompression buffer diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.c index 424d30933..35a3c7473 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.c @@ -24,6 +24,7 @@ struct plat_io_policy { int (*check)(const uintptr_t spec); }; +static size_t dram_size; static const io_dev_connector_t *fip_dev_con; static uintptr_t fip_dev_handle; static uintptr_t boot_dev_handle; @@ -194,6 +195,11 @@ static struct plat_io_policy policies[] = { (uintptr_t)NULL, check_gpt_dev }, + [BKUP_GPT_IMAGE_ID] = { + &gpt_dev_handle, + (uintptr_t)NULL, + check_gpt_dev + }, #endif #if TRUSTED_BOARD_BOOT [TRUSTED_KEY_CERT_ID] = { @@ -313,7 +319,12 @@ struct bl_load_info *plat_get_bl_image_load_info(void) struct bl_params *plat_get_next_bl_params(void) { - return get_next_bl_params_from_mem_params_desc(); + struct bl_params *params = get_next_bl_params_from_mem_params_desc(); + + if (params) + params->head->ep_info->args.arg1 = dram_size; + + return params; } void plat_flush_next_bl_params(void) @@ -350,7 +361,8 @@ static int bl2_fip_boot_setup(void) #ifdef MTK_MMC_BOOT ret = mtk_mmc_gpt_image_setup(&gpt_dev_handle, - &policies[GPT_IMAGE_ID].image_spec); + &policies[GPT_IMAGE_ID].image_spec, + &policies[BKUP_GPT_IMAGE_ID].image_spec); if (ret) return ret; #endif @@ -387,3 +399,8 @@ void bl2_platform_setup(void) panic(); } } + +void mtk_bl2_set_dram_size(size_t size) +{ + dram_size = size; +} diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.h similarity index 86% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.h index a65cdf503..2fb6b3fcb 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.h +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/bl2_plat_setup.h @@ -35,14 +35,16 @@ extern const struct initcall bl2_initcalls[]; #define IO_BLOCK_BUF_OFFSET 0x41000000 #define IO_BLOCK_BUF_SIZE 0xe00000 -int mtk_mmc_gpt_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec); +int mtk_mmc_gpt_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec, + uintptr_t *bkup_image_spec); int mtk_fip_image_setup(uintptr_t *dev_handle, uintptr_t *image_spec); void mtk_fip_location(size_t *fip_off, size_t *fip_size); +void mtk_bl2_set_dram_size(size_t size); -/* The following function prototypes are provided by platfrom's boot device */ +/* The following function prototypes are provided by platform's boot device */ int mtk_plat_nor_setup(void); int mtk_plat_nand_setup(size_t *page_size, size_t *block_size, uint64_t *size); -int mtk_plat_mmc_setup(void); +int mtk_plat_mmc_setup(uint32_t *num_sectors); void mtk_plat_fip_location(size_t *fip_off, size_t *fip_size); diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/mtk_rotpk.S b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/mtk_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/mtk_rotpk.S rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/mtk_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/mtk_tbbr.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/mtk_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/mtk_tbbr.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/mtk_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/tbbr.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/tbbr.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/tbbr.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/tbbr.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/tbbr_post.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/tbbr_post.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/tbbr_post.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/tbbr_post.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/uart_dl.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/uart_dl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/uart_dl.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/uart_dl.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/uart_dl.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/uart_dl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2/uart_dl.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2/uart_dl.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2pl/udelay.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2pl/udelay.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl2pl/udelay.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl2pl/udelay.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.c similarity index 92% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.c index e4104ea29..a3e5f594c 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.c @@ -14,6 +14,7 @@ #ifdef MTK_FSEK #include #endif +#include "memdump.h" #if MTK_SIP_KERNEL_BOOT_ENABLE static uintptr_t apsoc_sip_boot_to_kernel(uint32_t smc_fid, u_register_t x1, @@ -38,12 +39,13 @@ static uintptr_t apsoc_sip_efuse_get_len(uint32_t smc_fid, u_register_t x1, SMC_RET4(handle, ret, efuse_len, 0x0, 0x0); } +static uint32_t efuse_buffer[MTK_EFUSE_PUBK_HASH_INDEX_MAX]; + static uintptr_t apsoc_sip_efuse_send_data(uint32_t smc_fid, u_register_t x1, u_register_t x2, u_register_t x3, u_register_t x4, void *cookie, void *handle, u_register_t flags) { - static uint32_t efuse_buffer[MTK_EFUSE_PUBK_HASH_INDEX_MAX]; uint32_t efuse_data[2] = { (uint32_t)x3, (uint32_t)x4 }; uintptr_t ret; @@ -59,7 +61,6 @@ static uintptr_t apsoc_sip_efuse_get_data(uint32_t smc_fid, u_register_t x1, u_register_t x4, void *cookie, void *handle, u_register_t flags) { - static uint32_t efuse_buffer[MTK_EFUSE_PUBK_HASH_INDEX_MAX]; uint32_t efuse_data[2] = { (uint32_t)x3, (uint32_t)x4 }; uintptr_t ret; @@ -75,7 +76,6 @@ static uintptr_t apsoc_sip_efuse_read(uint32_t smc_fid, u_register_t x1, u_register_t x4, void *cookie, void *handle, u_register_t flags) { - static uint32_t efuse_buffer[MTK_EFUSE_PUBK_HASH_INDEX_MAX]; uintptr_t ret; ret = mtk_efuse_read((uint32_t)x1, @@ -89,7 +89,6 @@ static uintptr_t apsoc_sip_efuse_write(uint32_t smc_fid, u_register_t x1, u_register_t x4, void *cookie, void *handle, u_register_t flags) { - static uint32_t efuse_buffer[MTK_EFUSE_PUBK_HASH_INDEX_MAX]; uintptr_t ret; ret = mtk_efuse_write((uint32_t)x1, @@ -180,6 +179,17 @@ static uintptr_t apsoc_sip_fsek_encrypt_roek(uint32_t smc_fid, } #endif /* MTK_FSEK */ +#ifdef EMERG_MEM_DUMP +static uintptr_t apsoc_sip_emerg_mem_dump(uint32_t smc_fid, u_register_t x1, + u_register_t x2, u_register_t x3, + u_register_t x4, void *cookie, + void *handle, u_register_t flags) +{ + do_mem_dump((int)x1, handle); + SMC_RET0(handle); +} +#endif + struct mtk_sip_call_record apsoc_common_sip_calls[] = { #ifdef MTK_SIP_KERNEL_BOOT_ENABLE MTK_SIP_CALL_RECORD(MTK_SIP_KERNEL_BOOT_AARCH32, apsoc_sip_boot_to_kernel), @@ -196,6 +206,9 @@ struct mtk_sip_call_record apsoc_common_sip_calls[] = { MTK_SIP_CALL_RECORD(MTK_SIP_FSEK_GET_KEY, apsoc_sip_fsek_get_key), MTK_SIP_CALL_RECORD(MTK_SIP_FSEK_ENCRYPT_ROEK, apsoc_sip_fsek_encrypt_roek), #endif /* MTK_FSEK */ +#ifdef EMERG_MEM_DUMP + MTK_SIP_CALL_RECORD(MTK_SIP_EMERG_MEM_DUMP, apsoc_sip_emerg_mem_dump), +#endif }; const uint32_t apsoc_common_sip_call_num = ARRAY_SIZE(apsoc_common_sip_calls); diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.h similarity index 93% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.h index a76cdacb5..9db18f361 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.h +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/apsoc_sip_svc_common.h @@ -152,6 +152,16 @@ struct mtk_sip_call_record; */ #define MTK_SIP_FSEK_ENCRYPT_ROEK 0xC2000530 +/* + * MTK_SIP_EMERG_MEM_DUMP - Do emergency memory dump thru. ethernet + * + * parameters + * @x1: reboot after memory dump + * + * no return + */ +#define MTK_SIP_EMERG_MEM_DUMP 0xC2000540 + /* ApSoC common SiP function call records */ extern struct mtk_sip_call_record apsoc_common_sip_calls[]; extern const uint32_t apsoc_common_sip_call_num; diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/bl31_common_setup.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/bl31_common_setup.c similarity index 90% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/bl31_common_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/bl31_common_setup.c index 51d40f1aa..72ff634d7 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/bl31_common_setup.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/bl31_common_setup.c @@ -8,6 +8,13 @@ #include #include +static size_t dram_size; + +size_t mtk_bl31_get_dram_size(void) +{ + return dram_size; +} + /******************************************************************************* * Perform any BL3-1 early platform setup. Here is an opportunity to copy * parameters passed by the calling EL (S-EL1 in BL2 & EL3 in BL1) before they @@ -21,6 +28,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, { static console_t console; + dram_size = arg1; + console_hsuart_register(UART_BASE, UART_CLOCK, UART_BAUDRATE, true, &console); } diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/bl31_common_setup.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/bl31_common_setup.h similarity index 76% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/bl31_common_setup.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/bl31_common_setup.h index 7fb89f806..56558853f 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/bl31_common_setup.h +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/bl31_common_setup.h @@ -7,4 +7,8 @@ #ifndef BL31_PLAT_SETUP_H #define BL31_PLAT_SETUP_H +#include + +size_t mtk_bl31_get_dram_size(void); + #endif /* BL31_PLAT_SETUP_H */ diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.c new file mode 100644 index 000000000..880e79fad --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.c @@ -0,0 +1,834 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "bl31_common_setup.h" +#include "memdump.h" + +#define PAYLOAD_OFFSET (ETHER_HDR_SIZE + IP_HDR_SIZE + UDP_HDR_SIZE) +#define PAYLOAD_MAX_LEN (ETHER_MTU - PAYLOAD_OFFSET) + +static uint8_t macaddr[6] = { 0x00, 0x0c, 0x43, 0x00, 0x00, 0x01 }; +static uint8_t dstaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +static struct in_addr sipaddr = { .s_un.s_un_b = { 192, 168, 1, 1 } }; +static struct in_addr dipaddr = { .s_un.s_un_b = { 255, 255, 255, 255 } }; +static uint8_t packet[ETHER_MTU], payload[PAYLOAD_MAX_LEN]; + +static uint32_t assoc_id; + +/* Private exported functions from psci_system_off.c */ +void __dead2 psci_system_reset(void); + +static void net_send_packet(uint32_t len) +{ + int ret; + + net_set_ether(packet, dstaddr, macaddr, PROT_IP); + + memcpy(packet + PAYLOAD_OFFSET, payload, len); + + net_set_udp_header(packet + ETHER_HDR_SIZE, dipaddr, sipaddr, + MDUMP_DST_PORT, MDUMP_SRC_PORT, len); + + do { + ret = mtk_eth_send(packet, PAYLOAD_OFFSET + len); + } while (ret == -EPERM); +} + +static void arp_receive(void *pkt, uint32_t len) +{ + struct arp_hdr *arp = pkt; + struct arp_req_ip *arpreq = (void *)arp->data, *arpresp; + int ret; + + if (len < ARP_HDR_SIZE + ARP_REQ_IP_HDR_SIZE) + return; + + if (__ntohs(arp->hw_type) != ARP_ETHER) + return; + + if (__ntohs(arp->prot) != PROT_IP) + return; + + if (arp->hw_len != HWADDR_LEN) + return; + + if (arp->prot_len != ARP_PLEN_IP) + return; + + if (__ntohs(arp->op) != ARP_OP_REQUEST) + return; + + if (memcmp(arpreq->tpa, &sipaddr, ARP_PLEN_IP)) + return; + + net_set_ether(packet, dstaddr, macaddr, PROT_ARP); + + memcpy(packet + ETHER_HDR_SIZE, arp, ARP_HDR_SIZE + ARP_REQ_IP_HDR_SIZE); + + arp = (void *)packet + ETHER_HDR_SIZE; + arpresp = (void *)arp->data; + + arp->op = __htons(ARP_OP_REPLY); + memcpy(arpresp->tha, arpreq->sha, HWADDR_LEN); + memcpy(arpresp->tpa, arpreq->spa, ARP_PLEN_IP); + memcpy(arpresp->sha, macaddr, HWADDR_LEN); + memcpy(arpresp->spa, &sipaddr, ARP_PLEN_IP); + + do { + ret = mtk_eth_send(packet, ETHER_HDR_SIZE + ARP_HDR_SIZE + ARP_REQ_IP_HDR_SIZE); + } while (ret == -EPERM); +} + +static void process_other_packets(void) +{ + uint32_t cnt = 32; + void *rcvdpkt; + int len; + + while (cnt) { + len = mtk_eth_recv(&rcvdpkt); + if (len == -EAGAIN) + return; + + if (net_is_ether(rcvdpkt, len, PROT_ARP)) { + arp_receive(rcvdpkt + ETHER_HDR_SIZE, + len - ETHER_HDR_SIZE); + } + + mtk_eth_free_pkt(rcvdpkt); + + cnt--; + } +} + +static bool check_mdump_response_header(struct mdump_response_header *resp) +{ + uint32_t old_crc = le32toh(resp->bh.checksum); + + if (le32toh(resp->bh.version) != MDUMP_PACKET_VERSION) + return false; + + if (le32toh(resp->bh.assoc_id) != assoc_id) + return false; + + if (le32toh(resp->type) >= __MDUMP_RESP_MAX) + return false; + + resp->bh.checksum = 0; + resp->bh.checksum = tf_crc32(0, (uint8_t *)resp, sizeof(*resp)); + + return old_crc == resp->bh.checksum; +} + +static bool __receive_mdump_response_header(struct mdump_response_header *rh, + uint32_t timeout_ms, uint8_t *mac, + struct in_addr *ip) +{ + uint64_t tmo = timeout_init_us(timeout_ms * 1000); + struct in_addr addr; + bool again = true; + void *rcvdpkt; + int len; + +do_receive: + do { + len = mtk_eth_recv(&rcvdpkt); + + if (timeout_elapsed(tmo)) + return false; + } while (len == -EAGAIN); + + if (net_is_ether(rcvdpkt, len, PROT_IP)) { + if (!net_is_ip_packet(rcvdpkt + ETHER_HDR_SIZE, + len - ETHER_HDR_SIZE, IPPROTO_UDP)) + goto cleanup; + + if (!net_is_udp_packet(rcvdpkt + ETHER_HDR_SIZE + IP_HDR_SIZE, + sizeof(*rh), MDUMP_SRC_PORT)) + goto cleanup; + + memcpy(rh, rcvdpkt + PAYLOAD_OFFSET, sizeof(*rh)); + + if (check_mdump_response_header(rh)) + again = false; + } else if (net_is_ether(rcvdpkt, len, PROT_ARP)) { + arp_receive(rcvdpkt + ETHER_HDR_SIZE, len - ETHER_HDR_SIZE); + } + +cleanup: + memcpy(&addr, &((struct ip_hdr *)(rcvdpkt + ETHER_HDR_SIZE))->src, + ARP_PLEN_IP); + + if (mac || ip) { + if (mac) { + memcpy(mac, ((struct ethernet_hdr *)rcvdpkt)->src, + HWADDR_LEN); + } + + if (ip) { + memcpy(ip, &addr, ARP_PLEN_IP); + } + } + + mtk_eth_free_pkt(rcvdpkt); + + if (again) { + if (timeout_elapsed(tmo)) + return false; + + goto do_receive; + } + + if (dipaddr.s_un.s_addr != 0xffffffff) { + if (addr.s_un.s_addr != dipaddr.s_un.s_addr) + return false; + } + + return true; +} + +static bool receive_mdump_response_header(struct mdump_response_header *rh, + uint32_t timeout_ms) +{ + return __receive_mdump_response_header(rh, timeout_ms, NULL, NULL); +} + +static void send_mdump_control_header(void) +{ + uint32_t i, len, nranges = ARRAY_SIZE(mdump_ranges); + struct mdump_control_header *ch = (void *)payload; + + len = sizeof(struct mdump_control_header) + + nranges * sizeof(struct mdump_control_range); + + ch->bh.magic = htole32(MDUMP_MAGIC_CONTROL); + ch->bh.checksum = 0; + ch->bh.version = htole32(MDUMP_PACKET_VERSION); + ch->bh.assoc_id = htole32(assoc_id); + ch->platform = htole32(SOC_CHIP_ID); + ch->num_ranges = htole32(nranges); + + for (i = 0; i < nranges; i++) { + ch->ranges[i].addr = mdump_ranges[i].r.addr; + ch->ranges[i].end = mdump_ranges[i].r.end; + + if (ch->ranges[i].end == DRAM_END) + ch->ranges[i].end = DRAM_START + mtk_bl31_get_dram_size(); + + ch->ranges[i].addr = htole32(ch->ranges[i].addr); + ch->ranges[i].end = htole32(ch->ranges[i].end); + } + + ch->bh.checksum = tf_crc32(0, payload, len); + ch->bh.checksum = htole32(ch->bh.checksum); + + net_send_packet(len); +} + +static void send_mdump_mem_packet(uint32_t index, uintptr_t paddr, + const void *ptr, size_t len) +{ + struct mdump_range_header *rh = (void *)payload; + size_t pktlen; + + pktlen = sizeof(struct mdump_range_header) + len; + + rh->bh.magic = htole32(MDUMP_MAGIC_RANGE); + rh->bh.checksum = 0; + rh->bh.version = htole32(MDUMP_PACKET_VERSION); + rh->bh.assoc_id = htole32(assoc_id); + rh->index = htole32(index); + rh->size = htole32(len); + rh->offset = htole64(paddr); + + memcpy(rh->data, ptr, len); + + rh->bh.checksum = tf_crc32(0, payload, pktlen); + rh->bh.checksum = htole32(rh->bh.checksum); + + net_send_packet(pktlen); +} + +static void send_mdump_mem_range(uint32_t index, uintptr_t paddr, + uintptr_t vaddr, size_t len, + bool show_progress) +{ + uint32_t chksz, percentage = 0, last_percentage = 0; + const void *ptr = (const void *)vaddr; + size_t len_sent = 0; + + while (len_sent < len) { + chksz = sizeof(payload) - sizeof(struct mdump_range_header); + chksz &= ~(sizeof(uint32_t) - 1); + + if (chksz > len - len_sent) + chksz = len - len_sent; + + send_mdump_mem_packet(index, paddr + len_sent, ptr, chksz); + + len_sent += chksz; + ptr += chksz; + + percentage = (uint64_t)len_sent * 100ULL / len; + if (show_progress && percentage > last_percentage) { + last_percentage = percentage; +#if LOG_LEVEL >= LOG_LEVEL_NOTICE + printf("\r"); +#endif + NOTICE("MDUMP: %u%% completed.", percentage); + } + + process_other_packets(); + } + +#if LOG_LEVEL >= LOG_LEVEL_NOTICE + if (show_progress) + printf("\n"); +#endif +} + +static bool is_excluded_device_addr(const struct mdump_range_exclude *excludes, + uintptr_t addr, uint32_t len) +{ + uint32_t i; + + if (!excludes) + return false; + + for (i = 0; i < excludes->count; i++) { + if (addr >= excludes->r[i].addr && addr + len <= excludes->r[i].end) + return true; + } + + return false; +} + +static void send_mdump_device_packet(uint32_t index, uintptr_t paddr, + uintptr_t base, size_t len, + const struct mdump_range_exclude *excludes) +{ + struct mdump_range_header *rh = (void *)payload; + uint8_t *data = rh->data; + size_t pktlen; + uint32_t val; + + pktlen = sizeof(struct mdump_range_header) + len; + + rh->bh.magic = htole32(MDUMP_MAGIC_RANGE); + rh->bh.checksum = 0; + rh->bh.version = htole32(MDUMP_PACKET_VERSION); + rh->bh.assoc_id = htole32(assoc_id); + rh->index = htole32(index); + rh->size = htole32(len); + rh->offset = htole64(paddr); + + while (len) { + val = 0; + + if (!is_excluded_device_addr(excludes, base, sizeof(uint32_t))) + val = mmio_read_32(base); + + memcpy(data, &val, sizeof(uint32_t)); + + data += sizeof(uint32_t); + base += sizeof(uint32_t); + len -= sizeof(uint32_t); + } + + rh->bh.checksum = tf_crc32(0, payload, pktlen); + rh->bh.checksum = htole32(rh->bh.checksum); + + net_send_packet(pktlen); +} + +static void send_mdump_device_range(uint32_t index, uintptr_t paddr, + uintptr_t vaddr, size_t len, + const struct mdump_range_exclude *excludes, + bool show_progress) +{ + uint32_t chksz, percentage = 0, last_percentage = 0; + size_t len_sent = 0; + + while (len_sent < len) { + chksz = sizeof(payload) - sizeof(struct mdump_range_header); + if (chksz > len - len_sent) + chksz = len - len_sent; + + chksz &= ~(sizeof(uint32_t) - 1); + + send_mdump_device_packet(index, paddr, vaddr, chksz, excludes); + + len_sent += chksz; + vaddr += chksz; + paddr += chksz; + + percentage = (uint64_t)len_sent * 100ULL / len; + if (show_progress && percentage > last_percentage) { + last_percentage = percentage; +#if LOG_LEVEL >= LOG_LEVEL_NOTICE + printf("\r"); +#endif + NOTICE("MDUMP: %u%% completed.", percentage); + } + + process_other_packets(); + } + +#if LOG_LEVEL >= LOG_LEVEL_NOTICE + if (show_progress) + printf("\n"); +#endif +} + +static void send_mdump_range_end(uint32_t index) +{ + struct mdump_range_end_header *reh = (void *)payload; + + reh->bh.magic = htole32(MDUMP_MAGIC_RANGE_END); + reh->bh.checksum = 0; + reh->bh.version = htole32(MDUMP_PACKET_VERSION); + reh->bh.assoc_id = htole32(assoc_id); + reh->index = htole32(index); + + reh->bh.checksum = tf_crc32(0, payload, sizeof(struct mdump_range_end_header)); + reh->bh.checksum = htole32(reh->bh.checksum); + + net_send_packet(sizeof(struct mdump_range_end_header)); +} + +static void send_mdump_ranges(void) +{ + uint32_t i, nranges = ARRAY_SIZE(mdump_ranges), type; + uintptr_t mapped_addr, paddr, end, r_addr, r_end; + struct mdump_response_header resp; + size_t len; + bool rcvd; + int ret; + + for (i = 0; i < nranges; i++) { + paddr = mdump_ranges[i].r.addr; + end = mdump_ranges[i].r.end; + if (end == DRAM_END) + end = DRAM_START + mtk_bl31_get_dram_size(); + + if (mdump_ranges[i].is_device) { + paddr &= ~(sizeof(uint32_t) - 1); + end = (end + sizeof(uint32_t) - 1) & ~(sizeof(uint32_t) - 1); + } + + mapped_addr = paddr; + len = end - paddr; + + if (mdump_ranges[i].need_map) { + ret = mmap_add_dynamic_region(paddr, paddr, len, + MT_MEMORY | MT_RO); + if (ret) { + ERROR("MDUMP: Failed to map range 0x%zx - 0x%zx, error %d\n", + paddr, end, ret); + continue; + } + } + + NOTICE("MDUMP: Sending %s range %u: 0x%zx - 0x%zx\n", + mdump_ranges[i].is_device ? "device" : "memory", + i, paddr, end); + + if (!mdump_ranges[i].is_device) + send_mdump_mem_range(i, paddr, mapped_addr, len, true); + else + send_mdump_device_range(i, paddr, mapped_addr, len, + mdump_ranges[i].excludes, true); + + /* Check response for missing packets */ + while (true) { + send_mdump_range_end(i); + + rcvd = receive_mdump_response_header(&resp, 500); + if (!rcvd) + continue; + + type = le32toh(resp.type); + + if (type == MDUMP_RESP_RANGE_ACK) + break; + + if (type == MDUMP_RESP_RANGE_REXMIT && le32toh(resp.range.index) == i) { + r_addr = (uintptr_t)le64toh(resp.range.r.addr); + r_end = (uintptr_t)le64toh(resp.range.r.end); + + if (r_addr < paddr || r_end > end || r_addr > r_end) + continue; + + VERBOSE("MDUMP: Re-sending %s range %u: 0x%zx - 0x%zx\n", + mdump_ranges[i].is_device ? "device" : "memory", i, r_addr, r_end); + + if (!mdump_ranges[i].is_device) { + send_mdump_mem_range(i, r_addr, mapped_addr + r_addr - paddr, r_end - r_addr, + false); + } else { + send_mdump_device_range(i, r_addr, mapped_addr + r_addr - paddr, r_end - r_addr, + mdump_ranges[i].excludes, false); + } + } + } + + NOTICE("MDUMP: %s range %u sent\n", + mdump_ranges[i].is_device ? "Device" : "Memory", + i); + + if (mdump_ranges[i].need_map) { + ret = mmap_remove_dynamic_region(mapped_addr, len); + if (ret) { + ERROR("MDUMP: Failed to unmap range 0x%zx - 0x%zx, error %d\n", + paddr, end, ret); + return; + } + } + } +} + +DEFINE_SYSREG_RW_FUNCS(tpidr_el1) +DEFINE_SYSREG_RW_FUNCS(contextidr_el1) +DEFINE_SYSREG_RW_FUNCS(tpidr_el0) +DEFINE_SYSREG_RW_FUNCS(tpidrro_el0) + +static void send_mdump_context_real(cpu_context_t *ctx) +{ + struct mdump_context_header *ch = (void *)payload; + uint32_t i; + + ch->bh.magic = htole32(MDUMP_MAGIC_CONTEXT); + ch->bh.checksum = 0; + ch->bh.version = htole32(MDUMP_PACKET_VERSION); + ch->bh.assoc_id = htole32(assoc_id); + + for (i = 0; i <= 30; i++) + ch->gpr[i] = htole64(ctx->gpregs_ctx.ctx_regs[i]); + + ch->pstate.sp_el0 = htole64(read_ctx_reg(&ctx->gpregs_ctx, CTX_GPREG_SP_EL0)); + ch->pstate.pc = htole64(read_ctx_reg(&ctx->el3state_ctx, CTX_ELR_EL3)); + ch->pstate.cpsr = htole64(read_ctx_reg(&ctx->el3state_ctx, CTX_SPSR_EL3)); + + ch->pstate.elr_el1 = htole64(read_elr_el1()); + ch->pstate.elr_el2 = htole64(read_elr_el2()); + ch->pstate.spsr_el1 = htole64(read_spsr_el1()); + ch->pstate.spsr_el2 = htole64(read_spsr_el2()); + ch->pstate.sp_el1 = htole64(read_sp_el1()); + ch->pstate.sp_el2 = htole64(read_sp_el2()); + + ch->sysreg.sctlr_el3 = htole64(read_sctlr_el3()); + ch->sysreg.tcr_el3 = htole64(read_tcr_el3()); + ch->sysreg.ttbr0_el3 = htole64(read_ttbr0_el3()); + ch->sysreg.mair_el3 = htole64(read_mair_el3()); + ch->sysreg.scr_el3 = htole64(read_scr_el3()); + ch->sysreg.esr_el3 = htole64(read_esr_el3()); + ch->sysreg.far_el3 = htole64(read_far_el3()); + ch->sysreg.vbar_el3 = htole64(read_vbar_el3()); + + ch->sysreg.sctlr_el2 = htole64(read_sctlr_el2()); + ch->sysreg.tcr_el2 = htole64(read_tcr_el2()); + ch->sysreg.ttbr0_el2 = htole64(read_ttbr0_el2()); + ch->sysreg.mair_el2 = htole64(read_mair_el2()); + ch->sysreg.esr_el2 = htole64(read_esr_el2()); + ch->sysreg.tpidr_el2 = htole64(read_tpidr_el2()); + ch->sysreg.hcr_el2 = htole64(read_hcr_el2()); + ch->sysreg.vttbr_el2 = htole64(read_vttbr_el2()); + ch->sysreg.vtcr_el2 = htole64(read_vtcr_el2()); + ch->sysreg.far_el2 = htole64(read_far_el2()); + ch->sysreg.vbar_el2 = htole64(read_vbar_el2()); + ch->sysreg.dbgvcr32_el2 = htole64(read_dbgvcr32_el2()); + ch->sysreg.hpfar_el2 = htole64(read_hpfar_el2()); + ch->sysreg.hstr_el2 = htole64(read_hstr_el2()); + ch->sysreg.mdcr_el2 = htole64(read_mdcr_el2()); + ch->sysreg.vmpidr_el2 = htole64(read_vmpidr_el2()); + ch->sysreg.vpidr_el2 = htole64(read_vpidr_el2()); + + ch->sysreg.sctlr_el1 = htole64(read_sctlr_el1()); + ch->sysreg.tcr_el1 = htole64(read_tcr_el1()); + ch->sysreg.ttbr0_el1 = htole64(read_ttbr0_el1()); + ch->sysreg.ttbr1_el1 = htole64(read_ttbr1_el1()); + ch->sysreg.mair_el1 = htole64(read_mair_el1()); + ch->sysreg.esr_el1 = htole64(read_esr_el1()); + ch->sysreg.tpidr_el1 = htole64(read_tpidr_el1()); + ch->sysreg.par_el1 = htole64(read_par_el1()); + ch->sysreg.far_el1 = htole64(read_far_el1()); + ch->sysreg.contextidr_el1 = htole64(read_contextidr_el1()); + ch->sysreg.vbar_el1 = htole64(read_vbar_el1()); + + ch->sysreg.tpidr_el0 = htole64(read_tpidr_el0()); + ch->sysreg.tpidrro_el0 = htole64(read_tpidrro_el0()); + + ch->bh.checksum = tf_crc32(0, payload, sizeof(struct mdump_context_header)); + ch->bh.checksum = htole32(ch->bh.checksum); + + net_send_packet(sizeof(struct mdump_context_header)); +} + +static void send_mdump_context(void *handle) +{ + struct mdump_response_header resp; + bool rcvd; + + NOTICE("MDUMP: Starting CPU context transmission\n"); + + while (true) { + send_mdump_context_real(handle); + + rcvd = receive_mdump_response_header(&resp, 1000); + if (!rcvd) + continue; + + if (le32toh(resp.type) != MDUMP_RESP_CONTEXT_ACK) + continue; + + break; + } + + NOTICE("MDUMP: CPU context sent\n"); +} + +static void send_mdump_end(void) +{ + struct mdump_end_header *eh = (void *)payload; + + eh->bh.magic = htole32(MDUMP_MAGIC_END); + eh->bh.checksum = 0; + eh->bh.version = htole32(MDUMP_PACKET_VERSION); + eh->bh.assoc_id = htole32(assoc_id); + + eh->bh.checksum = tf_crc32(0, payload, sizeof(struct mdump_end_header)); + eh->bh.checksum = htole32(eh->bh.checksum); + + net_send_packet(sizeof(struct mdump_end_header)); +} + +static void mdump_control_check(void) +{ + struct mdump_response_header resp; + uint8_t rcv_hwaddr[HWADDR_LEN]; + struct in_addr rcv_ip; + bool rcvd; + + NOTICE("MDUMP: Starting control negotiation\n"); + + while (true) { + send_mdump_control_header(); + + rcvd = __receive_mdump_response_header(&resp, 1000, rcv_hwaddr, + &rcv_ip); + if (!rcvd) + continue; + + if (le32toh(resp.type) != MDUMP_RESP_CONTROL_ACK) + continue; + + break; + } + + memcpy(dstaddr, rcv_hwaddr, HWADDR_LEN); + memcpy(&dipaddr, &rcv_ip, sizeof(rcv_ip)); + + NOTICE("MDUMP: Receiver MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + dstaddr[0], dstaddr[1], dstaddr[2], dstaddr[3], dstaddr[4], + dstaddr[5]); + NOTICE("MDUMP: Receiver IP: %u.%u.%u.%u\n", dipaddr.s_un.s_un_b.s_b1, + dipaddr.s_un.s_un_b.s_b2, dipaddr.s_un.s_un_b.s_b3, + dipaddr.s_un.s_un_b.s_b4); + + NOTICE("MDUMP: Control negotiation succeeded\n"); +} + +static void mdump_end_check(void) +{ + struct mdump_response_header resp; + uint32_t cnt = 10; + bool rcvd; + + NOTICE("MDUMP: Sending end of session header\n"); + + while (cnt--) { + send_mdump_end(); + + rcvd = receive_mdump_response_header(&resp, 1000); + if (!rcvd) + continue; + + if (le32toh(resp.type) != MDUMP_RESP_END_ACK) + continue; + + NOTICE("MDUMP: End header sent\n"); + return; + } + + NOTICE("MDUMP: No response from host\n"); +} + +static void mdump_setup_session(void) +{ + uint32_t rnd[2] = { 0 }, i, retry = 10; + uint8_t *p = (uint8_t *)&rnd[1]; + uint64_t cnt; + int ret; + + for (i = 0; i < ARRAY_SIZE(rnd); i++) { + while (retry) { + ret = plat_get_rnd(&rnd[i]); + if (!ret) + break; + + mdelay(10); + retry--; + } + } + + if (!rnd[0] || !rnd[1]) { + cnt = read_cntpct_el0(); + while (cnt >> 32) + cnt = (cnt >> 32) + (uint32_t)cnt; + } + + if (!rnd[0] && !rnd[1]) { + rnd[0] = (uint32_t)cnt; + rnd[1] = ~rnd[0]; + } else if (!rnd[0]) { + rnd[0] = (uint32_t)cnt; + } else if (!rnd[1]) { + rnd[1] = (uint32_t)cnt; + } + + assoc_id = rnd[0]; + + memcpy(macaddr + 3, p, 3); + sipaddr.s_un.s_un_b.s_b4 = p[3]; + + switch (sipaddr.s_un.s_un_b.s_b4) { + case 0: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 255: + sipaddr.s_un.s_un_b.s_b4 = 1; + break; + } + + NOTICE("MDUMP: Assoc ID: %08x\n", assoc_id); + NOTICE("MDUMP: Sender MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], + macaddr[5]); + NOTICE("MDUMP: Sender IP: %u.%u.%u.%u\n", sipaddr.s_un.s_un_b.s_b1, + sipaddr.s_un.s_un_b.s_b2, sipaddr.s_un.s_un_b.s_b3, + sipaddr.s_un.s_un_b.s_b4); +} + +static bool validate_mdump_ranges(void) +{ + uint64_t end; + uint32_t i; + + for (i = 0; i < ARRAY_SIZE(mdump_ranges); i++) { + end = mdump_ranges[i].r.end; + + if (end == DRAM_END) + end = DRAM_START + mtk_bl31_get_dram_size(); + + if (end < mdump_ranges[i].r.addr) { + ERROR("MDUMP: Region %u has its end address below its start address\n", i); + return false; + } + } + + return true; +} + +void do_mem_dump(int panic_timeout, void *handle) +{ + int ret; + + console_switch_state(CONSOLE_FLAG_BOOT); + + NOTICE("MDUMP: Disable watchdog\n"); + mtk_wdt_control(false); + + if (!mtk_bl31_get_dram_size()) { + ERROR("MDUMP: DRAM size not passwd by BL2\n"); + goto out; + } + + if (!validate_mdump_ranges()) + goto out; + + NOTICE("MDUMP: Flush and invalidate L1/L2 cache\n"); + dsb(); + isb(); + dcsw_op_all(DCCISW); + dsb(); + isb(); + + NOTICE("MDUMP: Initialize ethernet\n"); + ret = mtk_eth_init(); + if (ret) { + ERROR("MDUMP: Ethernet initialization failed with %d\n", ret); + goto out; + } + NOTICE("MDUMP: Ethernet has been successfully initialized\n"); + + mdump_setup_session(); + + mtk_eth_write_hwaddr(macaddr); + mtk_eth_start(); + + NOTICE("MDUMP: Ethernet started\n"); + + NOTICE("MDUMP: Waiting for port auto-negotiation complete\n"); + ret = mtk_eth_wait_connection_ready(5000); + if (ret) { + ERROR("MDUMP: Failed to wait for ethernet connection ready\n"); + goto out; + } + NOTICE("MDUMP: Port link up\n"); + + mdump_control_check(); + + send_mdump_context(handle); + + send_mdump_ranges(); + NOTICE("MDUMP: All ranges sent\n"); + + mdump_end_check(); + + NOTICE("MDUMP: Cleanup ethernet\n"); + mtk_eth_cleanup(); + +out: + if (panic_timeout) { + NOTICE("Rebooting ...\n"); + psci_system_reset(); + } + + NOTICE("System halted\n"); + + while (1) + ; +} diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.h new file mode 100644 index 000000000..1b670f5a6 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.h @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef MEM_DUMP_H +#define MEM_DUMP_H + +#include +#include + +struct mdump_basic_range { + uintptr_t addr; + uintptr_t end; +}; + +struct mdump_range_exclude { + uint32_t count; + struct mdump_basic_range r[]; +}; + +struct mdump_range { + struct mdump_basic_range r; + bool need_map; + bool is_device; + const struct mdump_range_exclude *excludes; +}; + +/* Memory dump output packet definitions */ +struct mdump_basic_header { + uint32_t magic; + uint32_t checksum; + uint32_t version; + uint32_t assoc_id; +}; + +struct mdump_control_range { + uint64_t addr; + uint64_t end; +}; + +struct mdump_control_header { + struct mdump_basic_header bh; + uint32_t platform; + uint32_t num_ranges; + struct mdump_control_range ranges[]; +}; + +struct mdump_range_header { + struct mdump_basic_header bh; + uint32_t index; + uint32_t size; + uint64_t offset; + uint8_t data[]; /* Make sure this is 8-byte aligned */ +}; + +struct mdump_range_end_header { + struct mdump_basic_header bh; + uint32_t index; +}; + +struct mdump_context_pstate { + uint64_t pc; /* elr_el3 */ + uint64_t cpsr; /* spsr_el3 */ + uint64_t elr_el1; + uint64_t elr_el2; + uint64_t spsr_el1; + uint64_t spsr_el2; + uint64_t sp_el0; + uint64_t sp_el1; + uint64_t sp_el2; +}; + +struct mdump_context_sysreg { + uint64_t sctlr_el3; /* SPR:0x36100 */ + uint64_t tcr_el3; /* SPR:0x36202 */ + uint64_t ttbr0_el3; /* SPR:0x36200 */ + uint64_t mair_el3; /* SPR:0x36A20 */ + uint64_t scr_el3; /* SPR:0x36110 */ + uint64_t esr_el3; /* SPR:0x36520 */ + uint64_t far_el3; /* SPR:0x36600 */ + uint64_t vbar_el3; /* SPR:0x36C00 */ + + uint64_t sctlr_el2; /* SPR:0x34100 */ + uint64_t tcr_el2; /* SPR:0x34202 */ + uint64_t ttbr0_el2; /* SPR:0x34200 */ + uint64_t mair_el2; /* SPR:0x34A20 */ + uint64_t esr_el2; /* SPR:0x34520 */ + uint64_t tpidr_el2; /* SPR:0x30D02 */ + uint64_t hcr_el2; /* SPR:0x34110 */ + uint64_t vttbr_el2; /* SPR:0x34210 */ + uint64_t vtcr_el2; /* SPR:0x34212 */ + uint64_t far_el2; /* SPR:0x34600 */ + uint64_t vbar_el2; /* SPR:0x34C00 */ + uint64_t dbgvcr32_el2; /* SPR:0x24070 */ + uint64_t hpfar_el2; /* SPR:0x34604 */ + uint64_t hstr_el2; /* SPR:0x34113 */ + uint64_t mdcr_el2; /* SPR:0x34111 */ + uint64_t vmpidr_el2; /* SPR:0x34005 */ + uint64_t vpidr_el2; /* SPR:0x34000 */ + + uint64_t sctlr_el1; /* SPR:0x30100 */ + uint64_t tcr_el1; /* SPR:0x30202 */ + uint64_t ttbr0_el1; /* SPR:0x30200 */ + uint64_t ttbr1_el1; /* SPR:0x30201 */ + uint64_t mair_el1; /* SPR:0x30A20 */ + uint64_t esr_el1; /* SPR:0x30520 */ + uint64_t tpidr_el1; /* SPR:0x30D04 */ + uint64_t par_el1; /* SPR:0x30740 */ + uint64_t far_el1; /* SPR:0x30600 */ + uint64_t contextidr_el1; /* SPR:0x30D01 */ + uint64_t vbar_el1; /* SPR:0x30C00 */ + + uint64_t tpidr_el0; /* SPR:0x33D02 */ + uint64_t tpidrro_el0; /* SPR:0x33D03 */ +}; + +struct mdump_context_header { + struct mdump_basic_header bh; + uint64_t gpr[31]; + struct mdump_context_pstate pstate; + struct mdump_context_sysreg sysreg; +}; + +struct mdump_end_header { + struct mdump_basic_header bh; +}; + +enum mdump_response_type { + MDUMP_RESP_CONTROL_ACK, + MDUMP_RESP_RANGE_REXMIT, + MDUMP_RESP_RANGE_ACK, + MDUMP_RESP_CONTEXT_ACK, + MDUMP_RESP_END_ACK, + + __MDUMP_RESP_MAX +}; + +struct mdump_response_header { + struct mdump_basic_header bh; + uint32_t type; + union { + struct { + uint32_t index; + struct mdump_control_range r; + } range; + }; +}; + +#define MDUMP_MAGIC_CONTROL 0x4843444d /* MDCH */ +#define MDUMP_MAGIC_RANGE 0x4452444d /* MDRD */ +#define MDUMP_MAGIC_RANGE_END 0x4552444d /* MDRE */ +#define MDUMP_MAGIC_CONTEXT 0x5443444d /* MDCT */ +#define MDUMP_MAGIC_END 0x4445444d /* MDED */ +#define MDUMP_MAGIC_RESPONSE 0x5052444d /* MDRP */ + +#define MDUMP_PACKET_VERSION 0 + +#define MDUMP_SRC_PORT 12700 +#define MDUMP_DST_PORT 12700 + +void do_mem_dump(int panic_timeout, void *handle); + +#endif /* MEM_DUMP_H */ diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.mk new file mode 100644 index 000000000..b41d21d9d --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/memdump.mk @@ -0,0 +1,23 @@ +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +ifeq ($(EMERG_MEM_DUMP),1) +BL31_SOURCES += $(APSOC_COMMON)/bl31/memdump.c \ + $(APSOC_COMMON)/net_common.c \ + $(APSOC_COMMON)/drivers/eth/mtk_eth.c \ + common/tf_crc32.c + +BL31_CPPFLAGS += -I$(APSOC_COMMON)/bl31 \ + -I$(APSOC_COMMON)/drivers/eth +BL31_CPPFLAGS += -DEMERG_MEM_DUMP +BL31_CFLAGS += -march=armv8-a+crc + +include make_helpers/dep.mk + +$(call GEN_DEP_RULES,bl31,memdump) +$(call MAKE_DEP,bl31,memdump,EMERG_MEM_DUMP) + +endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_boot_next.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_boot_next.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_boot_next.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_boot_next.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_boot_next.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_boot_next.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_boot_next.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_boot_next.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v2.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_gic_v3.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/mtk_sip_svc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/plat_pm.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/plat_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/plat_pm.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/plat_pm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/plat_topology.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/bl31/plat_topology.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/bl31/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/crypto/include/hacc_export.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/crypto/include/hacc_export.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/crypto/include/hacc_export.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/crypto/include/hacc_export.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/crypto/mtk_crypto.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_atf.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_atf.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_atf.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_atf.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_cmd.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_cmd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_cmd.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_cmd.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_info.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_info.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_info.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/include/efuse_info.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/efuse/mtk_efuse.h diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth.c new file mode 100644 index 000000000..636f7f456 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth.c @@ -0,0 +1,1855 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include +#include "mtk_eth_internal.h" + +#define NUM_TX_DESC 8 +#define NUM_RX_DESC 8 +#define PKTSIZE_ALIGN 1536 +#define ARCH_DMA_MINALIGN 64 +#define TX_TOTAL_BUF_SIZE (NUM_TX_DESC * PKTSIZE_ALIGN) +#define RX_TOTAL_BUF_SIZE (NUM_RX_DESC * PKTSIZE_ALIGN) +#define PKT_TOTAL_BUF_SIZE (TX_TOTAL_BUF_SIZE + RX_TOTAL_BUF_SIZE) +#define TX_RX_RING_SIZE PAGE_SIZE +#define ALIGNED_PKT_BUF_SIZE round_up(PKT_TOTAL_BUF_SIZE, PAGE_SIZE) + +#define MT753X_NUM_PHYS 5 +#define MT753X_NUM_PORTS 7 +#define MT753X_DFL_SMI_ADDR 31 +#define MT753X_SMI_ADDR_MASK 0x1f + +#define MT753X_PHY_ADDR(base, addr) \ + (((base) + (addr)) & 0x1f) + +#define GDMA_FWD_TO_CPU \ + (0x20000000 | \ + GDM_ICS_EN | \ + GDM_TCS_EN | \ + GDM_UCS_EN | \ + STRP_CRC | \ + (DP_PDMA << MYMAC_DP_S) | \ + (DP_PDMA << BC_DP_S) | \ + (DP_PDMA << MC_DP_S) | \ + (DP_PDMA << UN_DP_S)) + +#define GDMA_BRIDGE_TO_CPU \ + (0xC0000000 | \ + GDM_ICS_EN | \ + GDM_TCS_EN | \ + GDM_UCS_EN | \ + (DP_PDMA << MYMAC_DP_S) | \ + (DP_PDMA << BC_DP_S) | \ + (DP_PDMA << MC_DP_S) | \ + (DP_PDMA << UN_DP_S)) + +#define GDMA_FWD_DISCARD \ + (0x20000000 | \ + GDM_ICS_EN | \ + GDM_TCS_EN | \ + GDM_UCS_EN | \ + STRP_CRC | \ + (DP_DISCARD << MYMAC_DP_S) | \ + (DP_DISCARD << BC_DP_S) | \ + (DP_DISCARD << MC_DP_S) | \ + (DP_DISCARD << UN_DP_S)) + +struct mtk_eth_priv { + uintptr_t pkt_pool_pa; + uintptr_t pkt_pool_va; + + uintptr_t tx_ring_pa; + uintptr_t rx_ring_pa; + void *tx_ring_noc; + void *rx_ring_noc; + + int rx_dma_owner_idx0; + int tx_cpu_owner_idx0; + + uint32_t mt753x_phy_base; + uint32_t mt753x_pmcr; +}; + +#if GMAC_FORCE_MODE && (GMAC_FORCE_SPEED != SPEED_1000) && \ + (GMAC_FORCE_SPEED != SPEED_2500) && (GMAC_FORCE_SPEED != SPEED_10000) +#error Invalid speed set for fixed-link +#endif + +#if defined(SWITCH_MT7530) +#define SWITCH_RESET_WAIT_MS 1000 +#define mt753x_mii_read mtk_mii_read +#define mt753x_mii_write mtk_mii_write +#define mt753x_mmd_read mtk_mmd_ind_read +#define mt753x_mmd_write mtk_mmd_ind_write +static int mtk_mmd_ind_read(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg); +static int mtk_mmd_ind_write(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg, uint16_t val); +#elif defined(SWITCH_MT7531) +#define SWITCH_RESET_WAIT_MS 200 +#define SWITCH_MT7531_COMMON +#elif defined(SWITCH_MT7988) +#define SWITCH_RESET_WAIT_MS 50 +#define SWITCH_MT7531_COMMON +#else +#define PHY_MODE +#error PHY mode is not supported +#endif + +#if defined(SWITCH_MT7531_COMMON) +#define mt753x_mii_read mt7531_mii_ind_read +#define mt753x_mii_write mt7531_mii_ind_write +static int mt7531_mii_ind_read(struct mtk_eth_priv *priv, uint8_t phy, + uint8_t reg); +static int mt7531_mii_ind_write(struct mtk_eth_priv *priv, uint8_t phy, + uint8_t reg, uint16_t val); +#if defined(SWITCH_MT7531) +#define mt753x_mmd_read mt7531_mmd_ind_read +#define mt753x_mmd_write mt7531_mmd_ind_write +static int mt7531_mmd_ind_read(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg); +static int mt7531_mmd_ind_write(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg, uint16_t val); +#endif +#endif + +static struct mtk_eth_priv _eth_priv; +static bool eth_ready; + +static void mtk_pdma_write(struct mtk_eth_priv *priv, uint32_t reg, + uint32_t val) +{ + mmio_write_32(FE_BASE + PDMA_BASE + reg, val); +} + +static void mtk_pdma_rmw(struct mtk_eth_priv *priv, uint32_t reg, uint32_t clr, + uint32_t set) +{ + mmio_clrsetbits_32(FE_BASE + PDMA_BASE + reg, clr, set); +} + +static void mtk_gdma_write(struct mtk_eth_priv *priv, int no, uint32_t reg, + uint32_t val) +{ + uint32_t gdma_base; + + if (no == 2) + gdma_base = GDMA3_BASE; + else if (no == 1) + gdma_base = GDMA2_BASE; + else + gdma_base = GDMA1_BASE; + + mmio_write_32(FE_BASE + gdma_base + reg, val); +} + +#if defined(SWITCH_MT7988) +static void mtk_fe_rmw(struct mtk_eth_priv *priv, uint32_t reg, uint32_t clr, + uint32_t set) +{ + mmio_clrsetbits_32(FE_BASE + reg, clr, set); +} +#endif + +static uint32_t mtk_gmac_read(struct mtk_eth_priv *priv, uint32_t reg) +{ + return mmio_read_32(FE_BASE + GMAC_BASE + reg); +} + +static void mtk_gmac_write(struct mtk_eth_priv *priv, uint32_t reg, + uint32_t val) +{ + mmio_write_32(FE_BASE + GMAC_BASE + reg, val); +} + +static void mtk_gmac_rmw(struct mtk_eth_priv *priv, uint32_t reg, uint32_t clr, + uint32_t set) +{ + mmio_clrsetbits_32(FE_BASE + GMAC_BASE + reg, clr, set); +} + +static void mtk_ethsys_rmw(struct mtk_eth_priv *priv, uint32_t reg, + uint32_t clr, uint32_t set) +{ + mmio_clrsetbits_32(ETHSYS_BASE + reg, clr, set); +} + +static void __maybe_unused mtk_infra_rmw(struct mtk_eth_priv *priv, + uint32_t reg, uint32_t clr, + uint32_t set) +{ + mmio_clrsetbits_32(TOP_MISC_BASE + reg, clr, set); +} + +#if defined(SWITCH_MT7988) +static uint32_t mtk_gsw_read(struct mtk_eth_priv *priv, uint32_t reg) +{ + return mmio_read_32(ETHSYS_BASE + GSW_BASE + reg); +} + +static void mtk_gsw_write(struct mtk_eth_priv *priv, uint32_t reg, uint32_t val) +{ + mmio_write_32(ETHSYS_BASE + GSW_BASE + reg, val); +} +#endif + +/* Direct MDIO clause 22/45 access via SoC */ +static int mtk_mii_rw(struct mtk_eth_priv *priv, uint8_t phy, uint8_t reg, + uint16_t data, uint32_t cmd, uint32_t st) +{ + int ret; + uint32_t val; + + val = (st << MDIO_ST_S) | + ((cmd << MDIO_CMD_S) & MDIO_CMD_M) | + (((uint32_t)phy << MDIO_PHY_ADDR_S) & MDIO_PHY_ADDR_M) | + (((uint32_t)reg << MDIO_REG_ADDR_S) & MDIO_REG_ADDR_M); + + if (cmd == MDIO_CMD_WRITE || cmd == MDIO_CMD_ADDR) + val |= data & MDIO_RW_DATA_M; + + mtk_gmac_write(priv, GMAC_PIAC_REG, val | PHY_ACS_ST); + + ret = wait_for_bit_32(FE_BASE + GMAC_BASE + GMAC_PIAC_REG, + PHY_ACS_ST, false, 5000); + if (ret) { + WARN("MDIO access timeout\n"); + return ret; + } + + if (cmd == MDIO_CMD_READ || cmd == MDIO_CMD_READ_C45) { + val = mtk_gmac_read(priv, GMAC_PIAC_REG); + return val & MDIO_RW_DATA_M; + } + + return 0; +} + +/* Direct MDIO clause 22 read via SoC */ +static int mtk_mii_read(struct mtk_eth_priv *priv, uint8_t phy, uint8_t reg) +{ + return mtk_mii_rw(priv, phy, reg, 0, MDIO_CMD_READ, MDIO_ST_C22); +} + +/* Direct MDIO clause 22 write via SoC */ +static int mtk_mii_write(struct mtk_eth_priv *priv, uint8_t phy, uint8_t reg, + uint16_t data) +{ + return mtk_mii_rw(priv, phy, reg, data, MDIO_CMD_WRITE, MDIO_ST_C22); +} + +/* Direct MDIO clause 45 read via SoC */ +static int mtk_mmd_read(struct mtk_eth_priv *priv, uint8_t addr, uint8_t devad, + uint16_t reg) +{ + int ret; + + ret = mtk_mii_rw(priv, addr, devad, reg, MDIO_CMD_ADDR, MDIO_ST_C45); + if (ret) + return ret; + + return mtk_mii_rw(priv, addr, devad, 0, MDIO_CMD_READ_C45, + MDIO_ST_C45); +} + +/* Direct MDIO clause 45 write via SoC */ +static int mtk_mmd_write(struct mtk_eth_priv *priv, uint8_t addr, uint8_t devad, + uint16_t reg, uint16_t val) +{ + int ret; + + ret = mtk_mii_rw(priv, addr, devad, reg, MDIO_CMD_ADDR, MDIO_ST_C45); + if (ret) + return ret; + + return mtk_mii_rw(priv, addr, devad, val, MDIO_CMD_WRITE, + MDIO_ST_C45); +} + +#if defined(SWITCH_MT7530) +/* Indirect MDIO clause 45 read via MII registers */ +static int mtk_mmd_ind_read(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg) +{ + int ret; + + ret = mtk_mii_write(priv, addr, MII_MMD_ACC_CTL_REG, + (MMD_ADDR << MMD_CMD_S) | + ((devad << MMD_DEVAD_S) & MMD_DEVAD_M)); + if (ret) + return ret; + + ret = mtk_mii_write(priv, addr, MII_MMD_ADDR_DATA_REG, reg); + if (ret) + return ret; + + ret = mtk_mii_write(priv, addr, MII_MMD_ACC_CTL_REG, + (MMD_DATA << MMD_CMD_S) | + ((devad << MMD_DEVAD_S) & MMD_DEVAD_M)); + if (ret) + return ret; + + return mtk_mii_read(priv, addr, MII_MMD_ADDR_DATA_REG); +} + +/* Indirect MDIO clause 45 write via MII registers */ +static int mtk_mmd_ind_write(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg, uint16_t val) +{ + int ret; + + ret = mtk_mii_write(priv, addr, MII_MMD_ACC_CTL_REG, + (MMD_ADDR << MMD_CMD_S) | + ((devad << MMD_DEVAD_S) & MMD_DEVAD_M)); + if (ret) + return ret; + + ret = mtk_mii_write(priv, addr, MII_MMD_ADDR_DATA_REG, reg); + if (ret) + return ret; + + ret = mtk_mii_write(priv, addr, MII_MMD_ACC_CTL_REG, + (MMD_DATA << MMD_CMD_S) | + ((devad << MMD_DEVAD_S) & MMD_DEVAD_M)); + if (ret) + return ret; + + return mtk_mii_write(priv, addr, MII_MMD_ADDR_DATA_REG, val); +} +#endif /* SWITCH_MT7530 */ + +#if !defined(PHY_MODE) +/* + * MT7530 Internal Register Address Bits + * ------------------------------------------------------------------- + * | 15 14 13 12 11 10 9 8 7 6 | 5 4 3 2 | 1 0 | + * |----------------------------------------|---------------|--------| + * | Page Address | Reg Address | Unused | + * ------------------------------------------------------------------- + */ + +static int mt753x_reg_read(struct mtk_eth_priv *priv, uint32_t reg, + uint32_t *data) +{ + int ret, low_word, high_word; + +#if defined(SWITCH_MT7988) + *data = mtk_gsw_read(priv, reg); + return 0; +#endif + + /* Write page address */ + ret = mtk_mii_write(priv, MT753X_DFL_SMI_ADDR, 0x1f, reg >> 6); + if (ret) + return ret; + + /* Read low word */ + low_word = mtk_mii_read(priv, MT753X_DFL_SMI_ADDR, (reg >> 2) & 0xf); + if (low_word < 0) + return low_word; + + /* Read high word */ + high_word = mtk_mii_read(priv, MT753X_DFL_SMI_ADDR, 0x10); + if (high_word < 0) + return high_word; + + if (data) + *data = ((uint32_t)high_word << 16) | (low_word & 0xffff); + + return 0; +} + +static int mt753x_reg_write(struct mtk_eth_priv *priv, uint32_t reg, + uint32_t data) +{ + int ret; + +#if defined(SWITCH_MT7988) + mtk_gsw_write(priv, reg, data); + return 0; +#endif + + /* Write page address */ + ret = mtk_mii_write(priv, MT753X_DFL_SMI_ADDR, 0x1f, reg >> 6); + if (ret) + return ret; + + /* Write low word */ + ret = mtk_mii_write(priv, MT753X_DFL_SMI_ADDR, (reg >> 2) & 0xf, + data & 0xffff); + if (ret) + return ret; + + /* Write high word */ + return mtk_mii_write(priv, MT753X_DFL_SMI_ADDR, 0x10, data >> 16); +} + +static void __maybe_unused mt753x_reg_rmw(struct mtk_eth_priv *priv, + uint32_t reg, uint32_t clr, + uint32_t set) +{ + uint32_t val; + + mt753x_reg_read(priv, reg, &val); + val &= ~clr; + val |= set; + mt753x_reg_write(priv, reg, val); +} +#endif /* !PHY_MODE */ + +#if defined(SWITCH_MT7531_COMMON) +/* Indirect MDIO clause 22/45 access */ +static int mt7531_mii_rw(struct mtk_eth_priv *priv, int phy, int reg, + uint16_t data, uint32_t cmd, uint32_t st) +{ + uint64_t timeout; + uint32_t val, timeout_ms; + int ret = 0; + + val = (st << MDIO_ST_S) | + ((cmd << MDIO_CMD_S) & MDIO_CMD_M) | + ((phy << MDIO_PHY_ADDR_S) & MDIO_PHY_ADDR_M) | + ((reg << MDIO_REG_ADDR_S) & MDIO_REG_ADDR_M); + + if (cmd == MDIO_CMD_WRITE || cmd == MDIO_CMD_ADDR) + val |= data & MDIO_RW_DATA_M; + + mt753x_reg_write(priv, MT7531_PHY_IAC, val | PHY_ACS_ST); + + timeout_ms = 100; + timeout = timeout_init_us(timeout_ms * 1000); + while (1) { + mt753x_reg_read(priv, MT7531_PHY_IAC, &val); + + if ((val & PHY_ACS_ST) == 0) + break; + + if (timeout_elapsed(timeout)) + return -ETIMEDOUT; + } + + if (cmd == MDIO_CMD_READ || cmd == MDIO_CMD_READ_C45) { + mt753x_reg_read(priv, MT7531_PHY_IAC, &val); + ret = val & MDIO_RW_DATA_M; + } + + return ret; +} + +static int mt7531_mii_ind_read(struct mtk_eth_priv *priv, uint8_t phy, + uint8_t reg) +{ + uint8_t phy_addr; + + if (phy >= MT753X_NUM_PHYS) + return -EINVAL; + + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, phy); + + return mt7531_mii_rw(priv, phy_addr, reg, 0, MDIO_CMD_READ, + MDIO_ST_C22); +} + +static int mt7531_mii_ind_write(struct mtk_eth_priv *priv, uint8_t phy, + uint8_t reg, uint16_t val) +{ + uint8_t phy_addr; + + if (phy >= MT753X_NUM_PHYS) + return -EINVAL; + + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, phy); + + return mt7531_mii_rw(priv, phy_addr, reg, val, MDIO_CMD_WRITE, + MDIO_ST_C22); +} + +#if defined(SWITCH_MT7531) +static int mt7531_mmd_ind_read(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg) +{ + uint8_t phy_addr; + int ret; + + if (addr >= MT753X_NUM_PHYS) + return -EINVAL; + + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, addr); + + ret = mt7531_mii_rw(priv, phy_addr, devad, reg, MDIO_CMD_ADDR, + MDIO_ST_C45); + if (ret) + return ret; + + return mt7531_mii_rw(priv, phy_addr, devad, 0, MDIO_CMD_READ_C45, + MDIO_ST_C45); +} + +static int mt7531_mmd_ind_write(struct mtk_eth_priv *priv, uint8_t addr, + uint8_t devad, uint16_t reg, uint16_t val) +{ + uint8_t phy_addr; + int ret; + + if (addr >= MT753X_NUM_PHYS) + return 0; + + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, addr); + + ret = mt7531_mii_rw(priv, phy_addr, devad, reg, MDIO_CMD_ADDR, + MDIO_ST_C45); + if (ret) + return ret; + + return mt7531_mii_rw(priv, phy_addr, devad, val, MDIO_CMD_WRITE, + MDIO_ST_C45); +} +#endif +#endif /* SWITCH_MT7531_COMMON */ + +#if defined(SWITCH_MT7530) || defined(SWITCH_MT7531) +static int mt753x_core_reg_read(struct mtk_eth_priv *priv, uint32_t reg) +{ + uint8_t phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, 0); + + return mt753x_mmd_read(priv, phy_addr, 0x1f, reg); +} + +static void mt753x_core_reg_write(struct mtk_eth_priv *priv, uint32_t reg, + uint32_t val) +{ + uint8_t phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, 0); + + mt753x_mmd_write(priv, phy_addr, 0x1f, reg, val); +} +#endif /* SWITCH_MT7530 || SWITCH_MT7531 */ + +#if defined(SWITCH_MT7530) +static int mt7530_pad_clk_setup(struct mtk_eth_priv *priv) +{ + uint32_t ncpo1, ssc_delta; + +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_RGMII + ncpo1 = 0x0c80; + ssc_delta = 0x87; +#else +#error Unsupported interface mode +#endif + + /* Disable MT7530 core clock */ + mt753x_core_reg_write(priv, CORE_TRGMII_GSW_CLK_CG, 0); + + /* Disable MT7530 PLL */ + mt753x_core_reg_write(priv, CORE_GSWPLL_GRP1, + (2 << RG_GSWPLL_POSDIV_200M_S) | + (32 << RG_GSWPLL_FBKDIV_200M_S)); + + /* For MT7530 core clock = 500Mhz */ + mt753x_core_reg_write(priv, CORE_GSWPLL_GRP2, + (1 << RG_GSWPLL_POSDIV_500M_S) | + (25 << RG_GSWPLL_FBKDIV_500M_S)); + + /* Enable MT7530 PLL */ + mt753x_core_reg_write(priv, CORE_GSWPLL_GRP1, + (2 << RG_GSWPLL_POSDIV_200M_S) | + (32 << RG_GSWPLL_FBKDIV_200M_S) | + RG_GSWPLL_EN_PRE); + + udelay(20); + + mt753x_core_reg_write(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN); + + /* Setup the MT7530 TRGMII Tx Clock */ + mt753x_core_reg_write(priv, CORE_PLL_GROUP5, ncpo1); + mt753x_core_reg_write(priv, CORE_PLL_GROUP6, 0); + mt753x_core_reg_write(priv, CORE_PLL_GROUP10, ssc_delta); + mt753x_core_reg_write(priv, CORE_PLL_GROUP11, ssc_delta); + mt753x_core_reg_write(priv, CORE_PLL_GROUP4, RG_SYSPLL_DDSFBK_EN | + RG_SYSPLL_BIAS_EN | RG_SYSPLL_BIAS_LPF_EN); + + mt753x_core_reg_write(priv, CORE_PLL_GROUP2, + RG_SYSPLL_EN_NORMAL | RG_SYSPLL_VODEN | + (1 << RG_SYSPLL_POSDIV_S)); + + mt753x_core_reg_write(priv, CORE_PLL_GROUP7, + RG_LCDDS_PCW_NCPO_CHG | (3 << RG_LCCDS_C_S) | + RG_LCDDS_PWDB | RG_LCDDS_ISO_EN); + + /* Enable MT7530 core clock */ + mt753x_core_reg_write(priv, CORE_TRGMII_GSW_CLK_CG, + REG_GSWCK_EN | REG_TRGMIICK_EN); + + return 0; +} + +static void mt753x_mac_control(struct mtk_eth_priv *priv, bool enable) +{ + uint32_t pmcr = FORCE_MODE; + + if (enable) + pmcr = priv->mt753x_pmcr; + + mt753x_reg_write(priv, PMCR_REG(6), pmcr); +} + +static int mt753x_setup(struct mtk_eth_priv *priv) +{ + uint16_t phy_addr, phy_val; + uint32_t val, txdrv; + int i; + + if (!MTK_HAS_CAPS(SOC_CAPS, MTK_TRGMII_MT7621_CLK)) { + /* Select 250MHz clk for RGMII mode */ + mtk_ethsys_rmw(priv, ETHSYS_CLKCFG0_REG, + ETHSYS_TRGMII_CLK_SEL362_5, 0); + + txdrv = 8; + } else { + txdrv = 4; + } + + /* Modify HWTRAP first to allow direct access to internal PHYs */ + mt753x_reg_read(priv, HWTRAP_REG, &val); + val |= CHG_TRAP; + val &= ~C_MDIO_BPS; + mt753x_reg_write(priv, MHWTRAP_REG, val); + + /* Calculate the phy base address */ + val = ((val & SMI_ADDR_M) >> SMI_ADDR_S) << 3; + priv->mt753x_phy_base = (val | 0x7) + 1; + + /* Turn off PHYs */ + for (i = 0; i < MT753X_NUM_PHYS; i++) { + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, i); + phy_val = mt753x_mii_read(priv, phy_addr, MII_BMCR); + phy_val |= BMCR_PDOWN; + mt753x_mii_write(priv, phy_addr, MII_BMCR, phy_val); + } + + /* Force MAC link down before reset */ + mt753x_reg_write(priv, PMCR_REG(5), FORCE_MODE); + mt753x_reg_write(priv, PMCR_REG(6), FORCE_MODE); + + /* MT7530 reset */ + mt753x_reg_write(priv, SYS_CTRL_REG, SW_SYS_RST | SW_REG_RST); + udelay(100); + + val = (IPG_96BIT_WITH_SHORT_IPG << IPG_CFG_S) | + MAC_MODE | FORCE_MODE | + MAC_TX_EN | MAC_RX_EN | + BKOFF_EN | BACKPR_EN | + (SPEED_1000M << FORCE_SPD_S) | + FORCE_DPX | FORCE_LINK; + + /* MT7530 Port6: Forced 1000M/FD, FC disabled */ + priv->mt753x_pmcr = val; + + /* MT7530 Port5: Forced link down */ + mt753x_reg_write(priv, PMCR_REG(5), FORCE_MODE); + + /* Keep MAC link down before starting eth */ + mt753x_reg_write(priv, PMCR_REG(6), FORCE_MODE); + + /* MT7530 Port6: Set to RGMII */ + mt753x_reg_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_M, P6_INTF_MODE_RGMII); + + /* Hardware Trap: Enable Port6, Disable Port5 */ + mt753x_reg_read(priv, HWTRAP_REG, &val); + val |= CHG_TRAP | LOOPDET_DIS | P5_INTF_DIS | + (P5_INTF_SEL_GMAC5 << P5_INTF_SEL_S) | + (P5_INTF_MODE_RGMII << P5_INTF_MODE_S); + val &= ~(C_MDIO_BPS | P6_INTF_DIS); + mt753x_reg_write(priv, MHWTRAP_REG, val); + + /* Setup switch core pll */ + mt7530_pad_clk_setup(priv); + + /* Lower Tx Driving for TRGMII path */ + for (i = 0 ; i < NUM_TRGMII_CTRL ; i++) + mt753x_reg_write(priv, MT7530_TRGMII_TD_ODT(i), + (txdrv << TD_DM_DRVP_S) | + (txdrv << TD_DM_DRVN_S)); + + for (i = 0 ; i < NUM_TRGMII_CTRL; i++) + mt753x_reg_rmw(priv, MT7530_TRGMII_RD(i), RD_TAP_M, 16); + + /* Turn on PHYs */ + for (i = 0; i < MT753X_NUM_PHYS; i++) { + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, i); + phy_val = mt753x_mii_read(priv, phy_addr, MII_BMCR); + phy_val &= ~BMCR_PDOWN; + mt753x_mii_write(priv, phy_addr, MII_BMCR, phy_val); + } + + return 0; +} +#elif defined(SWITCH_MT7531) +static void mt7531_core_pll_setup(struct mtk_eth_priv *priv, int mcm) +{ + /* Step 1 : Disable MT7531 COREPLL */ + mt753x_reg_rmw(priv, MT7531_PLLGP_EN, EN_COREPLL, 0); + + /* Step 2: switch to XTAL output */ + mt753x_reg_rmw(priv, MT7531_PLLGP_EN, SW_CLKSW, SW_CLKSW); + + mt753x_reg_rmw(priv, MT7531_PLLGP_CR0, RG_COREPLL_EN, 0); + + /* Step 3: disable PLLGP and enable program PLLGP */ + mt753x_reg_rmw(priv, MT7531_PLLGP_EN, SW_PLLGP, SW_PLLGP); + + /* Step 4: program COREPLL output frequency to 500MHz */ + mt753x_reg_rmw(priv, MT7531_PLLGP_CR0, RG_COREPLL_POSDIV_M, + 2 << RG_COREPLL_POSDIV_S); + udelay(25); + + /* Currently, support XTAL 25Mhz only */ + mt753x_reg_rmw(priv, MT7531_PLLGP_CR0, RG_COREPLL_SDM_PCW_M, + 0x140000 << RG_COREPLL_SDM_PCW_S); + + /* Set feedback divide ratio update signal to high */ + mt753x_reg_rmw(priv, MT7531_PLLGP_CR0, RG_COREPLL_SDM_PCW_CHG, + RG_COREPLL_SDM_PCW_CHG); + + /* Wait for at least 16 XTAL clocks */ + udelay(10); + + /* Step 5: set feedback divide ratio update signal to low */ + mt753x_reg_rmw(priv, MT7531_PLLGP_CR0, RG_COREPLL_SDM_PCW_CHG, 0); + + /* add enable 325M clock for SGMII */ + mt753x_reg_write(priv, MT7531_ANA_PLLGP_CR5, 0xad0000); + + /* add enable 250SSC clock for RGMII */ + mt753x_reg_write(priv, MT7531_ANA_PLLGP_CR2, 0x4f40000); + + /*Step 6: Enable MT7531 PLL */ + mt753x_reg_rmw(priv, MT7531_PLLGP_CR0, RG_COREPLL_EN, RG_COREPLL_EN); + + mt753x_reg_rmw(priv, MT7531_PLLGP_EN, EN_COREPLL, EN_COREPLL); + + udelay(25); +} + +static int mt7531_port_sgmii_init(struct mtk_eth_priv *priv, + uint32_t port) +{ + if (port != 5 && port != 6) { + ERROR("mt7531: port %d is not a SGMII port\n", port); + return -EINVAL; + } + + /* Set SGMII GEN2 speed(2.5G) */ + mt753x_reg_rmw(priv, MT7531_PHYA_CTRL_SIGNAL3(port), + SGMSYS_SPEED_2500, SGMSYS_SPEED_2500); + + /* Disable SGMII AN */ + mt753x_reg_rmw(priv, MT7531_PCS_CONTROL_1(port), + SGMII_AN_ENABLE, 0); + + /* SGMII force mode setting */ + mt753x_reg_write(priv, MT7531_SGMII_MODE(port), SGMII_FORCE_MODE); + + /* Release PHYA power down state */ + mt753x_reg_rmw(priv, MT7531_QPHY_PWR_STATE_CTRL(port), + SGMII_PHYA_PWD, 0); + + return 0; +} + +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_RGMII +static int mt7531_port_rgmii_init(struct mtk_eth_priv *priv, uint32_t port) +{ + uint32_t val; + + if (port != 5) { + ERROR("error: RGMII mode is not available for port %d\n", + port); + return -EINVAL; + } + + mt753x_reg_read(priv, MT7531_CLKGEN_CTRL, &val); + val |= GP_CLK_EN; + val &= ~GP_MODE_M; + val |= GP_MODE_RGMII << GP_MODE_S; + val |= TXCLK_NO_REVERSE; + val |= RXCLK_NO_DELAY; + val &= ~CLK_SKEW_IN_M; + val |= CLK_SKEW_IN_NO_CHANGE << CLK_SKEW_IN_S; + val &= ~CLK_SKEW_OUT_M; + val |= CLK_SKEW_OUT_NO_CHANGE << CLK_SKEW_OUT_S; + mt753x_reg_write(priv, MT7531_CLKGEN_CTRL, val); + + return 0; +} +#endif /* PHY_INTERFACE_MODE_RGMII */ + +static void mt7531_phy_setting(struct mtk_eth_priv *priv) +{ + int i; + uint32_t val; + + for (i = 0; i < MT753X_NUM_PHYS; i++) { + /* Enable HW auto downshift */ + mt753x_mii_write(priv, i, 0x1f, 0x1); + val = mt753x_mii_read(priv, i, PHY_EXT_REG_14); + val |= PHY_EN_DOWN_SHFIT; + mt753x_mii_write(priv, i, PHY_EXT_REG_14, val); + + /* PHY link down power saving enable */ + val = mt753x_mii_read(priv, i, PHY_EXT_REG_17); + val |= PHY_LINKDOWN_POWER_SAVING_EN; + mt753x_mii_write(priv, i, PHY_EXT_REG_17, val); + + val = mt753x_mmd_read(priv, i, 0x1e, PHY_DEV1E_REG_0C6); + val &= ~PHY_POWER_SAVING_M; + val |= PHY_POWER_SAVING_TX << PHY_POWER_SAVING_S; + mt753x_mmd_write(priv, i, 0x1e, PHY_DEV1E_REG_0C6, val); + } +} + +static void mt753x_mac_control(struct mtk_eth_priv *priv, bool enable) +{ + uint32_t pmcr = FORCE_MODE_LNK; + + if (enable) + pmcr = priv->mt753x_pmcr; + + mt753x_reg_write(priv, PMCR_REG(5), pmcr); + mt753x_reg_write(priv, PMCR_REG(6), pmcr); +} + +static int mt753x_setup(struct mtk_eth_priv *priv) +{ + uint16_t phy_addr, phy_val; + uint32_t val; + uint32_t pmcr; + uint32_t port5_sgmii; + int i; + + priv->mt753x_phy_base = (MT753X_DFL_SMI_ADDR + 1) & + MT753X_SMI_ADDR_MASK; + + /* Turn off PHYs */ + for (i = 0; i < MT753X_NUM_PHYS; i++) { + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, i); + phy_val = mt753x_mii_read(priv, phy_addr, MII_BMCR); + phy_val |= BMCR_PDOWN; + mt753x_mii_write(priv, phy_addr, MII_BMCR, phy_val); + } + + /* Force MAC link down before reset */ + mt753x_reg_write(priv, PMCR_REG(5), FORCE_MODE_LNK); + mt753x_reg_write(priv, PMCR_REG(6), FORCE_MODE_LNK); + + /* Switch soft reset */ + mt753x_reg_write(priv, SYS_CTRL_REG, SW_SYS_RST | SW_REG_RST); + udelay(100); + + /* Enable MDC input Schmitt Trigger */ + mt753x_reg_rmw(priv, MT7531_SMT0_IOLB, SMT_IOLB_5_SMI_MDC_EN, + SMT_IOLB_5_SMI_MDC_EN); + + mt7531_core_pll_setup(priv, 0); + + mt753x_reg_read(priv, MT7531_TOP_SIG_SR, &val); + port5_sgmii = !!(val & PAD_DUAL_SGMII_EN); + + /* port5 support either RGMII or SGMII, port6 only support SGMII. */ +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_RGMII + if (!port5_sgmii) + mt7531_port_rgmii_init(priv, 5); +#elif GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_2500BASEX + mt7531_port_sgmii_init(priv, 6); + if (port5_sgmii) + mt7531_port_sgmii_init(priv, 5); +#endif + + pmcr = MT7531_FORCE_MODE | + (IPG_96BIT_WITH_SHORT_IPG << IPG_CFG_S) | + MAC_MODE | MAC_TX_EN | MAC_RX_EN | + BKOFF_EN | BACKPR_EN | + FORCE_RX_FC | FORCE_TX_FC | + (SPEED_1000M << FORCE_SPD_S) | FORCE_DPX | + FORCE_LINK; + + priv->mt753x_pmcr = pmcr; + + /* Keep MAC link down before starting eth */ + mt753x_reg_write(priv, PMCR_REG(5), FORCE_MODE_LNK); + mt753x_reg_write(priv, PMCR_REG(6), FORCE_MODE_LNK); + + /* Turn on PHYs */ + for (i = 0; i < MT753X_NUM_PHYS; i++) { + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, i); + phy_val = mt753x_mii_read(priv, phy_addr, MII_BMCR); + phy_val &= ~BMCR_PDOWN; + mt753x_mii_write(priv, phy_addr, MII_BMCR, phy_val); + } + + mt7531_phy_setting(priv); + + /* Enable Internal PHYs */ + val = mt753x_core_reg_read(priv, CORE_PLL_GROUP4); + val |= MT7531_BYPASS_MODE; + val &= ~MT7531_POWER_ON_OFF; + mt753x_core_reg_write(priv, CORE_PLL_GROUP4, val); + + return 0; +} +#elif defined(SWITCH_MT7988) +static void mt7988_phy_setting(struct mtk_eth_priv *priv) +{ + uint16_t val; + uint32_t i; + + for (i = 0; i < MT753X_NUM_PHYS; i++) { + /* Enable HW auto downshift */ + mt753x_mii_write(priv, i, 0x1f, 0x1); + val = mt753x_mii_read(priv, i, PHY_EXT_REG_14); + val |= PHY_EN_DOWN_SHFIT; + mt753x_mii_write(priv, i, PHY_EXT_REG_14, val); + + /* PHY link down power saving enable */ + val = mt753x_mii_read(priv, i, PHY_EXT_REG_17); + val |= PHY_LINKDOWN_POWER_SAVING_EN; + mt753x_mii_write(priv, i, PHY_EXT_REG_17, val); + } +} + +static void mt753x_mac_control(struct mtk_eth_priv *priv, bool enable) +{ + uint32_t pmcr = FORCE_MODE_LNK; + + if (enable) + pmcr = priv->mt753x_pmcr; + + mt753x_reg_write(priv, PMCR_REG(6), pmcr); +} + +static int mt753x_setup(struct mtk_eth_priv *priv) +{ + uint16_t phy_addr, phy_val; + uint32_t pmcr; + int i; + + priv->mt753x_phy_base = (MT753X_DFL_SMI_ADDR + 1) & + MT753X_SMI_ADDR_MASK; + + /* Turn off PHYs */ + for (i = 0; i < MT753X_NUM_PHYS; i++) { + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, i); + phy_val = mt753x_mii_read(priv, phy_addr, MII_BMCR); + phy_val |= BMCR_PDOWN; + mt753x_mii_write(priv, phy_addr, MII_BMCR, phy_val); + } + +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_USXGMII + /* Use CPU bridge instead of actual USXGMII path */ + + /* Disable GDM1 RX CRC stripping */ + /* mtk_fe_rmw(priv, 0x500, BIT(16), 0); */ + + /* Set GDM1 no drop */ + mtk_fe_rmw(priv, PSE_NO_DROP_CFG_REG, 0, PSE_NO_DROP_GDM1); + + /* Enable GSW CPU bridge as USXGMII */ + /* mtk_fe_rmw(priv, 0x504, BIT(31), BIT(31)); */ + + /* Enable GDM1 to GSW CPU bridge */ + mtk_gmac_rmw(priv, GMAC_MAC_MISC_REG, 0, BIT(0)); + + /* XGMAC force link up */ + mtk_gmac_rmw(priv, GMAC_XGMAC_STS_REG, 0, P1_XGMAC_FORCE_LINK); + + /* Setup GSW CPU bridge IPG */ + mtk_gmac_rmw(priv, GMAC_GSW_CFG_REG, GSWTX_IPG_M | GSWRX_IPG_M, + (0xB << GSWTX_IPG_S) | (0xB << GSWRX_IPG_S)); +#else +#error Unsupported interface mode +#endif + + pmcr = MT7988_FORCE_MODE | + (IPG_96BIT_WITH_SHORT_IPG << IPG_CFG_S) | + MAC_MODE | MAC_TX_EN | MAC_RX_EN | + BKOFF_EN | BACKPR_EN | + FORCE_RX_FC | FORCE_TX_FC | + (SPEED_1000M << FORCE_SPD_S) | FORCE_DPX | + FORCE_LINK; + + priv->mt753x_pmcr = pmcr; + + /* Keep MAC link down before starting eth */ + mt753x_reg_write(priv, PMCR_REG(6), FORCE_MODE_LNK); + + /* Turn on PHYs */ + for (i = 0; i < MT753X_NUM_PHYS; i++) { + phy_addr = MT753X_PHY_ADDR(priv->mt753x_phy_base, i); + phy_val = mt753x_mii_read(priv, phy_addr, MII_BMCR); + phy_val &= ~BMCR_PDOWN; + mt753x_mii_write(priv, phy_addr, MII_BMCR, phy_val); + } + + mt7988_phy_setting(priv); + + return 0; +} +#endif /* SWITCH_MT7xxx */ + +#if !defined(PHY_MODE) +static int mt753x_switch_init(struct mtk_eth_priv *priv) +{ + uint32_t i; + int ret; + + /* Global reset switch */ +#ifdef SWITCH_RESET_MCM + mmio_setbits_32(SWITCH_RESET_MCM_REG, BIT(SWITCH_RESET_MCM_BIT)); + mdelay(10); + mmio_clrbits_32(SWITCH_RESET_MCM_REG, BIT(SWITCH_RESET_MCM_BIT)); + mdelay(SWITCH_RESET_WAIT_MS); +#elif defined(SWITCH_RESET_GPIO) + mtk_plat_switch_reset(true); /* Provided in plat_eth_def.h */ + mdelay(10); + mtk_plat_switch_reset(false); + mdelay(SWITCH_RESET_WAIT_MS); +#endif + + ret = mt753x_setup(priv); + if (ret) + return ret; + + /* Set port isolation */ + for (i = 0; i < MT753X_NUM_PORTS; i++) { + /* Set port matrix mode */ + if (i != 6) + mt753x_reg_write(priv, PCR_REG(i), + (0x40 << PORT_MATRIX_S)); + else + mt753x_reg_write(priv, PCR_REG(i), + (0x3f << PORT_MATRIX_S)); + + /* Set port mode to user port */ + mt753x_reg_write(priv, PVC_REG(i), + (0x8100U << STAG_VPID_S) | + (VLAN_ATTR_USER << VLAN_ATTR_S)); + } + + return 0; +} + +static int mt753x_switch_wait_port_ready(struct mtk_eth_priv *priv, + uint32_t timeout_ms) +{ + uint64_t tmo = timeout_init_us(timeout_ms * 1000); + uint16_t sts; + uint32_t i; + + while (!timeout_elapsed(tmo)) { + for (i = 0; i < MT753X_NUM_PHYS; i++) { + sts = mt753x_mii_read(priv, i, MII_BMSR); + if (sts & BMSR_ANEGCOMPLETE) { + if (sts & BMSR_LSTATUS) + return 0; + } + } + + mdelay(100); + } + + return -ETIMEDOUT; +} +#endif /* !PHY_MODE */ + +#if defined(PHY_MODE) +static void mtk_xphy_link_adjust(struct mtk_eth_priv *priv) +{ + uint16_t lcl_adv = 0, rmt_adv = 0; + uint8_t flowctrl; + uint32_t mcr; + + mcr = mtk_gmac_read(priv, XGMAC_PORT_MCR(GMAC_ID)); + mcr &= ~(XGMAC_FORCE_TX_FC | XGMAC_FORCE_RX_FC); + + if (priv->phydev->duplex) { + if (priv->phydev->pause) + rmt_adv = LPA_PAUSE_CAP; + if (priv->phydev->asym_pause) + rmt_adv |= LPA_PAUSE_ASYM; + + if (priv->phydev->advertising & ADVERTISED_Pause) + lcl_adv |= ADVERTISE_PAUSE_CAP; + if (priv->phydev->advertising & ADVERTISED_Asym_Pause) + lcl_adv |= ADVERTISE_PAUSE_ASYM; + + flowctrl = mii_resolve_flowctrl_fdx(lcl_adv, rmt_adv); + + if (flowctrl & FLOW_CTRL_TX) + mcr |= XGMAC_FORCE_TX_FC; + if (flowctrl & FLOW_CTRL_RX) + mcr |= XGMAC_FORCE_RX_FC; + + debug("rx pause %s, tx pause %s\n", + flowctrl & FLOW_CTRL_RX ? "enabled" : "disabled", + flowctrl & FLOW_CTRL_TX ? "enabled" : "disabled"); + } + + mcr &= ~(XGMAC_TRX_DISABLE); + mtk_gmac_write(priv, XGMAC_PORT_MCR(GMAC_ID), mcr); +} + +static void mtk_phy_link_adjust(struct mtk_eth_priv *priv) +{ + uint16_t lcl_adv = 0, rmt_adv = 0; + uint8_t flowctrl; + uint32_t mcr; + + mcr = (IPG_96BIT_WITH_SHORT_IPG << IPG_CFG_S) | + (MAC_RX_PKT_LEN_1536 << MAC_RX_PKT_LEN_S) | + MAC_MODE | FORCE_MODE | + MAC_TX_EN | MAC_RX_EN | + DEL_RXFIFO_CLR | + BKOFF_EN | BACKPR_EN; + + switch (priv->phydev->speed) { + case SPEED_10: + mcr |= (SPEED_10M << FORCE_SPD_S); + break; + case SPEED_100: + mcr |= (SPEED_100M << FORCE_SPD_S); + break; + case SPEED_1000: + case SPEED_2500: + mcr |= (SPEED_1000M << FORCE_SPD_S); + break; + }; + + if (priv->phydev->link) + mcr |= FORCE_LINK; + + if (priv->phydev->duplex) { + mcr |= FORCE_DPX; + + if (priv->phydev->pause) + rmt_adv = LPA_PAUSE_CAP; + if (priv->phydev->asym_pause) + rmt_adv |= LPA_PAUSE_ASYM; + + if (priv->phydev->advertising & ADVERTISED_Pause) + lcl_adv |= ADVERTISE_PAUSE_CAP; + if (priv->phydev->advertising & ADVERTISED_Asym_Pause) + lcl_adv |= ADVERTISE_PAUSE_ASYM; + + flowctrl = mii_resolve_flowctrl_fdx(lcl_adv, rmt_adv); + + if (flowctrl & FLOW_CTRL_TX) + mcr |= FORCE_TX_FC; + if (flowctrl & FLOW_CTRL_RX) + mcr |= FORCE_RX_FC; + + debug("rx pause %s, tx pause %s\n", + flowctrl & FLOW_CTRL_RX ? "enabled" : "disabled", + flowctrl & FLOW_CTRL_TX ? "enabled" : "disabled"); + } + + mtk_gmac_write(priv, GMAC_PORT_MCR(GMAC_ID), mcr); +} + +static int mtk_phy_start(struct mtk_eth_priv *priv) +{ + struct phy_device *phydev = priv->phydev; + int ret; + + ret = phy_startup(phydev); + + if (ret) { + debug("Could not initialize PHY %s\n", phydev->dev->name); + return ret; + } + + if (!phydev->link) { + debug("%s: link down.\n", phydev->dev->name); + return 0; + } + + if (!GMAC_FORCE_MODE) { +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_USXGMII + mtk_xphy_link_adjust(priv); +#else + mtk_phy_link_adjust(priv); +#endif + } + + debug("Speed: %d, %s duplex%s\n", phydev->speed, + (phydev->duplex) ? "full" : "half", + (phydev->port == PORT_FIBRE) ? ", fiber mode" : ""); + + return 0; +} + +static int mtk_phy_probe(struct mtk_eth_priv *priv) +{ + struct phy_device *phydev; + + phydev = phy_connect(priv->mdio_bus, PHY_ADDR, dev, + GMAC_INTERFACE_MODE); + if (!phydev) + return -ENODEV; + + phydev->supported &= PHY_GBIT_FEATURES; + phydev->advertising = phydev->supported; + + priv->phydev = phydev; + phy_config(phydev); + + return 0; +} +#endif + +#if (GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_SGMII) || \ + (GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_2500BASEX) +static void mtk_sgmii_an_init(struct mtk_eth_priv *priv) +{ + /* Set SGMII GEN1 speed(1G) */ + mmio_clrbits_32(SGMII_BASE + ANA_RG3_OFFS, SGMSYS_SPEED_2500); + + /* Enable SGMII AN */ + mmio_setbits_32(SGMII_BASE + SGMSYS_PCS_CONTROL_1, SGMII_AN_ENABLE); + + /* SGMII AN mode setting */ + mmio_write_32(SGMII_BASE + SGMSYS_SGMII_MODE, SGMII_AN_MODE); + +#if defined(SGMII_PN_SWAP) + /* SGMII PN SWAP setting */ + mmio_setbits_32(SGMII_BASE + SGMSYS_QPHY_WRAP_CTRL, + SGMII_PN_SWAP_TX_RX); +#endif + + /* Release PHYA power down state */ + mmio_clrsetbits_32(SGMII_BASE + SGMSYS_QPHY_PWR_STATE_CTRL, + SGMII_PHYA_PWD, 0); +} + +static void mtk_sgmii_force_init(struct mtk_eth_priv *priv) +{ + /* Set SGMII GEN2 speed(2.5G) */ + mmio_setbits_32(SGMII_BASE + ANA_RG3_OFFS, SGMSYS_SPEED_2500); + + /* Disable SGMII AN */ + mmio_clrbits_32(SGMII_BASE + SGMSYS_PCS_CONTROL_1, SGMII_AN_ENABLE); + + /* SGMII force mode setting */ + mmio_write_32(SGMII_BASE + SGMSYS_SGMII_MODE, SGMII_FORCE_MODE); + +#if defined(SGMII_PN_SWAP) + /* SGMII PN SWAP setting */ + mmio_setbits_32(SGMII_BASE + SGMSYS_QPHY_WRAP_CTRL, + SGMII_PN_SWAP_TX_RX); +#endif + + /* Release PHYA power down state */ + mmio_clrsetbits_32(SGMII_BASE + SGMSYS_QPHY_PWR_STATE_CTRL, + SGMII_PHYA_PWD, 0); +} +#endif /* PHY_INTERFACE_MODE_SGMII || PHY_INTERFACE_MODE_2500BASEX */ + +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_USXGMII +static void mtk_xfi_pll_enable(struct mtk_eth_priv *priv) +{ + /* Add software workaround for USXGMII PLL TCL issue */ + mmio_write_32(XFI_PLL_BASE + XFI_PLL_ANA_GLB8, RG_XFI_PLL_ANA_SWWA); + mmio_setbits_32(XFI_PLL_BASE + XFI_PLL_DIG_GLB8, RG_XFI_PLL_EN); +} + +static void mtk_usxgmii_reset(struct mtk_eth_priv *priv) +{ +#if GMAC_ID == 1 + mmio_write_32(TOPRGU_BASE + 0xFC, 0x0000A004); + mmio_write_32(TOPRGU_BASE + 0x18, 0x88F0A004); + mmio_write_32(TOPRGU_BASE + 0xFC, 0x00000000); + mmio_write_32(TOPRGU_BASE + 0x18, 0x88F00000); + mmio_write_32(TOPRGU_BASE + 0x18, 0x00F00000); +#elif GMAC_ID == 2 + mmio_write_32(TOPRGU_BASE + 0xFC, 0x00005002); + mmio_write_32(TOPRGU_BASE + 0x18, 0x88F05002); + mmio_write_32(TOPRGU_BASE + 0xFC, 0x00000000); + mmio_write_32(TOPRGU_BASE + 0x18, 0x88F00000); + mmio_write_32(TOPRGU_BASE + 0x18, 0x00F00000); +#endif + + mdelay(10); +} + +static void mtk_usxgmii_setup_phya_an_10000(struct mtk_eth_priv *priv) +{ + mmio_write_32(USXGMII_BASE + 0x810, 0x000FFE6D); + mmio_write_32(USXGMII_BASE + 0x818, 0x07B1EC7B); + mmio_write_32(USXGMII_BASE + 0x80C, 0x30000000); + udelay(2); + mmio_write_32(USXGMII_BASE + 0x80C, 0x10000000); + udelay(2); + mmio_write_32(USXGMII_BASE + 0x80C, 0x00000000); + + mmio_write_32(XFI_PEXTP_BASE + 0x9024, 0x00C9071C); + mmio_write_32(XFI_PEXTP_BASE + 0x2020, 0xAA8585AA); + mmio_write_32(XFI_PEXTP_BASE + 0x2030, 0x0C020707); + mmio_write_32(XFI_PEXTP_BASE + 0x2034, 0x0E050F0F); + mmio_write_32(XFI_PEXTP_BASE + 0x2040, 0x00140032); + mmio_write_32(XFI_PEXTP_BASE + 0x50F0, 0x00C014AA); + mmio_write_32(XFI_PEXTP_BASE + 0x50E0, 0x3777C12B); + mmio_write_32(XFI_PEXTP_BASE + 0x506C, 0x005F9CFF); + mmio_write_32(XFI_PEXTP_BASE + 0x5070, 0x9D9DFAFA); + mmio_write_32(XFI_PEXTP_BASE + 0x5074, 0x27273F3F); + mmio_write_32(XFI_PEXTP_BASE + 0x5078, 0xA7883C68); + mmio_write_32(XFI_PEXTP_BASE + 0x507C, 0x11661166); + mmio_write_32(XFI_PEXTP_BASE + 0x5080, 0x0E000AAF); + mmio_write_32(XFI_PEXTP_BASE + 0x5084, 0x08080D0D); + mmio_write_32(XFI_PEXTP_BASE + 0x5088, 0x02030909); + mmio_write_32(XFI_PEXTP_BASE + 0x50E4, 0x0C0C0000); + mmio_write_32(XFI_PEXTP_BASE + 0x50E8, 0x04040000); + mmio_write_32(XFI_PEXTP_BASE + 0x50EC, 0x0F0F0C06); + mmio_write_32(XFI_PEXTP_BASE + 0x50A8, 0x506E8C8C); + mmio_write_32(XFI_PEXTP_BASE + 0x6004, 0x18190000); + mmio_write_32(XFI_PEXTP_BASE + 0x00F8, 0x01423342); + mmio_write_32(XFI_PEXTP_BASE + 0x00F4, 0x80201F20); + mmio_write_32(XFI_PEXTP_BASE + 0x0030, 0x00050C00); + mmio_write_32(XFI_PEXTP_BASE + 0x0070, 0x02002800); + udelay(2); + mmio_write_32(XFI_PEXTP_BASE + 0x30B0, 0x00000020); + mmio_write_32(XFI_PEXTP_BASE + 0x3028, 0x00008A01); + mmio_write_32(XFI_PEXTP_BASE + 0x302C, 0x0000A884); + mmio_write_32(XFI_PEXTP_BASE + 0x3024, 0x00083002); + mmio_write_32(XFI_PEXTP_BASE + 0x3010, 0x00022220); + mmio_write_32(XFI_PEXTP_BASE + 0x5064, 0x0F020A01); + mmio_write_32(XFI_PEXTP_BASE + 0x50B4, 0x06100600); + mmio_write_32(XFI_PEXTP_BASE + 0x3048, 0x40704000); + mmio_write_32(XFI_PEXTP_BASE + 0x3050, 0xA8000000); + mmio_write_32(XFI_PEXTP_BASE + 0x3054, 0x000000AA); + mmio_write_32(XFI_PEXTP_BASE + 0x306C, 0x00000F00); + mmio_write_32(XFI_PEXTP_BASE + 0xA060, 0x00040000); + mmio_write_32(XFI_PEXTP_BASE + 0x90D0, 0x00000001); + mmio_write_32(XFI_PEXTP_BASE + 0x0070, 0x0200E800); + udelay(150); + mmio_write_32(XFI_PEXTP_BASE + 0x0070, 0x0200C111); + udelay(2); + mmio_write_32(XFI_PEXTP_BASE + 0x0070, 0x0200C101); + udelay(15); + mmio_write_32(XFI_PEXTP_BASE + 0x0070, 0x0202C111); + udelay(2); + mmio_write_32(XFI_PEXTP_BASE + 0x0070, 0x0202C101); + udelay(100); + mmio_write_32(XFI_PEXTP_BASE + 0x30B0, 0x00000030); + mmio_write_32(XFI_PEXTP_BASE + 0x00F4, 0x80201F00); + mmio_write_32(XFI_PEXTP_BASE + 0x3040, 0x30000000); + udelay(400); +} + +static void mtk_usxgmii_an_init(struct mtk_eth_priv *priv) +{ +#if defined(SWITCH_MT7988) && GMAC_ID == 0 + return; +#endif + + mtk_xfi_pll_enable(priv); + mtk_usxgmii_reset(priv); + mtk_usxgmii_setup_phya_an_10000(priv); +} + +static void mtk_xmac_init(struct mtk_eth_priv *priv) +{ + mtk_usxgmii_an_init(priv); + + /* Set GMAC to the correct mode */ + mtk_ethsys_rmw(priv, ETHSYS_SYSCFG0_REG, + SYSCFG0_GE_MODE_M << SYSCFG0_GE_MODE_S(GMAC_ID), 0); + +#if GMAC_ID == 1 + mtk_infra_rmw(priv, TOPMISC_NETSYS_PCS_MUX, + NETSYS_PCS_MUX_MASK, MUX_G2_USXGMII_SEL); +#elif GMAC_ID == 2 + mtk_gmac_rmw(priv, XGMAC_STS(GMAC_ID), 0, XGMAC_FORCE_LINK); +#endif + + /* Force GMAC link down */ + mtk_gmac_write(priv, GMAC_PORT_MCR(GMAC_ID), FORCE_MODE); +} +#else +static void mtk_mac_init(struct mtk_eth_priv *priv) +{ + int i, ge_mode = 0; + uint32_t mcr; + +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_RGMII + ge_mode = GE_MODE_RGMII; +#elif (GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_SGMII) || \ + (GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_2500BASEX) + if (MTK_HAS_CAPS(SOC_CAPS, MTK_GMAC2_U3_QPHY)) { + mtk_infra_rmw(priv, USB_PHY_SWITCH_REG, QPHY_SEL_MASK, + SGMII_QPHY_SEL); + } + + ge_mode = GE_MODE_RGMII; + mtk_ethsys_rmw(priv, ETHSYS_SYSCFG0_REG, SYSCFG0_SGMII_SEL_M, + SYSCFG0_SGMII_SEL(GMAC_ID)); + if (GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_SGMII) + mtk_sgmii_an_init(priv); + else + mtk_sgmii_force_init(priv); +#endif + + /* set the gmac to the right mode */ + mtk_ethsys_rmw(priv, ETHSYS_SYSCFG0_REG, + SYSCFG0_GE_MODE_M << SYSCFG0_GE_MODE_S(GMAC_ID), + ge_mode << SYSCFG0_GE_MODE_S(GMAC_ID)); + + if (GMAC_FORCE_MODE) { + mcr = (IPG_96BIT_WITH_SHORT_IPG << IPG_CFG_S) | + (MAC_RX_PKT_LEN_1536 << MAC_RX_PKT_LEN_S) | + MAC_MODE | FORCE_MODE | + MAC_TX_EN | MAC_RX_EN | + BKOFF_EN | BACKPR_EN | + FORCE_LINK; + + switch (GMAC_FORCE_SPEED) { + case SPEED_10: + mcr |= SPEED_10M << FORCE_SPD_S; + break; + case SPEED_100: + mcr |= SPEED_100M << FORCE_SPD_S; + break; + case SPEED_1000: + case SPEED_2500: + mcr |= SPEED_1000M << FORCE_SPD_S; + break; + } + + if (GMAC_FORCE_FULL_DUPLEX) + mcr |= FORCE_DPX; + + mtk_gmac_write(priv, GMAC_PORT_MCR(GMAC_ID), mcr); + } + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_GMAC1_TRGMII) && + !MTK_HAS_CAPS(SOC_CAPS, MTK_TRGMII_MT7621_CLK)) { + /* Lower Tx Driving for TRGMII path */ + for (i = 0 ; i < NUM_TRGMII_CTRL; i++) + mtk_gmac_write(priv, GMAC_TRGMII_TD_ODT(i), + (8 << TD_DM_DRVP_S) | + (8 << TD_DM_DRVN_S)); + + mtk_gmac_rmw(priv, GMAC_TRGMII_RCK_CTRL, 0, + RX_RST | RXC_DQSISEL); + mtk_gmac_rmw(priv, GMAC_TRGMII_RCK_CTRL, RX_RST, 0); + } +} +#endif /* PHY_INTERFACE_MODE_USXGMII */ + +static void mtk_eth_fifo_init(struct mtk_eth_priv *priv) +{ + uintptr_t pkt_base = priv->pkt_pool_pa; + struct mtk_tx_dma_v2 *txd; + struct mtk_rx_dma_v2 *rxd; + int i; + + mtk_pdma_rmw(priv, PDMA_GLO_CFG_REG, 0xffff0000, 0); + udelay(500); + + memset(priv->tx_ring_noc, 0, NUM_TX_DESC * TXD_SIZE); + memset(priv->rx_ring_noc, 0, NUM_RX_DESC * RXD_SIZE); + memset((void *)priv->pkt_pool_va, 0xff, PKT_TOTAL_BUF_SIZE); + + flush_dcache_range(priv->pkt_pool_va, PKT_TOTAL_BUF_SIZE); + + priv->rx_dma_owner_idx0 = 0; + priv->tx_cpu_owner_idx0 = 0; + + for (i = 0; i < NUM_TX_DESC; i++) { + txd = priv->tx_ring_noc + i * TXD_SIZE; + + txd->txd1 = (uint32_t)pkt_base; + txd->txd2 = PDMA_TXD2_DDONE | PDMA_TXD2_LS0; + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + txd->txd5 = PDMA_V2_TXD5_FPORT_SET(GMAC_ID == 2 ? + 15 : GMAC_ID + 1); + else if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2)) + txd->txd5 = PDMA_V2_TXD5_FPORT_SET(GMAC_ID + 1); + else + txd->txd4 = PDMA_V1_TXD4_FPORT_SET(GMAC_ID + 1); + + pkt_base += PKTSIZE_ALIGN; + } + + for (i = 0; i < NUM_RX_DESC; i++) { + rxd = priv->rx_ring_noc + i * RXD_SIZE; + + rxd->rxd1 = (uint32_t)pkt_base; + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2) || + MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + rxd->rxd2 = PDMA_V2_RXD2_PLEN0_SET(PKTSIZE_ALIGN); + else + rxd->rxd2 = PDMA_V1_RXD2_PLEN0_SET(PKTSIZE_ALIGN); + + pkt_base += PKTSIZE_ALIGN; + } + + mtk_pdma_write(priv, TX_BASE_PTR_REG(0), (uint32_t)priv->tx_ring_pa); + mtk_pdma_write(priv, TX_MAX_CNT_REG(0), NUM_TX_DESC); + mtk_pdma_write(priv, TX_CTX_IDX_REG(0), priv->tx_cpu_owner_idx0); + + mtk_pdma_write(priv, RX_BASE_PTR_REG(0), (uint32_t)priv->rx_ring_pa); + mtk_pdma_write(priv, RX_MAX_CNT_REG(0), NUM_RX_DESC); + mtk_pdma_write(priv, RX_CRX_IDX_REG(0), NUM_RX_DESC - 1); + + mtk_pdma_write(priv, PDMA_RST_IDX_REG, RST_DTX_IDX0 | RST_DRX_IDX0); +} + +int mtk_eth_start(void) +{ + struct mtk_eth_priv *priv = &_eth_priv; + uint32_t i; + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2) || + MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + mmio_setbits_32(FE_BASE + FE_GLO_MISC_REG, PDMA_VER_V2); + + /* Packets forward to PDMA */ + mtk_gdma_write(priv, GMAC_ID, GDMA_IG_CTRL_REG, GDMA_FWD_TO_CPU); + + for (i = 0; i < GDMA_COUNT; i++) { + if (i == GMAC_ID) + continue; + + mtk_gdma_write(priv, i, GDMA_IG_CTRL_REG, GDMA_FWD_DISCARD); + } + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) { +#if defined(SWITCH_MT7988) && GMAC_ID == 0 + mtk_gdma_write(priv, GMAC_ID, GDMA_IG_CTRL_REG, + GDMA_BRIDGE_TO_CPU); +#endif + + mtk_gdma_write(priv, GMAC_ID, GDMA_EG_CTRL_REG, + GDMA_CPU_BRIDGE_EN); + } + + udelay(500); + + mtk_eth_fifo_init(priv); + +#if !defined(PHY_MODE) + mt753x_mac_control(priv, true); +#else + /* Start PHY */ + ret = mtk_phy_start(priv); + if (ret) + return ret; +#endif + + mtk_pdma_rmw(priv, PDMA_GLO_CFG_REG, 0, + TX_WB_DDONE | RX_DMA_EN | TX_DMA_EN); + udelay(500); + + return 0; +} + +void mtk_eth_stop(void) +{ + struct mtk_eth_priv *priv = &_eth_priv; + +#if !defined(PHY_MODE) + mt753x_mac_control(priv, false); +#endif + + mtk_pdma_rmw(priv, PDMA_GLO_CFG_REG, + TX_WB_DDONE | RX_DMA_EN | TX_DMA_EN, 0); + udelay(500); + + wait_for_bit_32(FE_BASE + PDMA_BASE + PDMA_GLO_CFG_REG, + RX_DMA_BUSY | TX_DMA_BUSY, false, 5000); +} + +void mtk_eth_write_hwaddr(const uint8_t *addr) +{ + struct mtk_eth_priv *priv = &_eth_priv; + uint32_t macaddr_lsb, macaddr_msb; + const uint8_t *mac = addr; + + if (!mac) + return; + + macaddr_msb = ((uint32_t)mac[0] << 8) | (uint32_t)mac[1]; + macaddr_lsb = ((uint32_t)mac[2] << 24) | ((uint32_t)mac[3] << 16) | + ((uint32_t)mac[4] << 8) | (uint32_t)mac[5]; + + mtk_gdma_write(priv, GMAC_ID, GDMA_MAC_MSB_REG, macaddr_msb); + mtk_gdma_write(priv, GMAC_ID, GDMA_MAC_LSB_REG, macaddr_lsb); +} + +int mtk_eth_send(const void *packet, uint32_t length) +{ + struct mtk_eth_priv *priv = &_eth_priv; + uint32_t idx = priv->tx_cpu_owner_idx0; + struct mtk_tx_dma_v2 *txd; + void *pkt_base; + + txd = priv->tx_ring_noc + idx * TXD_SIZE; + + if (!(txd->txd2 & PDMA_TXD2_DDONE)) { + VERBOSE("mtk-eth: TX DMA descriptor ring is full\n"); + return -EPERM; + } + + pkt_base = (void *)((uintptr_t)txd->txd1 - priv->pkt_pool_pa + priv->pkt_pool_va); + memcpy(pkt_base, packet, length); + clean_dcache_range((uintptr_t)pkt_base, + roundup(length, ARCH_DMA_MINALIGN)); + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2) || + MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + txd->txd2 = PDMA_TXD2_LS0 | PDMA_V2_TXD2_SDL0_SET(length); + else + txd->txd2 = PDMA_TXD2_LS0 | PDMA_V1_TXD2_SDL0_SET(length); + + priv->tx_cpu_owner_idx0 = (priv->tx_cpu_owner_idx0 + 1) % NUM_TX_DESC; + mtk_pdma_write(priv, TX_CTX_IDX_REG(0), priv->tx_cpu_owner_idx0); + + return 0; +} + +int mtk_eth_recv(void **packetp) +{ + struct mtk_eth_priv *priv = &_eth_priv; + uint32_t idx = priv->rx_dma_owner_idx0; + struct mtk_rx_dma_v2 *rxd; + void *pkt_base; + uint32_t length; + + rxd = priv->rx_ring_noc + idx * RXD_SIZE; + + if (!(rxd->rxd2 & PDMA_RXD2_DDONE)) { + VERBOSE("mtk-eth: RX DMA descriptor ring is empty\n"); + return -EAGAIN; + } + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2) || + MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + length = PDMA_V2_RXD2_PLEN0_GET(rxd->rxd2); + else + length = PDMA_V1_RXD2_PLEN0_GET(rxd->rxd2); + + pkt_base = (void *)((uintptr_t)rxd->rxd1 - priv->pkt_pool_pa + priv->pkt_pool_va); + inv_dcache_range((uintptr_t)pkt_base, + roundup(length, ARCH_DMA_MINALIGN)); + + if (packetp) + *packetp = pkt_base; + + return length; +} + +int mtk_eth_free_pkt(void *packet) +{ + struct mtk_eth_priv *priv = &_eth_priv; + uint32_t idx = priv->rx_dma_owner_idx0; + struct mtk_rx_dma_v2 *rxd; + + rxd = priv->rx_ring_noc + idx * RXD_SIZE; + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2) || + MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + rxd->rxd2 = PDMA_V2_RXD2_PLEN0_SET(PKTSIZE_ALIGN); + else + rxd->rxd2 = PDMA_V1_RXD2_PLEN0_SET(PKTSIZE_ALIGN); + + mtk_pdma_write(priv, RX_CRX_IDX_REG(0), idx); + priv->rx_dma_owner_idx0 = (priv->rx_dma_owner_idx0 + 1) % NUM_RX_DESC; + + return 0; +} + +static int mtk_eth_setup_rings_base(struct mtk_eth_priv *priv) +{ + uintptr_t rings_pa = DMA_BUF_ADDR, rings_va = rings_pa; + uint32_t tx_ring_size, rx_ring_size; + int ret = 0; + + tx_ring_size = TXD_SIZE * NUM_TX_DESC; + tx_ring_size = round_up(tx_ring_size, ARCH_DMA_MINALIGN); + + rx_ring_size = RXD_SIZE * NUM_RX_DESC; + rx_ring_size = round_up(rx_ring_size, ARCH_DMA_MINALIGN); + +#ifdef DMA_BUF_REMAP + ret = mmap_add_dynamic_region(rings_pa, rings_va, TX_RX_RING_SIZE, + MT_DEVICE | MT_RW); + if (ret) { + ERROR("mtk-eth: Map DMA ring pool failed with %d\n", ret); + return -EFAULT; + } +#endif + + priv->tx_ring_noc = (void *)rings_va; + priv->rx_ring_noc = (void *)rings_va + tx_ring_size; + + priv->tx_ring_pa = rings_pa; + priv->rx_ring_pa = rings_pa + tx_ring_size; + + return ret; +} + +static int mtk_eth_setup_packet_base(struct mtk_eth_priv *priv) +{ + uintptr_t pkt_pa = DMA_BUF_ADDR + TX_RX_RING_SIZE, pkt_va = pkt_pa; + int ret = 0; + +#ifdef DMA_BUF_REMAP + ret = mmap_add_dynamic_region(pkt_pa, pkt_va, ALIGNED_PKT_BUF_SIZE, + MT_MEMORY | MT_RW); + if (ret) { + ERROR("mtk-eth: Map DMA packet pool failed with %d\n", ret); + return -EFAULT; + } +#endif + + priv->pkt_pool_pa = pkt_pa; + priv->pkt_pool_va = pkt_va; + + return ret; +} + +static void mtk_eth_reset(struct mtk_eth_priv *priv) +{ + uint32_t mask = ETHSYS_RST_FE | ETHSYS_RST_GMAC; + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2) || + MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + mtk_ethsys_rmw(priv, ETHSYS_FE_RST_CHK_IDLE_EN, 0xffffffff, 0); + + /* PPE */ + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2)) { + mask |= ETHSYS_RST_PPE0_V2; + if (MTK_HAS_CAPS(SOC_CAPS, MTK_RSTCTRL_PPE1)) + mask |= ETHSYS_RST_PPE1_V2; + } else if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) { + mask |= ETHSYS_RST_PPE0_V3; + if (MTK_HAS_CAPS(SOC_CAPS, MTK_RSTCTRL_PPE1)) + mask |= ETHSYS_RST_PPE1_V3; + if (MTK_HAS_CAPS(SOC_CAPS, MTK_RSTCTRL_PPE2)) + mask |= ETHSYS_RST_PPE2_V3; + } else { + mask |= ETHSYS_RST_PPE0_V1; + } + + mtk_ethsys_rmw(priv, ETHSYS_RSTCTL_REG, 0, mask); + udelay(1000); + mtk_ethsys_rmw(priv, ETHSYS_RSTCTL_REG, mask, 0); + mdelay(10); + + if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V2)) + mtk_ethsys_rmw(priv, ETHSYS_FE_RST_CHK_IDLE_EN, 0xffffffff, 0x3ffffff); + else if (MTK_HAS_CAPS(SOC_CAPS, MTK_NETSYS_V3)) + mtk_ethsys_rmw(priv, ETHSYS_FE_RST_CHK_IDLE_EN, 0xffffffff, 0x6F8FF); +} + +static int mtk_eth_probe(struct mtk_eth_priv *priv) +{ + /* Prepare for tx/rx rings */ + mtk_eth_setup_rings_base(priv); + mtk_eth_setup_packet_base(priv); + + mtk_pll_eth_init(); + + mtk_eth_reset(priv); + + mtk_ethsys_rmw(priv, ETHSYS_CLKCFG1, 0, 0xffffffff); + + /* Set MAC mode */ +#if GMAC_INTERFACE_MODE == PHY_INTERFACE_MODE_USXGMII + mtk_xmac_init(priv); +#else + mtk_mac_init(priv); +#endif + +#if defined(PHY_MODE) + /* Probe phy if switch is not specified */ + return mtk_phy_probe(dev); +#else + /* Initialize switch */ + return mt753x_switch_init(priv); +#endif +} + +int mtk_mdio_read(uint8_t addr, int devad, uint16_t reg) +{ + struct mtk_eth_priv *priv = &_eth_priv; + + if (devad < 0) + return mtk_mii_read(priv, addr, reg); + else + return mtk_mmd_read(priv, addr, devad, reg); +} + +int mtk_mdio_write(uint8_t addr, int devad, uint16_t reg, uint16_t val) +{ + struct mtk_eth_priv *priv = &_eth_priv; + + if (devad < 0) + return mtk_mii_write(priv, addr, reg, val); + else + return mtk_mmd_write(priv, addr, devad, reg, val); +} + +int mtk_eth_wait_connection_ready(uint32_t timeout_ms) +{ + struct mtk_eth_priv *priv = &_eth_priv; + +#if defined(PHY_MODE) + return -ENOTSUP; +#else + return mt753x_switch_wait_port_ready(priv, timeout_ms); +#endif +} + +void mtk_eth_cleanup(void) +{ +#ifdef DMA_BUF_REMAP + struct mtk_eth_priv *priv = &_eth_priv; +#endif + + /* Stop possibly started DMA */ + mtk_eth_stop(); + +#ifdef DMA_BUF_REMAP + /* Unmap DMA ring pool */ + mmap_remove_dynamic_region((uintptr_t)priv->tx_ring_noc, + TX_RX_RING_SIZE); + mmap_remove_dynamic_region(priv->pkt_pool_va, ALIGNED_PKT_BUF_SIZE); +#endif + + eth_ready = false; +} + +int mtk_eth_init(void) +{ + struct mtk_eth_priv *priv = &_eth_priv; + int ret; + + if (eth_ready) + return -EBUSY; + + memset(&_eth_priv, 0, sizeof(_eth_priv)); + + ret = mtk_eth_probe(priv); + if (!ret) + eth_ready = true; + + return ret; +} diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth.h new file mode 100644 index 000000000..05577ace0 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _MTK_ETH_H_ +#define _MTK_ETH_H_ + +#include +#include +#include + +enum mkt_eth_capabilities { + MTK_TRGMII_BIT, + MTK_TRGMII_MT7621_CLK_BIT, + MTK_U3_COPHY_V2_BIT, + MTK_INFRA_BIT, + MTK_NETSYS_V2_BIT, + MTK_NETSYS_V3_BIT, + MTK_RSTCTRL_PPE1_BIT, + MTK_RSTCTRL_PPE2_BIT, + + /* PATH BITS */ + MTK_ETH_PATH_GMAC1_TRGMII_BIT, + MTK_ETH_PATH_GMAC2_SGMII_BIT, +}; + +#define MTK_TRGMII BIT(MTK_TRGMII_BIT) +#define MTK_TRGMII_MT7621_CLK BIT(MTK_TRGMII_MT7621_CLK_BIT) +#define MTK_U3_COPHY_V2 BIT(MTK_U3_COPHY_V2_BIT) +#define MTK_INFRA BIT(MTK_INFRA_BIT) +#define MTK_NETSYS_V2 BIT(MTK_NETSYS_V2_BIT) +#define MTK_NETSYS_V3 BIT(MTK_NETSYS_V3_BIT) +#define MTK_RSTCTRL_PPE1 BIT(MTK_RSTCTRL_PPE1_BIT) +#define MTK_RSTCTRL_PPE2 BIT(MTK_RSTCTRL_PPE2_BIT) + +/* Supported path present on SoCs */ +#define MTK_ETH_PATH_GMAC1_TRGMII BIT(MTK_ETH_PATH_GMAC1_TRGMII_BIT) + +#define MTK_ETH_PATH_GMAC2_SGMII BIT(MTK_ETH_PATH_GMAC2_SGMII_BIT) + +#define MTK_GMAC1_TRGMII (MTK_ETH_PATH_GMAC1_TRGMII | MTK_TRGMII) + +#define MTK_GMAC2_U3_QPHY (MTK_ETH_PATH_GMAC2_SGMII | MTK_U3_COPHY_V2 | MTK_INFRA) + +#define PDMA_V1_BASE 0x0800 +#define PDMA_V2_BASE 0x6000 +#define PDMA_V3_BASE 0x6800 + +#define PHY_INTERFACE_MODE_RGMII 0 +#define PHY_INTERFACE_MODE_SGMII 1 +#define PHY_INTERFACE_MODE_2500BASEX 2 +#define PHY_INTERFACE_MODE_USXGMII 3 + +#define SPEED_10 10 +#define SPEED_100 100 +#define SPEED_1000 1000 +#define SPEED_2500 2500 +#define SPEED_10000 10000 + +int mtk_eth_start(void); +void mtk_eth_stop(void); +void mtk_eth_write_hwaddr(const uint8_t *addr); +int mtk_eth_send(const void *packet, uint32_t length); +int mtk_eth_recv(void **packetp); +int mtk_eth_free_pkt(void *packet); + +int mtk_mdio_read(uint8_t addr, int devad, uint16_t reg); +int mtk_mdio_write(uint8_t addr, int devad, uint16_t reg, uint16_t val); + +int mtk_eth_wait_connection_ready(uint32_t timeout_ms); + +void mtk_eth_cleanup(void); +int mtk_eth_init(void); + +#endif /* _MTK_ETH_H_ */ diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth_internal.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth_internal.h new file mode 100644 index 000000000..0b8fc2352 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/eth/mtk_eth_internal.h @@ -0,0 +1,626 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _MTK_ETH_INTERNAL_H_ +#define _MTK_ETH_INTERNAL_H_ + +#include +#include +#include +#include +#include +#include "mtk_eth.h" + +#define MII_BMCR 0x00 /* Basic mode control register */ +#define BMCR_PDOWN 0x0800 /* Enable low power state */ + +#define MII_BMSR 0x01 /* Basic mode status register */ +#define BMSR_LSTATUS 0x0004 /* Link status */ +#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ + +#define __bf_shf(x) (__builtin_ffsll(x) - 1) + +#define FIELD_PREP(_mask, _val) \ + ({ \ + ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask); \ + }) + +#define FIELD_GET(_mask, _reg) \ + ({ \ + (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \ + }) + +#define roundup(x, y) \ + ({ \ + const typeof(y) __y = y; \ + (((x) + (__y - 1)) / __y) * __y; \ + }) + +/** + * wait_for_bit_x() waits for bit set/cleared in register + * + * Function polls register waiting for specific bit(s) change + * (either 0->1 or 1->0). It can fail under one conditions: + * - Timeout + * Function succeeds only if all bits of masked register are set/cleared + * (depending on set option). + * + * @param reg Register that will be read (using read_x()) + * @param mask Bit(s) of register that must be active + * @param set Selects wait condition (bit set or clear) + * @param timeout_ms Timeout (in milliseconds) + * Return: 0 on success, -ETIMEDOUT on failure + */ + +#define BUILD_WAIT_FOR_BIT(sfx, type, read) \ + \ +static inline int wait_for_bit_##sfx(uintptr_t reg, \ + const type mask, \ + const bool set, \ + const unsigned int timeout_ms) \ +{ \ + type val; \ + uint64_t tmo = timeout_init_us(timeout_ms * 1000); \ + \ + while (1) { \ + val = read(reg); \ + \ + if (!set) \ + val = ~val; \ + \ + if ((val & mask) == mask) \ + return 0; \ + \ + if (timeout_elapsed(tmo)) \ + break; \ + \ + udelay(1); \ + } \ + \ + return -ETIMEDOUT; \ +} + +BUILD_WAIT_FOR_BIT(32, uint32_t, mmio_read_32) + +#define MTK_HAS_CAPS(caps, _x) (((caps) & (_x)) == (_x)) + +/* Frame Engine Register Bases */ +#define GDMA1_BASE 0x0500 +#define GDMA2_BASE 0x1500 +#define GDMA3_BASE 0x0540 +#define GMAC_BASE 0x10000 +#define GSW_BASE 0x20000 + +/* Ethernet subsystem registers */ + +#define ETHSYS_SYSCFG0_REG 0x14 +#define SYSCFG0_GE_MODE_S(n) (12 + ((n) * 2)) +#define SYSCFG0_GE_MODE_M 0x3 +#define SYSCFG0_SGMII_SEL_M (0x3 << 8) +#define SYSCFG0_SGMII_SEL(gmac) ((!(gmac)) ? BIT(9) : BIT(8)) + +#define ETHSYS_CLKCFG0_REG 0x2c +#define ETHSYS_TRGMII_CLK_SEL362_5 BIT(11) + +#define ETHSYS_FE_RST_CHK_IDLE_EN 0x28 + +#define ETHSYS_CLKCFG1 0x30 + +#define ETHSYS_RSTCTL_REG 0x34 +#define ETHSYS_RST_PPE0_V1 BIT(31) +#define ETHSYS_RST_PPE0_V2 BIT(30) +#define ETHSYS_RST_PPE0_V3 BIT(29) +#define ETHSYS_RST_PPE1_V2 BIT(31) +#define ETHSYS_RST_PPE1_V3 BIT(30) +#define ETHSYS_RST_PPE2_V3 BIT(31) +#define ETHSYS_RST_GMAC BIT(23) +#define ETHSYS_RST_FE BIT(6) + +/* Top misc registers */ +#define TOPMISC_NETSYS_PCS_MUX 0x84 +#define NETSYS_PCS_MUX_MASK GENMASK(1, 0) +#define MUX_G2_USXGMII_SEL BIT(1) +#define MUX_HSGMII1_G1_SEL BIT(0) + +#define USB_PHY_SWITCH_REG 0x218 +#define QPHY_SEL_MASK 0x3 +#define SGMII_QPHY_SEL 0x2 + +/* SYSCFG0_GE_MODE: GE Modes */ +#define GE_MODE_RGMII 0 +#define GE_MODE_MII 1 +#define GE_MODE_MII_PHY 2 +#define GE_MODE_RMII 3 + +/* SGMII subsystem config registers */ +#define SGMSYS_PCS_CONTROL_1 0x0 +#define SGMII_LINK_STATUS BIT(18) +#define SGMII_AN_ENABLE BIT(12) +#define SGMII_AN_RESTART BIT(9) + +#define SGMSYS_SGMII_MODE 0x20 +#define SGMII_AN_MODE 0x31120103 +#define SGMII_FORCE_MODE 0x31120019 + +#define SGMSYS_QPHY_PWR_STATE_CTRL 0xe8 +#define SGMII_PHYA_PWD BIT(4) + +#define SGMSYS_QPHY_WRAP_CTRL 0xec +#define SGMII_PN_SWAP_TX_RX 0x03 + +#define SGMSYS_GEN2_SPEED 0x2028 +#define SGMSYS_GEN2_SPEED_V2 0x128 +#define SGMSYS_SPEED_2500 BIT(2) + +/* USXGMII subsystem config registers */ +/* Register to control USXGMII XFI PLL digital */ +#define XFI_PLL_DIG_GLB8 0x08 +#define RG_XFI_PLL_EN BIT(31) + +/* Register to control USXGMII XFI PLL analog */ +#define XFI_PLL_ANA_GLB8 0x108 +#define RG_XFI_PLL_ANA_SWWA 0x02283248 + +/* Frame Engine Registers */ +#define PSE_NO_DROP_CFG_REG 0x108 +#define PSE_NO_DROP_GDM1 BIT(1) + +#define FE_GLO_MISC_REG 0x124 +#define PDMA_VER_V2 BIT(4) + +/* PDMA */ +#define TX_BASE_PTR_REG(n) (0x000 + (n) * 0x10) +#define TX_MAX_CNT_REG(n) (0x004 + (n) * 0x10) +#define TX_CTX_IDX_REG(n) (0x008 + (n) * 0x10) +#define TX_DTX_IDX_REG(n) (0x00c + (n) * 0x10) + +#define RX_BASE_PTR_REG(n) (0x100 + (n) * 0x10) +#define RX_MAX_CNT_REG(n) (0x104 + (n) * 0x10) +#define RX_CRX_IDX_REG(n) (0x108 + (n) * 0x10) +#define RX_DRX_IDX_REG(n) (0x10c + (n) * 0x10) + +#define PDMA_GLO_CFG_REG 0x204 +#define TX_WB_DDONE BIT(6) +#define RX_DMA_BUSY BIT(3) +#define RX_DMA_EN BIT(2) +#define TX_DMA_BUSY BIT(1) +#define TX_DMA_EN BIT(0) + +#define PDMA_RST_IDX_REG 0x208 +#define RST_DRX_IDX0 BIT(16) +#define RST_DTX_IDX0 BIT(0) + +/* GDMA */ +#define GDMA_IG_CTRL_REG 0x000 +#define GDM_ICS_EN BIT(22) +#define GDM_TCS_EN BIT(21) +#define GDM_UCS_EN BIT(20) +#define STRP_CRC BIT(16) +#define MYMAC_DP_S 12 +#define MYMAC_DP_M 0xf000 +#define BC_DP_S 8 +#define BC_DP_M 0xf00 +#define MC_DP_S 4 +#define MC_DP_M 0xf0 +#define UN_DP_S 0 +#define UN_DP_M 0x0f + +#define GDMA_EG_CTRL_REG 0x004 +#define GDMA_CPU_BRIDGE_EN BIT(31) + +#define GDMA_MAC_LSB_REG 0x008 + +#define GDMA_MAC_MSB_REG 0x00c + +/* MYMAC_DP/BC_DP/MC_DP/UN_DP: Destination ports */ +#define DP_PDMA 0 +#define DP_GDMA1 1 +#define DP_GDMA2 2 +#define DP_PPE 4 +#define DP_QDMA 5 +#define DP_DISCARD 7 + +/* GMAC Registers */ + +#define GMAC_PIAC_REG 0x0004 +#define PHY_ACS_ST BIT(31) +#define MDIO_REG_ADDR_S 25 +#define MDIO_REG_ADDR_M 0x3e000000 +#define MDIO_PHY_ADDR_S 20 +#define MDIO_PHY_ADDR_M 0x1f00000 +#define MDIO_CMD_S 18 +#define MDIO_CMD_M 0xc0000 +#define MDIO_ST_S 16 +#define MDIO_ST_M 0x30000 +#define MDIO_RW_DATA_S 0 +#define MDIO_RW_DATA_M 0xffff + +#define GMAC_XGMAC_STS_REG 0x000c +#define P1_XGMAC_FORCE_LINK BIT(15) + +#define GMAC_MAC_MISC_REG 0x0010 + +#define GMAC_GSW_CFG_REG 0x0080 +#define GSWTX_IPG_M 0xF0000 +#define GSWTX_IPG_S 16 +#define GSWRX_IPG_M 0xF +#define GSWRX_IPG_S 0 + +/* MDIO_CMD: MDIO commands */ +#define MDIO_CMD_ADDR 0 +#define MDIO_CMD_WRITE 1 +#define MDIO_CMD_READ 2 +#define MDIO_CMD_READ_C45 3 + +/* MDIO_ST: MDIO start field */ +#define MDIO_ST_C45 0 +#define MDIO_ST_C22 1 + +#define GMAC_PORT_MCR(p) (0x0100 + (p) * 0x100) +#define MAC_RX_PKT_LEN_S 24 +#define MAC_RX_PKT_LEN_M 0x3000000 +#define IPG_CFG_S 18 +#define IPG_CFG_M 0xc0000 +#define MAC_MODE BIT(16) +#define FORCE_MODE BIT(15) +#define MAC_TX_EN BIT(14) +#define MAC_RX_EN BIT(13) +#define DEL_RXFIFO_CLR BIT(12) +#define BKOFF_EN BIT(9) +#define BACKPR_EN BIT(8) +#define FORCE_RX_FC BIT(5) +#define FORCE_TX_FC BIT(4) +#define FORCE_SPD_S 2 +#define FORCE_SPD_M 0x0c +#define FORCE_DPX BIT(1) +#define FORCE_LINK BIT(0) + +/* Values of IPG_CFG */ +#define IPG_96BIT 0 +#define IPG_96BIT_WITH_SHORT_IPG 1 +#define IPG_64BIT 2 + +/* MAC_RX_PKT_LEN: Max RX packet length */ +#define MAC_RX_PKT_LEN_1518 0 +#define MAC_RX_PKT_LEN_1536 1 +#define MAC_RX_PKT_LEN_1552 2 +#define MAC_RX_PKT_LEN_JUMBO 3 + +/* FORCE_SPD: Forced link speed */ +#define SPEED_10M 0 +#define SPEED_100M 1 +#define SPEED_1000M 2 + +#define GMAC_TRGMII_RCK_CTRL 0x300 +#define RX_RST BIT(31) +#define RXC_DQSISEL BIT(30) + +#define GMAC_TRGMII_TD_ODT(n) (0x354 + (n) * 8) +#define TD_DM_DRVN_S 4 +#define TD_DM_DRVN_M 0xf0 +#define TD_DM_DRVP_S 0 +#define TD_DM_DRVP_M 0x0f + +/* XGMAC Status Registers */ +#define XGMAC_STS(x) (((x) == 2) ? 0x001C : 0x000C) +#define XGMAC_FORCE_LINK BIT(15) + +/* XGMAC Registers */ +#define XGMAC_PORT_MCR(x) (0x2000 + (((x) - 1) * 0x1000)) +#define XGMAC_TRX_DISABLE 0xf +#define XGMAC_FORCE_TX_FC BIT(5) +#define XGMAC_FORCE_RX_FC BIT(4) + +/* MT7530 Registers */ + +#define PCR_REG(p) (0x2004 + (p) * 0x100) +#define PORT_MATRIX_S 16 +#define PORT_MATRIX_M 0xff0000 + +#define PVC_REG(p) (0x2010 + (p) * 0x100) +#define STAG_VPID_S 16 +#define STAG_VPID_M 0xffff0000 +#define VLAN_ATTR_S 6 +#define VLAN_ATTR_M 0xc0 + +/* VLAN_ATTR: VLAN attributes */ +#define VLAN_ATTR_USER 0 +#define VLAN_ATTR_STACK 1 +#define VLAN_ATTR_TRANSLATION 2 +#define VLAN_ATTR_TRANSPARENT 3 + +#define PMCR_REG(p) (0x3000 + (p) * 0x100) +/* XXX: all fields of MT7530 are defined under GMAC_PORT_MCR + * MT7531 specific fields are defined below + */ +#define FORCE_MODE_EEE1G BIT(25) +#define FORCE_MODE_EEE100 BIT(26) +#define FORCE_MODE_TX_FC BIT(27) +#define FORCE_MODE_RX_FC BIT(28) +#define FORCE_MODE_DPX BIT(29) +#define FORCE_MODE_SPD BIT(30) +#define FORCE_MODE_LNK BIT(31) +#define MT7531_FORCE_MODE FORCE_MODE_EEE1G | FORCE_MODE_EEE100 |\ + FORCE_MODE_TX_FC | FORCE_MODE_RX_FC | \ + FORCE_MODE_DPX | FORCE_MODE_SPD | \ + FORCE_MODE_LNK +#define MT7988_FORCE_MODE FORCE_MODE_TX_FC | FORCE_MODE_RX_FC | \ + FORCE_MODE_DPX | FORCE_MODE_SPD | \ + FORCE_MODE_LNK + +/* MT7531 SGMII Registers */ +#define MT7531_SGMII_REG_BASE 0x5000 +#define MT7531_SGMII_REG_PORT_BASE 0x1000 +#define MT7531_SGMII_REG(p, r) (MT7531_SGMII_REG_BASE + \ + (p) * MT7531_SGMII_REG_PORT_BASE + (r)) +#define MT7531_PCS_CONTROL_1(p) MT7531_SGMII_REG(((p) - 5), 0x00) +#define MT7531_SGMII_MODE(p) MT7531_SGMII_REG(((p) - 5), 0x20) +#define MT7531_QPHY_PWR_STATE_CTRL(p) MT7531_SGMII_REG(((p) - 5), 0xe8) +#define MT7531_PHYA_CTRL_SIGNAL3(p) MT7531_SGMII_REG(((p) - 5), 0x128) +/* XXX: all fields of MT7531 SGMII are defined under SGMSYS */ + +/* MT753x System Control Register */ +#define SYS_CTRL_REG 0x7000 +#define SW_PHY_RST BIT(2) +#define SW_SYS_RST BIT(1) +#define SW_REG_RST BIT(0) + +/* MT7531 */ +#define MT7531_PHY_IAC 0x701c +/* XXX: all fields are defined under GMAC_PIAC_REG */ + +#define MT7531_CLKGEN_CTRL 0x7500 +#define CLK_SKEW_OUT_S 8 +#define CLK_SKEW_OUT_M 0x300 +#define CLK_SKEW_IN_S 6 +#define CLK_SKEW_IN_M 0xc0 +#define RXCLK_NO_DELAY BIT(5) +#define TXCLK_NO_REVERSE BIT(4) +#define GP_MODE_S 1 +#define GP_MODE_M 0x06 +#define GP_CLK_EN BIT(0) + +/* Values of GP_MODE */ +#define GP_MODE_RGMII 0 +#define GP_MODE_MII 1 +#define GP_MODE_REV_MII 2 + +/* Values of CLK_SKEW_IN */ +#define CLK_SKEW_IN_NO_CHANGE 0 +#define CLK_SKEW_IN_DELAY_100PPS 1 +#define CLK_SKEW_IN_DELAY_200PPS 2 +#define CLK_SKEW_IN_REVERSE 3 + +/* Values of CLK_SKEW_OUT */ +#define CLK_SKEW_OUT_NO_CHANGE 0 +#define CLK_SKEW_OUT_DELAY_100PPS 1 +#define CLK_SKEW_OUT_DELAY_200PPS 2 +#define CLK_SKEW_OUT_REVERSE 3 + +#define HWTRAP_REG 0x7800 +/* MT7530 Modified Hardware Trap Status Registers */ +#define MHWTRAP_REG 0x7804 +#define CHG_TRAP BIT(16) +#define LOOPDET_DIS BIT(14) +#define P5_INTF_SEL_S 13 +#define P5_INTF_SEL_M 0x2000 +#define SMI_ADDR_S 11 +#define SMI_ADDR_M 0x1800 +#define XTAL_FSEL_S 9 +#define XTAL_FSEL_M 0x600 +#define P6_INTF_DIS BIT(8) +#define P5_INTF_MODE_S 7 +#define P5_INTF_MODE_M 0x80 +#define P5_INTF_DIS BIT(6) +#define C_MDIO_BPS BIT(5) +#define CHIP_MODE_S 0 +#define CHIP_MODE_M 0x0f + +/* P5_INTF_SEL: Interface type of Port5 */ +#define P5_INTF_SEL_GPHY 0 +#define P5_INTF_SEL_GMAC5 1 + +/* P5_INTF_MODE: Interface mode of Port5 */ +#define P5_INTF_MODE_GMII_MII 0 +#define P5_INTF_MODE_RGMII 1 + +#define MT7530_P6ECR 0x7830 +#define P6_INTF_MODE_M 0x3 +#define P6_INTF_MODE_S 0 + +/* P6_INTF_MODE: Interface mode of Port6 */ +#define P6_INTF_MODE_RGMII 0 +#define P6_INTF_MODE_TRGMII 1 + +#define NUM_TRGMII_CTRL 5 + +#define MT7530_TRGMII_RD(n) (0x7a10 + (n) * 8) +#define RD_TAP_S 0 +#define RD_TAP_M 0x7f + +#define MT7530_TRGMII_TD_ODT(n) (0x7a54 + (n) * 8) +/* XXX: all fields are defined under GMAC_TRGMII_TD_ODT */ + +/* TOP Signals Status Register */ +#define MT7531_TOP_SIG_SR 0x780c +#define PAD_MCM_SMI_EN BIT(0) +#define PAD_DUAL_SGMII_EN BIT(1) + +/* MT7531 PLLGP Registers */ +#define MT7531_PLLGP_EN 0x7820 +#define EN_COREPLL BIT(2) +#define SW_CLKSW BIT(1) +#define SW_PLLGP BIT(0) + +#define MT7531_PLLGP_CR0 0x78a8 +#define RG_COREPLL_EN BIT(22) +#define RG_COREPLL_POSDIV_S 23 +#define RG_COREPLL_POSDIV_M 0x3800000 +#define RG_COREPLL_SDM_PCW_S 1 +#define RG_COREPLL_SDM_PCW_M 0x3ffffe +#define RG_COREPLL_SDM_PCW_CHG BIT(0) + +/* MT7531 RGMII and SGMII PLL clock */ +#define MT7531_ANA_PLLGP_CR2 0x78b0 +#define MT7531_ANA_PLLGP_CR5 0x78bc + +/* MT7531 GPIO GROUP IOLB SMT0 Control */ +#define MT7531_SMT0_IOLB 0x7f04 +#define SMT_IOLB_5_SMI_MDC_EN BIT(5) + +/* MT7530 GPHY MDIO Indirect Access Registers */ +#define MII_MMD_ACC_CTL_REG 0x0d +#define MMD_CMD_S 14 +#define MMD_CMD_M 0xc000 +#define MMD_DEVAD_S 0 +#define MMD_DEVAD_M 0x1f + +/* MMD_CMD: MMD commands */ +#define MMD_ADDR 0 +#define MMD_DATA 1 +#define MMD_DATA_RW_POST_INC 2 +#define MMD_DATA_W_POST_INC 3 + +#define MII_MMD_ADDR_DATA_REG 0x0e + +/* MT7530 GPHY MDIO MMD Registers */ +#define CORE_PLL_GROUP2 0x401 +#define RG_SYSPLL_EN_NORMAL BIT(15) +#define RG_SYSPLL_VODEN BIT(14) +#define RG_SYSPLL_POSDIV_S 5 +#define RG_SYSPLL_POSDIV_M 0x60 + +#define CORE_PLL_GROUP4 0x403 +#define MT7531_BYPASS_MODE BIT(4) +#define MT7531_POWER_ON_OFF BIT(5) +#define RG_SYSPLL_DDSFBK_EN BIT(12) +#define RG_SYSPLL_BIAS_EN BIT(11) +#define RG_SYSPLL_BIAS_LPF_EN BIT(10) + +#define CORE_PLL_GROUP5 0x404 +#define RG_LCDDS_PCW_NCPO1_S 0 +#define RG_LCDDS_PCW_NCPO1_M 0xffff + +#define CORE_PLL_GROUP6 0x405 +#define RG_LCDDS_PCW_NCPO0_S 0 +#define RG_LCDDS_PCW_NCPO0_M 0xffff + +#define CORE_PLL_GROUP7 0x406 +#define RG_LCDDS_PWDB BIT(15) +#define RG_LCDDS_ISO_EN BIT(13) +#define RG_LCCDS_C_S 4 +#define RG_LCCDS_C_M 0x70 +#define RG_LCDDS_PCW_NCPO_CHG BIT(3) + +#define CORE_PLL_GROUP10 0x409 +#define RG_LCDDS_SSC_DELTA_S 0 +#define RG_LCDDS_SSC_DELTA_M 0xfff + +#define CORE_PLL_GROUP11 0x40a +#define RG_LCDDS_SSC_DELTA1_S 0 +#define RG_LCDDS_SSC_DELTA1_M 0xfff + +#define CORE_GSWPLL_GRP1 0x40d +#define RG_GSWPLL_POSDIV_200M_S 12 +#define RG_GSWPLL_POSDIV_200M_M 0x3000 +#define RG_GSWPLL_EN_PRE BIT(11) +#define RG_GSWPLL_FBKDIV_200M_S 0 +#define RG_GSWPLL_FBKDIV_200M_M 0xff + +#define CORE_GSWPLL_GRP2 0x40e +#define RG_GSWPLL_POSDIV_500M_S 8 +#define RG_GSWPLL_POSDIV_500M_M 0x300 +#define RG_GSWPLL_FBKDIV_500M_S 0 +#define RG_GSWPLL_FBKDIV_500M_M 0xff + +#define CORE_TRGMII_GSW_CLK_CG 0x410 +#define REG_GSWCK_EN BIT(0) +#define REG_TRGMIICK_EN BIT(1) + +/* Extend PHY Control Register 3 */ +#define PHY_EXT_REG_14 0x14 + +/* Fields of PHY_EXT_REG_14 */ +#define PHY_EN_DOWN_SHFIT BIT(4) + +/* Extend PHY Control Register 4 */ +#define PHY_EXT_REG_17 0x17 + +/* Fields of PHY_EXT_REG_17 */ +#define PHY_LINKDOWN_POWER_SAVING_EN BIT(4) + +/* PHY RXADC Control Register 7 */ +#define PHY_DEV1E_REG_0C6 0x0c6 + +/* Fields of PHY_DEV1E_REG_0C6 */ +#define PHY_POWER_SAVING_S 8 +#define PHY_POWER_SAVING_M 0x300 +#define PHY_POWER_SAVING_TX 0x0 + +/* PDMA descriptors */ +struct mtk_rx_dma { + unsigned int rxd1; + unsigned int rxd2; + unsigned int rxd3; + unsigned int rxd4; +} __packed __aligned(4); + +struct mtk_rx_dma_v2 { + unsigned int rxd1; + unsigned int rxd2; + unsigned int rxd3; + unsigned int rxd4; + unsigned int rxd5; + unsigned int rxd6; + unsigned int rxd7; + unsigned int rxd8; +} __packed __aligned(4); + +struct mtk_tx_dma { + unsigned int txd1; + unsigned int txd2; + unsigned int txd3; + unsigned int txd4; +} __packed __aligned(4); + +struct mtk_tx_dma_v2 { + unsigned int txd1; + unsigned int txd2; + unsigned int txd3; + unsigned int txd4; + unsigned int txd5; + unsigned int txd6; + unsigned int txd7; + unsigned int txd8; +} __packed __aligned(4); + +/* PDMA TXD fields */ +#define PDMA_TXD2_DDONE BIT(31) +#define PDMA_TXD2_LS0 BIT(30) +#define PDMA_V1_TXD2_SDL0_M GENMASK(29, 16) +#define PDMA_V1_TXD2_SDL0_SET(_v) FIELD_PREP(PDMA_V1_TXD2_SDL0_M, (_v)) +#define PDMA_V2_TXD2_SDL0_M GENMASK(23, 8) +#define PDMA_V2_TXD2_SDL0_SET(_v) FIELD_PREP(PDMA_V2_TXD2_SDL0_M, (_v)) + +#define PDMA_V1_TXD4_FPORT_M GENMASK(27, 25) +#define PDMA_V1_TXD4_FPORT_SET(_v) FIELD_PREP(PDMA_V1_TXD4_FPORT_M, (_v)) +#define PDMA_V2_TXD4_FPORT_M GENMASK(27, 24) +#define PDMA_V2_TXD4_FPORT_SET(_v) FIELD_PREP(PDMA_V2_TXD4_FPORT_M, (_v)) + +#define PDMA_V2_TXD5_FPORT_M GENMASK(19, 16) +#define PDMA_V2_TXD5_FPORT_SET(_v) FIELD_PREP(PDMA_V2_TXD5_FPORT_M, (_v)) + +/* PDMA RXD fields */ +#define PDMA_RXD2_DDONE BIT(31) +#define PDMA_RXD2_LS0 BIT(30) +#define PDMA_V1_RXD2_PLEN0_M GENMASK(29, 16) +#define PDMA_V1_RXD2_PLEN0_GET(_v) FIELD_GET(PDMA_V1_RXD2_PLEN0_M, (_v)) +#define PDMA_V1_RXD2_PLEN0_SET(_v) FIELD_PREP(PDMA_V1_RXD2_PLEN0_M, (_v)) +#define PDMA_V2_RXD2_PLEN0_M GENMASK(23, 8) +#define PDMA_V2_RXD2_PLEN0_GET(_v) FIELD_GET(PDMA_V2_RXD2_PLEN0_M, (_v)) +#define PDMA_V2_RXD2_PLEN0_SET(_v) FIELD_PREP(PDMA_V2_RXD2_PLEN0_M, (_v)) + +#endif /* _MTK_ETH_INTERNAL_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/gpt/gpt.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/gpt/gpt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/gpt/gpt.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/gpt/gpt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/gpt/mt_gpt.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/gpt/mt_gpt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/gpt/mt_gpt.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/gpt/mt_gpt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/ds3231.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/ds3231.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/ds3231.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/ds3231.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/ds3231.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/ds3231.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/ds3231.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/ds3231.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/i2c.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/i2c.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/i2c.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/i2c.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/i2c_gpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/mt_i2c.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/rt5190.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/rt5190.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/rt5190.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/rt5190.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/rt5190.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/rt5190.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/i2c/rt5190.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/i2c/rt5190.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.c index 48c934f23..835fc5f94 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.c @@ -875,11 +875,6 @@ static void msdc_init_hw(void) msdc_ops_set_ios(INIT_CLK_FREQ, MMC_BUS_WIDTH_1); } -uint64_t mtk_mmc_device_size(void) -{ - return mtk_mmc_device_info.device_size; -} - static const struct mmc_ops mtk_mmc_ops = { .init = msdc_init_hw, .send_cmd = mtk_mmc_send_cmd, @@ -910,3 +905,14 @@ void mtk_mmc_init(uintptr_t reg_base, uintptr_t top_reg_base, mmc_init(&mtk_mmc_ops, DEFAULT_CLK_FREQ, bus_width, 0, &mtk_mmc_device_info); } + +uint64_t mtk_mmc_device_size(void) +{ + return mtk_mmc_device_info.device_size; +} + +uint32_t mtk_mmc_block_count(void) +{ + return (uint32_t)(mtk_mmc_device_info.device_size / + mtk_mmc_device_info.block_size); +} diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.h similarity index 92% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.h index 433287555..b7b573d70 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.h +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/mmc/mtk-sd.h @@ -19,5 +19,6 @@ void mtk_mmc_init(uintptr_t reg_base, uintptr_t top_reg_base, uint32_t bus_width); uint64_t mtk_mmc_device_size(void); +uint32_t mtk_mmc_block_count(void); #endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-atf.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h index 8058f7bc7..6ee6d6ad6 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h @@ -86,6 +86,12 @@ struct snand_mem_org { typedef int (*snand_select_die_t)(struct mtk_snand *snf, uint32_t dieidx); +enum snand_drv { + SNAND_DRV_NO_CHANGE = 0, + SNAND_DRV_8mA = 8, + SNAND_DRV_12mA = 12, +}; + struct snand_flash_info { const char *model; struct snand_id id; @@ -93,6 +99,7 @@ struct snand_flash_info { const struct snand_io_cap *cap_rd; const struct snand_io_cap *cap_pl; snand_select_die_t select_die; + enum snand_drv drv; }; #define SNAND_INFO(_model, _id, _memorg, _cap_rd, _cap_pl, ...) \ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ecc.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ecc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ecc.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ecc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c index f1812bbf0..4ff036e4c 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c @@ -80,65 +80,94 @@ static const struct snand_flash_info snand_flash_ids[] = { SNAND_INFO("W25N512GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x20), SNAND_MEMORG_512M_2K_64, &snand_cap_read_from_cache_quad, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("W25N01GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x21), SNAND_MEMORG_1G_2K_64, &snand_cap_read_from_cache_quad, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("W25M02GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xab, 0x21), SNAND_MEMORG_2G_2K_64_2D, &snand_cap_read_from_cache_quad, &snand_cap_program_load_x4, - mtk_snand_winbond_select_die), + mtk_snand_winbond_select_die, + SNAND_DRV_12mA), SNAND_INFO("W25N02KV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x22), SNAND_MEMORG_2G_2K_128, &snand_cap_read_from_cache_quad, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F1GQ4UAWxx", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0x10), SNAND_MEMORG_1G_2K_64, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F1GQ4UExIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd1), SNAND_MEMORG_1G_2K_128, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F1GQ4UExxH", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd9), SNAND_MEMORG_1G_2K_64, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F1GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf1), SNAND_MEMORG_1G_2K_64, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F2GQ4UExIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd2), SNAND_MEMORG_2G_2K_128, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F2GQ5UExxH", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0x32), SNAND_MEMORG_2G_2K_64, &snand_cap_read_from_cache_quad_a8d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F2GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf2), SNAND_MEMORG_2G_2K_64, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F4GQ4UBxIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd4), SNAND_MEMORG_4G_4K_256, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F4GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf4), SNAND_MEMORG_4G_2K_64, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F2GQ5UExxG", SNAND_ID(SNAND_ID_DYMMY, 0xc8, 0x52), SNAND_MEMORG_2G_2K_128, &snand_cap_read_from_cache_quad_a8d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("GD5F4GQ4UCxIG", SNAND_ID(SNAND_ID_DYMMY, 0xc8, 0xb4), SNAND_MEMORG_4G_4K_256, &snand_cap_read_from_cache_quad_q2d, - &snand_cap_program_load_x4), + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("MX35LF1GE4AB", SNAND_ID(SNAND_ID_DYMMY, 0xc2, 0x12), SNAND_MEMORG_1G_2K_64, @@ -423,8 +452,10 @@ static const struct snand_flash_info snand_flash_ids[] = { SNAND_INFO("FM35Q1GA", SNAND_ID(SNAND_ID_DYMMY, 0xe5, 0x71), SNAND_MEMORG_1G_2K_64, - &snand_cap_read_from_cache_x4, - &snand_cap_program_load_x4), + &snand_cap_read_from_cache_x4_only, + &snand_cap_program_load_x4, + NULL, + SNAND_DRV_12mA), SNAND_INFO("PN26G01A", SNAND_ID(SNAND_ID_DYMMY, 0xa1, 0xe1), SNAND_MEMORG_1G_2K_128, diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-os.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c index a37631b30..bf0dd4267 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c @@ -1845,6 +1845,33 @@ static int mtk_snand_id_probe(struct mtk_snand *snf, return -EINVAL; } +#define MT7622_GPIO_BASE (void *)0x10211000 +#define MT7622_GPIO_DRIV(x) (MT7622_GPIO_BASE + 0x900 + 0x10 * x) + +void mtk_mt7622_snand_adjust_drive(void *dev, enum snand_drv drv) +{ + uint32_t e4, e8; + + e4 = readl(MT7622_GPIO_DRIV(6)) & ~(0x3f00); + e8 = readl(MT7622_GPIO_DRIV(7)) & ~(0x3f00); + + switch (drv) { + case SNAND_DRV_8mA: + e4 |= 0x3f00; + break; + case SNAND_DRV_12mA: + e8 |= 0x3f00; + break; + default: + return; + } + + snand_log_chip(dev, "adjusting SPI-NAND pin drive strength to %umA\n", drv); + + writel(e4, MT7622_GPIO_DRIV(6)); + writel(e8, MT7622_GPIO_DRIV(7)); +} + int mtk_snand_init(void *dev, const struct mtk_snand_platdata *pdata, struct mtk_snand **psnf) { @@ -1888,6 +1915,9 @@ int mtk_snand_init(void *dev, const struct mtk_snand_platdata *pdata, if (ret) return ret; + if (pdata->soc == SNAND_SOC_MT7622 && snand_info->drv) + mtk_mt7622_snand_adjust_drive(dev, snand_info->drv); + rawpage_size = snand_info->memorg.pagesize + snand_info->memorg.sparesize; diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi/mtk_spi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/spi_nand/mtk_spi_nand.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/trng/rng.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/trng/rng.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/trng/rng.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/trng/rng.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/trng/rng.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/trng/rng.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/trng/rng.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/trng/rng.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/uart/aarch32/hsuart.S b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/uart/aarch32/hsuart.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/uart/aarch32/hsuart.S rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/uart/aarch32/hsuart.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/uart/aarch64/hsuart.S b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/uart/aarch64/hsuart.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/uart/aarch64/hsuart.S rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/uart/aarch64/hsuart.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/uart/hsuart.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/uart/hsuart.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/uart/hsuart.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/uart/hsuart.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/drivers/wdt/mtk_wdt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/fsek.mk b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/fsek.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/fsek.mk rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/fsek.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_fsek.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_fsek.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_fsek.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_fsek.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_fsek.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_fsek.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_fsek.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_fsek.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_huk.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_huk.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_huk.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_huk.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_huk.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_huk.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_huk.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_huk.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_roek.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_roek.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_roek.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_roek.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_roek.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_roek.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/fsek/mtk_roek.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/fsek/mtk_roek.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/mbedtls_helper.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/mbedtls_helper.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/mbedtls_helper.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/mbedtls_helper.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/mbedtls_helper.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/mbedtls_helper.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/mbedtls_helper.h rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/mbedtls_helper.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/mtk_ar.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/mtk_ar.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/apsoc_common/mtk_ar.c rename to atf-20240117-bacca82a8/plat/mediatek/apsoc_common/mtk_ar.c diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/net_common.c b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/net_common.c new file mode 100644 index 000000000..38253ea93 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/net_common.c @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include "net_common.h" + +static uint16_t net_ip_id; + +uint16_t compute_ip_checksum(const void *vptr, uint32_t nbytes) +{ + const uint16_t *ptr = vptr; + int sum, oddbyte; + + sum = 0; + while (nbytes > 1) { + sum += *ptr++; + nbytes -= 2; + } + if (nbytes == 1) { + oddbyte = 0; + ((uint8_t *)&oddbyte)[0] = *(uint8_t *)ptr; + ((uint8_t *)&oddbyte)[1] = 0; + sum += oddbyte; + } + sum = (sum >> 16) + (sum & 0xffff); + sum += (sum >> 16); + sum = ~sum & 0xffff; + + return sum; +} + +void net_set_ether(void *xet, const uint8_t *destaddr, const uint8_t *srcaddr, + uint16_t prot) +{ + struct ethernet_hdr *et = xet; + + memcpy(et->dest, destaddr, HWADDR_LEN); + memcpy(et->src, srcaddr, HWADDR_LEN); + et->prot = __htons(prot); +} + +bool net_is_ether(const void *xet, uint32_t len, uint16_t prot) +{ + const struct ethernet_hdr *et = xet; + + if (len < ETHER_HDR_SIZE) + return false; + + return et->prot == __htons(prot); +} + +void net_set_ip_header(void *pkt, struct in_addr dest, struct in_addr source, + uint16_t pkt_len, uint8_t proto) +{ + struct ip_hdr *ip = pkt; + + ip->hl_v = 0x45; + ip->tos = 0; + ip->len = __htons(pkt_len); + ip->prot = proto; + ip->id = __htons(net_ip_id++); + ip->off = __htons(IP_FLAGS_DFRAG); + ip->ttl = 255; + ip->sum = 0; + + memcpy(&ip->src, &source, sizeof(struct in_addr)); + memcpy(&ip->dst, &dest, sizeof(struct in_addr)); + + ip->sum = compute_ip_checksum(ip, IP_HDR_SIZE); +} + +bool ip_checksum_ok(const void *addr, uint32_t nbytes) +{ + return !(compute_ip_checksum(addr, nbytes) & 0xfffe); +} + +bool net_is_ip_packet(const void *pkt, uint32_t len, uint8_t proto) +{ + const struct ip_hdr *ip = pkt; + + /* Before we start poking the header, make sure it is there */ + if (len < IP_HDR_SIZE) + return false; + + /* Check the packet length */ + if (len < be16toh(ip->len)) + return false; + + len = be16toh(ip->len); + if (len < IP_HDR_SIZE) + return false; + + /* Can't deal with anything except IPv4 */ + if ((ip->hl_v & 0xf0) != 0x40) + return false; + + /* Can't deal with IP options (headers != 20 bytes) */ + if ((ip->hl_v & 0x0f) != 0x05) + return false; + + /* Check the Checksum of the header */ + if (!ip_checksum_ok(ip, IP_HDR_SIZE)) + return false; + + if (ip->prot != proto) + return false; + + return true; +} + +void net_set_udp_header(void *pkt, struct in_addr dest, struct in_addr src, + uint16_t dport, uint16_t sport, uint16_t len) +{ + struct udp_hdr *udp = pkt + IP_HDR_SIZE; + + if (len & 1) + ((uint8_t *)pkt)[UDP_HDR_SIZE + len] = 0; + + net_set_ip_header(pkt, dest, src, IP_HDR_SIZE + UDP_HDR_SIZE + len, + IPPROTO_UDP); + + udp->src = __htons(sport); + udp->dst = __htons(dport); + udp->len = __htons(UDP_HDR_SIZE + len); + udp->sum = 0; +} + +bool net_is_udp_packet(const void *pkt, uint32_t len, uint16_t dport) +{ + const struct udp_hdr *udp = pkt; + + if (udp->dst != __htons(dport)) + return false; + + if (__ntohs(udp->len) < UDP_HDR_SIZE + len) + return false; + + return true; +} diff --git a/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/net_common.h b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/net_common.h new file mode 100644 index 000000000..cea3fb37a --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/apsoc_common/net_common.h @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _NET_COMMON_H_ +#define _NET_COMMON_H_ + +#include +#include +#include + +#define HWADDR_LEN 6 + +#define PROT_IP 0x0800 +#define PROT_ARP 0x0806 + +#define ARP_ETHER 1 +#define ARP_PLEN_IP 4 +#define ARP_OP_REQUEST 1 +#define ARP_OP_REPLY 2 + +#define IP_FLAGS_DFRAG 0x4000 + +#define IPPROTO_UDP 17 + +struct ethernet_hdr { + uint8_t dest[HWADDR_LEN]; + uint8_t src[HWADDR_LEN]; + uint16_t prot; +} __attribute__((packed)); + +#define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr)) + +struct arp_req_ip { + uint8_t sha[HWADDR_LEN]; + uint8_t spa[ARP_PLEN_IP]; + uint8_t tha[HWADDR_LEN]; + uint8_t tpa[ARP_PLEN_IP]; +} __attribute__((packed)); + +#define ARP_REQ_IP_HDR_SIZE (sizeof(struct arp_req_ip)) + +struct arp_hdr { + uint16_t hw_type; + uint16_t prot; + uint8_t hw_len; + uint8_t prot_len; + uint16_t op; + uint8_t data[]; +} __attribute__((packed)); + +#define ARP_HDR_SIZE (sizeof(struct arp_hdr)) + +struct in_addr { + union { + struct { + uint8_t s_b1; + uint8_t s_b2; + uint8_t s_b3; + uint8_t s_b4; + } s_un_b; + + uint32_t s_addr; + } s_un; +}; + +struct ip_hdr { + uint8_t hl_v; + uint8_t tos; + uint16_t len; + uint16_t id; + uint16_t off; + uint8_t ttl; + uint8_t prot; + uint16_t sum; + struct in_addr src; + struct in_addr dst; +} __attribute__((packed)); + +#define IP_HDR_SIZE (sizeof(struct ip_hdr)) + +struct udp_hdr { + uint16_t src; + uint16_t dst; + uint16_t len; + uint16_t sum; +} __attribute__((packed)); + +#define UDP_HDR_SIZE (sizeof(struct udp_hdr)) + +#define ETHER_MTU 1500 + +uint16_t compute_ip_checksum(const void *vptr, uint32_t nbytes); + +void net_set_ether(void *xet, const uint8_t *destaddr, const uint8_t *srcaddr, + uint16_t prot); + +bool net_is_ether(const void *xet, uint32_t len, uint16_t prot); + +void net_set_ip_header(void *pkt, struct in_addr dest, struct in_addr source, + uint16_t pkt_len, uint8_t proto); + +bool ip_checksum_ok(const void *addr, uint32_t nbytes); + +bool net_is_ip_packet(const void *pkt, uint32_t len, uint8_t proto); + +void net_set_udp_header(void *pkt, struct in_addr dest, struct in_addr src, + uint16_t dport, uint16_t sport, uint16_t len); + +bool net_is_udp_packet(const void *pkt, uint32_t len, uint16_t dport); + +#endif /* _NET_COMMON_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/build_helpers/conditional_eval_options.mk b/atf-20240117-bacca82a8/plat/mediatek/build_helpers/conditional_eval_options.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/build_helpers/conditional_eval_options.mk rename to atf-20240117-bacca82a8/plat/mediatek/build_helpers/conditional_eval_options.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/build_helpers/mtk_build_helpers.mk b/atf-20240117-bacca82a8/plat/mediatek/build_helpers/mtk_build_helpers.mk similarity index 96% rename from atf-20231013-0ea67d76a/plat/mediatek/build_helpers/mtk_build_helpers.mk rename to atf-20240117-bacca82a8/plat/mediatek/build_helpers/mtk_build_helpers.mk index 83a4dd2a1..ac2cbad4d 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/build_helpers/mtk_build_helpers.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/build_helpers/mtk_build_helpers.mk @@ -103,12 +103,8 @@ MTK_PROJECT_CFG := $(MTK_PLAT)/project/$(PLAT)/project_config.mk MTK_OPTIONS := $(MTK_PLAT)/build_helpers/options.mk MTK_COND_EVAL := $(MTK_PLAT)/build_helpers/conditional_eval_options.mk -# Indicate which BL should be built in command line -ifeq (${NEED_BL32},yes) -MTK_BL := bl32 -else MTK_BL := bl31 -endif + # Include common, platform, board level config include $(MTK_COMMON_CFG) include $(MTK_PLAT_CFG) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/build_helpers/mtk_build_helpers_epilogue.mk b/atf-20240117-bacca82a8/plat/mediatek/build_helpers/mtk_build_helpers_epilogue.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/build_helpers/mtk_build_helpers_epilogue.mk rename to atf-20240117-bacca82a8/plat/mediatek/build_helpers/mtk_build_helpers_epilogue.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/build_helpers/options.mk b/atf-20240117-bacca82a8/plat/mediatek/build_helpers/options.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/build_helpers/options.mk rename to atf-20240117-bacca82a8/plat/mediatek/build_helpers/options.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/common_config.mk b/atf-20240117-bacca82a8/plat/mediatek/common/common_config.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/common_config.mk rename to atf-20240117-bacca82a8/plat/mediatek/common/common_config.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/coreboot_config.mk b/atf-20240117-bacca82a8/plat/mediatek/common/coreboot_config.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/coreboot_config.mk rename to atf-20240117-bacca82a8/plat/mediatek/common/coreboot_config.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/lpm/mt_lp_api.c b/atf-20240117-bacca82a8/plat/mediatek/common/lpm/mt_lp_api.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/lpm/mt_lp_api.c rename to atf-20240117-bacca82a8/plat/mediatek/common/lpm/mt_lp_api.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/lpm/mt_lp_rm.c b/atf-20240117-bacca82a8/plat/mediatek/common/lpm/mt_lp_rm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/lpm/mt_lp_rm.c rename to atf-20240117-bacca82a8/plat/mediatek/common/lpm/mt_lp_rm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/lpm/mt_lp_rq.c b/atf-20240117-bacca82a8/plat/mediatek/common/lpm/mt_lp_rq.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/lpm/mt_lp_rq.c rename to atf-20240117-bacca82a8/plat/mediatek/common/lpm/mt_lp_rq.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/lpm/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/common/lpm/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/lpm/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/common/lpm/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/mtk_bl31_setup.c b/atf-20240117-bacca82a8/plat/mediatek/common/mtk_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/mtk_bl31_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/common/mtk_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/mtk_plat_common.c b/atf-20240117-bacca82a8/plat/mediatek/common/mtk_plat_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/mtk_plat_common.c rename to atf-20240117-bacca82a8/plat/mediatek/common/mtk_plat_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/mtk_plat_common.h b/atf-20240117-bacca82a8/plat/mediatek/common/mtk_plat_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/mtk_plat_common.h rename to atf-20240117-bacca82a8/plat/mediatek/common/mtk_plat_common.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/mtk_sip_svc.c b/atf-20240117-bacca82a8/plat/mediatek/common/mtk_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/mtk_sip_svc.c rename to atf-20240117-bacca82a8/plat/mediatek/common/mtk_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/mtk_smc_handlers.c b/atf-20240117-bacca82a8/plat/mediatek/common/mtk_smc_handlers.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/mtk_smc_handlers.c rename to atf-20240117-bacca82a8/plat/mediatek/common/mtk_smc_handlers.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/params_setup.c b/atf-20240117-bacca82a8/plat/mediatek/common/params_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/params_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/common/params_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/plat_params.h b/atf-20240117-bacca82a8/plat/mediatek/common/plat_params.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/plat_params.h rename to atf-20240117-bacca82a8/plat/mediatek/common/plat_params.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/common/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/common/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/common/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/common/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv_mbox_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv_mbox_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv_mbox_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv_mbox_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/apusys_rv/2.0/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/apusys_rv/2.0/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/devapc/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/devapc/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/devapc/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/devapc/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_devapc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_devapc_def.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_devapc_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_devapc_def.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_devapc_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_power.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_power.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_power.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_power.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_power.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_power.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_power.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_power.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/mt8188/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/mt8188/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/apusys/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/apusys/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/audio.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/audio/audio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/audio.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/audio/audio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/audio.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/audio/audio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/audio.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/audio/audio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/mt8188/audio_domain.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/audio/mt8188/audio_domain.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/mt8188/audio_domain.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/audio/mt8188/audio_domain.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/mt8188/mt_audio_private.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/audio/mt8188/mt_audio_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/mt8188/mt_audio_private.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/audio/mt8188/mt_audio_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/mt8188/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/audio/mt8188/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/mt8188/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/audio/mt8188/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/audio/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/audio/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/audio/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cirq/mt_cirq.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/cirq/mt_cirq.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cirq/mt_cirq.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cirq/mt_cirq.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cirq/mt_cirq.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/cirq/mt_cirq.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cirq/mt_cirq.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cirq/mt_cirq.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cirq/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/cirq/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cirq/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cirq/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_cpc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_cpu_pm_mbox.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/mt_smp.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/cpcv3_2/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/cpcv3_2/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/cpu_pm/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/cpu_pm/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mt8188/mtk_dcm_utils.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mtk_dcm.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mtk_dcm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mtk_dcm.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mtk_dcm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mtk_dcm.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mtk_dcm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/mtk_dcm.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/mtk_dcm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dcm/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dcm/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/dfd.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/dfd.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/dfd.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/dfd.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/dfd.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/dfd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/dfd.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/dfd.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/mt8188/plat_dfd.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/mt8188/plat_dfd.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/mt8188/plat_dfd.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/mt8188/plat_dfd.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/mt8188/plat_dfd.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/mt8188/plat_dfd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/mt8188/plat_dfd.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/mt8188/plat_dfd.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dfd/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dfd/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dp/mt_dp.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/dp/mt_dp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dp/mt_dp.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dp/mt_dp.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dp/mt_dp.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/dp/mt_dp.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dp/mt_dp.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dp/mt_dp.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/dp/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/dp/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/dp/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/dp/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/emi_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/emi_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/emi_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/emi_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/emi_mpu_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu.c similarity index 53% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu.c index ae1b7ef67..e8882f070 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu.c +++ b/atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu.c @@ -12,8 +12,51 @@ void set_emi_mpu_regions(void) { - /* TODO: set emi mpu region */ - INFO("%s, emi mpu is not setting currently\n", __func__); + struct emi_region_info_t region_info; + + /* SCP core0 DRAM */ + region_info.start = 0x50000000ULL; + region_info.end = 0x528FFFFFULL; + region_info.region = 2; + SET_ACCESS_PERMISSION(region_info.apc, 1, + FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN, + FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION, + FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN, + FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION); + emi_mpu_set_protection(®ion_info); + + /* SCP core1 DRAM */ + region_info.start = 0x70000000ULL; + region_info.end = 0x729FFFFFULL; + region_info.region = 3; + SET_ACCESS_PERMISSION(region_info.apc, 1, + FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN, + FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION, + FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN, + FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION); + emi_mpu_set_protection(®ion_info); + + /* DSP protect address */ + region_info.start = 0x60000000ULL; + region_info.end = 0x610FFFFFULL; + region_info.region = 4; + SET_ACCESS_PERMISSION(region_info.apc, 1, + FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN, + FORBIDDEN, FORBIDDEN, FORBIDDEN, FORBIDDEN, + FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION, + FORBIDDEN, FORBIDDEN, FORBIDDEN, NO_PROTECTION); + emi_mpu_set_protection(®ion_info); + + /* All default settings */ + region_info.start = 0x40000000ULL; + region_info.end = 0x1FFFF0000ULL; + region_info.region = 31; + SET_ACCESS_PERMISSION(region_info.apc, 1, + FORBIDDEN, FORBIDDEN, NO_PROTECTION, NO_PROTECTION, + NO_PROTECTION, FORBIDDEN, NO_PROTECTION, NO_PROTECTION, + NO_PROTECTION, SEC_R_NSEC_RW, NO_PROTECTION, FORBIDDEN, + NO_PROTECTION, NO_PROTECTION, NO_PROTECTION, NO_PROTECTION); + emi_mpu_set_protection(®ion_info); } int set_apu_emi_mpu_region(void) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu_priv.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu_priv.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu_priv.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/mt8188/emi_mpu_priv.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/emi_mpu/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/emi_mpu/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gic600/mt_gic_v3.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/gic600/mt_gic_v3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gic600/mt_gic_v3.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gic600/mt_gic_v3.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gic600/mt_gic_v3.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/gic600/mt_gic_v3.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gic600/mt_gic_v3.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gic600/mt_gic_v3.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gic600/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/gic600/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gic600/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gic600/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mt8188/mtgpio.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mt8188/mtgpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mt8188/mtgpio.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mt8188/mtgpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mt8188/mtgpio.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mt8188/mtgpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mt8188/mtgpio.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mt8188/mtgpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mtgpio_common.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mtgpio_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mtgpio_common.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mtgpio_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mtgpio_common.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mtgpio_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/mtgpio_common.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/mtgpio_common.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/gpio/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/gpio/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.c similarity index 84% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.c index 1d6863ff5..64a10f1ab 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.c +++ b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include +#include #include #include @@ -42,7 +42,7 @@ #define MMU_DEV_PCIE_0 (0) #define IFR_CFG_GROUP_NUM (1) -static struct mtk_smi_larb_config mt8188_larb_cfg[SMI_LARB_NUM] = { +static struct mtk_smi_larb_config mt8188_larb_cfg[] = { [SMI_L0_ID] = LARB_CFG_ENTRY(SMI_LARB_0_BASE, 7, 0), [SMI_L1_ID] = LARB_CFG_ENTRY(SMI_LARB_1_BASE, 7, 0), [SMI_L2_ID] = LARB_CFG_ENTRY(SMI_LARB_2_BASE, 5, 0), @@ -80,12 +80,24 @@ static uint32_t mt8188_ifr_mst_cfg_base[IFR_CFG_GROUP_NUM] = { static uint32_t mt8188_ifr_mst_cfg_offs[IFR_CFG_GROUP_NUM] = { PERICFG_AO_IOMMU_1, }; -static struct mtk_ifr_mst_config mt8188_ifr_mst_cfg[MMU_DEV_NUM] = { +static struct mtk_ifr_mst_config mt8188_ifr_mst_cfg[] = { [MMU_DEV_PCIE_0] = IFR_MST_CFG_ENTRY(0, 18), }; struct mtk_smi_larb_config *g_larb_cfg = &mt8188_larb_cfg[0]; +const unsigned int g_larb_num = ARRAY_SIZE(mt8188_larb_cfg); + +static struct mtk_secure_iommu_config mt8188_secure_iommu_config[] = { + SEC_IOMMU_CFG_ENTRY(VDO_SECURE_IOMMU_BASE), + SEC_IOMMU_CFG_ENTRY(VPP_SECURE_IOMMU_BASE), +}; + +struct mtk_secure_iommu_config *g_sec_iommu_cfg = &mt8188_secure_iommu_config[0]; +const unsigned int g_sec_iommu_num = ARRAY_SIZE(mt8188_secure_iommu_config); + struct mtk_ifr_mst_config *g_ifr_mst_cfg = &mt8188_ifr_mst_cfg[0]; +const unsigned int g_ifr_mst_num = ARRAY_SIZE(mt8188_ifr_mst_cfg); + uint32_t *g_ifr_mst_cfg_base = &mt8188_ifr_mst_cfg_base[0]; uint32_t *g_ifr_mst_cfg_offs = &mt8188_ifr_mst_cfg_offs[0]; diff --git a/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.h new file mode 100644 index 000000000..a3f38a53e --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mt8188/mtk_iommu_plat.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef IOMMU_PLAT_H +#define IOMMU_PLAT_H + +/* mm iommu */ +#define ATF_MTK_SMI_LARB_CFG_SUPPORT + +/* mm iommu, sec bank dump */ +#define ATF_MTK_IOMMU_CFG_SUPPORT + +/* infra iommu */ +#define ATF_MTK_INFRA_MASTER_CFG_SUPPORT + +#endif /* IOMMU_PLAT_H */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mtk_iommu_priv.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_priv.h similarity index 53% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mtk_iommu_priv.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_priv.h index 3404d313b..bae369483 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mtk_iommu_priv.h +++ b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_priv.h @@ -9,6 +9,7 @@ #include #include +#include #include #define LARB_CFG_ENTRY(bs, p_nr, dom) \ @@ -22,9 +23,13 @@ #define IFR_MST_CFG_ENTRY(idx, bit) \ { .cfg_addr_idx = (idx), .r_mmu_en_bit = (bit), } +#define SEC_IOMMU_CFG_ENTRY(s_bs) \ + { .base = (s_bs), } + enum IOMMU_ATF_CMD { IOMMU_ATF_CMD_CONFIG_SMI_LARB, /* For mm master to enable iommu */ IOMMU_ATF_CMD_CONFIG_INFRA_IOMMU, /* For infra master to enable iommu */ + IOMMU_ATF_CMD_GET_SECURE_IOMMU_STATUS, /* For secure iommu translation fault report */ IOMMU_ATF_CMD_COUNT, }; @@ -41,4 +46,30 @@ struct mtk_ifr_mst_config { uint8_t r_mmu_en_bit; }; +struct mtk_secure_iommu_config { + uint32_t base; +}; + + +#ifdef ATF_MTK_SMI_LARB_CFG_SUPPORT +/* mm smi larb security feature is used */ +extern struct mtk_smi_larb_config *g_larb_cfg; +extern const unsigned int g_larb_num; +#endif + +#ifdef ATF_MTK_INFRA_MASTER_CFG_SUPPORT +/* infra iommu is used */ +extern struct mtk_ifr_mst_config *g_ifr_mst_cfg; +extern const unsigned int g_ifr_mst_num; +extern uint32_t *g_ifr_mst_cfg_base; +extern uint32_t *g_ifr_mst_cfg_offs; +extern void mtk_infra_iommu_enable_protect(void); +#endif + +#ifdef ATF_MTK_IOMMU_CFG_SUPPORT +/* secure iommu is used */ +extern struct mtk_secure_iommu_config *g_sec_iommu_cfg; +extern const unsigned int g_sec_iommu_num; +#endif + #endif /* IOMMU_PRIV_H */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mtk_iommu_smc.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_smc.c similarity index 58% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mtk_iommu_smc.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_smc.c index e99872544..7d7011430 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/mtk_iommu_smc.c +++ b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_smc.c @@ -5,7 +5,7 @@ */ #include -#include +#include /* defination */ /* smi larb */ @@ -23,12 +23,23 @@ /* infra master */ #define IFR_CFG_MMU_EN_MSK(r_bit) (0x3 << (r_bit)) +/* secure iommu */ +#define MMU_INT_CONTROL0 (0x120) +#define INT_CLR BIT(12) +#define MMU_FAULT_ST1 (0x134) +#define MMU_AXI_0_ERR_MASK GENMASK(6, 0) +#define MMU_AXI_FAULT_STATUS(bus) (0x13c + (bus) * 8) +#define MMU_AXI_INVLD_PA(bus) (0x140 + (bus) * 8) +#define MMU_AXI_INT_ID(bus) (0x150 + (bus) * 4) + /* smi larb configure */ /* * If multimedia security config is enabled, the SMI config register must be * configurated in security world. * And the SRAM path is also configurated here to enhance security. */ +#ifdef ATF_MTK_SMI_LARB_CFG_SUPPORT + static void mtk_smi_larb_port_config_to_sram( const struct mtk_smi_larb_config *larb, uint32_t port_id) @@ -55,7 +66,7 @@ static int mtk_smi_larb_port_config_sec(uint32_t larb_id, uint32_t mmu_en_msk) uint32_t to_sram; uint8_t mmu_en; - if (larb_id >= SMI_LARB_NUM) { + if (larb_id >= g_larb_num) { return MTK_SIP_E_INVALID_PARAM; } @@ -75,6 +86,11 @@ static int mtk_smi_larb_port_config_sec(uint32_t larb_id, uint32_t mmu_en_msk) return MTK_SIP_E_SUCCESS; } +#endif /* ATF_MTK_SMI_LARB_CFG_SUPPORT */ + +/* infra iommu configure */ +#ifdef ATF_MTK_INFRA_MASTER_CFG_SUPPORT + static int mtk_infra_master_config_sec(uint32_t dev_id_msk, uint32_t enable) { const struct mtk_ifr_mst_config *ifr_cfg; @@ -82,11 +98,11 @@ static int mtk_infra_master_config_sec(uint32_t dev_id_msk, uint32_t enable) mtk_infra_iommu_enable_protect(); - if (dev_id_msk >= BIT(MMU_DEV_NUM)) { + if (dev_id_msk >= BIT(g_ifr_mst_num)) { return MTK_SIP_E_INVALID_PARAM; } - for (dev_id = 0U; dev_id < MMU_DEV_NUM; dev_id++) { + for (dev_id = 0U; dev_id < g_ifr_mst_num; dev_id++) { if ((dev_id_msk & BIT(dev_id)) == 0U) { continue; } @@ -105,10 +121,50 @@ static int mtk_infra_master_config_sec(uint32_t dev_id_msk, uint32_t enable) return MTK_SIP_E_SUCCESS; } +#endif /* ATF_MTK_INFRA_MASTER_CFG_SUPPORT */ -static u_register_t mtk_iommu_handler(u_register_t x1, u_register_t x2, - u_register_t x3, u_register_t x4, - void *handle, struct smccc_res *smccc_ret) +/* secure iommu */ +#ifdef ATF_MTK_IOMMU_CFG_SUPPORT +/* Report secure IOMMU fault status to normal world for the debug version */ +static int mtk_secure_iommu_fault_report(uint32_t sec_mmu_base, + uint32_t *f_sta, uint32_t *f_pa, + uint32_t *f_id) +{ + const struct mtk_secure_iommu_config *mmu_cfg = NULL; + uint32_t __maybe_unused bus_id, fault_type; + uint32_t i; + int ret = MTK_SIP_E_NOT_SUPPORTED; + + for (i = 0; i < g_sec_iommu_num; i++) { + if (g_sec_iommu_cfg[i].base == sec_mmu_base) { + mmu_cfg = &g_sec_iommu_cfg[i]; + break; + } + } + + if (!mmu_cfg) + return MTK_SIP_E_INVALID_PARAM; +#if DEBUG + fault_type = mmio_read_32(mmu_cfg->base + MMU_FAULT_ST1); + bus_id = (fault_type & MMU_AXI_0_ERR_MASK) ? 0 : 1; + + if (f_sta) + *f_sta = mmio_read_32(mmu_cfg->base + MMU_AXI_FAULT_STATUS(bus_id)); + if (f_pa) + *f_pa = mmio_read_32(mmu_cfg->base + MMU_AXI_INVLD_PA(bus_id)); + if (f_id) + *f_id = mmio_read_32(mmu_cfg->base + MMU_AXI_INT_ID(bus_id)); + ret = MTK_SIP_E_SUCCESS; +#endif + mmio_setbits_32(mmu_cfg->base + MMU_INT_CONTROL0, INT_CLR); + + return ret; +} +#endif /* ATF_MTK_IOMMU_CFG_SUPPORT */ + +u_register_t mtk_iommu_handler(u_register_t x1, u_register_t x2, + u_register_t x3, u_register_t x4, + void *handle, struct smccc_res *smccc_ret) { uint32_t cmd_id = x1, mdl_id = x2, val = x3; int ret = MTK_SIP_E_NOT_SUPPORTED; @@ -117,12 +173,25 @@ static u_register_t mtk_iommu_handler(u_register_t x1, u_register_t x2, (void)handle; switch (cmd_id) { +#ifdef ATF_MTK_SMI_LARB_CFG_SUPPORT case IOMMU_ATF_CMD_CONFIG_SMI_LARB: ret = mtk_smi_larb_port_config_sec(mdl_id, val); break; +#endif +#ifdef ATF_MTK_INFRA_MASTER_CFG_SUPPORT case IOMMU_ATF_CMD_CONFIG_INFRA_IOMMU: ret = mtk_infra_master_config_sec(mdl_id, val); break; +#endif +#ifdef ATF_MTK_IOMMU_CFG_SUPPORT + case IOMMU_ATF_CMD_GET_SECURE_IOMMU_STATUS: + (void)val; + ret = mtk_secure_iommu_fault_report(mdl_id, + (uint32_t *)&smccc_ret->a1, + (uint32_t *)&smccc_ret->a2, + (uint32_t *)&smccc_ret->a3); + break; +#endif default: break; } diff --git a/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_smc.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_smc.h new file mode 100644 index 000000000..9537dbe9d --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/mtk_iommu_smc.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef IOMMU_SMC_H +#define IOMMU_SMC_H + +#include + +u_register_t mtk_iommu_handler(u_register_t x1, u_register_t x2, + u_register_t x3, u_register_t x4, + void *handle, struct smccc_res *smccc_ret); +#endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/iommu/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/iommu/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/mcusys/mcusys.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/mcusys/mcusys.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/mcusys/mcusys.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/mcusys/mcusys.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/mcusys/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/mcusys/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/mcusys/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/mcusys/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/mcusys/v1/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/mcusys/v1/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/mcusys/v1/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/mcusys/v1/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/msdc/mt8186/mt_msdc_priv.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/msdc/mt8186/mt_msdc_priv.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/msdc/mt8186/mt_msdc_priv.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/msdc/mt8186/mt_msdc_priv.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/msdc/mt_msdc.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/msdc/mt_msdc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/msdc/mt_msdc.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/msdc/mt_msdc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/msdc/mt_msdc.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/msdc/mt_msdc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/msdc/mt_msdc.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/msdc/mt_msdc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic/pmic.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic/pmic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic/pmic.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic/pmic.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic/pmic.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic/pmic.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic/pmic.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic/pmic.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/mt8188/pmic_wrap_init.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/mt8188/pmic_wrap_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/mt8188/pmic_wrap_init.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/mt8188/pmic_wrap_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_common.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_common.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_common.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_v2.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_v2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_v2.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/pmic_wrap_init_v2.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/pmic_wrap/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/pmic_wrap/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/mt8188/ptp3_plat.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/mt8188/ptp3_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/mt8188/ptp3_plat.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/mt8188/ptp3_plat.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/ptp3_common.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/ptp3_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/ptp3_common.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/ptp3_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/ptp3_common.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/ptp3_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/ptp3_common.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/ptp3_common.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/ptp3/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/ptp3/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/mt8188/rtc.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/mt8188/rtc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/mt8188/rtc.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/mt8188/rtc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rtc_common.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rtc_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rtc_common.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rtc_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rtc_mt6359p.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rtc_mt6359p.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rtc_mt6359p.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rtc_mt6359p.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rtc_mt6359p.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rtc_mt6359p.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rtc_mt6359p.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rtc_mt6359p.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/rtc/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/rtc/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_api.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_bus26m.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_bus26m.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_bus26m.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_bus26m.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_cpu_buck_ldo.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_cpu_buck_ldo.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_cpu_buck_ldo.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_cpu_buck_ldo.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_dram.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_dram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_dram.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_dram.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_internal.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_syspll.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_syspll.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_syspll.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/constraints/mt_spm_rc_syspll.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_cond.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_conservation.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_constraint.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_constraint.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_constraint.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_constraint.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_idle.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_pmic_wrap.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_reg.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_reg.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_reg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/mt_spm_suspend.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/pcm_def.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/pcm_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/pcm_def.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/pcm_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/sleep_def.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/sleep_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/mt8188/sleep_def.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/mt8188/sleep_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/version/notifier/inc/mt_spm_notifier.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/version/notifier/inc/mt_spm_notifier.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/version/notifier/inc/mt_spm_notifier.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/version/notifier/inc/mt_spm_notifier.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_intc.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_intc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_intc.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_intc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_notifier.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_notifier.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_notifier.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/spm/version/notifier/v1/mt_spm_sspm_notifier.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/timer/mt_timer.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/timer/mt_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/timer/mt_timer.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/timer/mt_timer.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/timer/mt_timer.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/timer/mt_timer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/timer/mt_timer.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/timer/mt_timer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/timer/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/timer/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/timer/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/timer/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/8250_console.S b/atf-20240117-bacca82a8/plat/mediatek/drivers/uart/8250_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/8250_console.S rename to atf-20240117-bacca82a8/plat/mediatek/drivers/uart/8250_console.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/uart.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/uart/uart.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/uart.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/uart/uart.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/uart.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/uart/uart.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/uart.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/uart/uart.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/uart8250.h b/atf-20240117-bacca82a8/plat/mediatek/drivers/uart/uart8250.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/uart/uart8250.h rename to atf-20240117-bacca82a8/plat/mediatek/drivers/uart/uart8250.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/usb/mt8188/mt_usb.c b/atf-20240117-bacca82a8/plat/mediatek/drivers/usb/mt8188/mt_usb.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/usb/mt8188/mt_usb.c rename to atf-20240117-bacca82a8/plat/mediatek/drivers/usb/mt8188/mt_usb.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/drivers/usb/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/drivers/usb/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/drivers/usb/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/drivers/usb/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/helpers/armv8_2/arch_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/helpers/armv8_2/arch_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/helpers/armv8_2/arch_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/helpers/armv8_2/arch_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/helpers/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/helpers/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/helpers/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/helpers/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/armv8_2/arch_def.h b/atf-20240117-bacca82a8/plat/mediatek/include/armv8_2/arch_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/armv8_2/arch_def.h rename to atf-20240117-bacca82a8/plat/mediatek/include/armv8_2/arch_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/drivers/spm/mt_spm_resource_req.h b/atf-20240117-bacca82a8/plat/mediatek/include/drivers/spm/mt_spm_resource_req.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/drivers/spm/mt_spm_resource_req.h rename to atf-20240117-bacca82a8/plat/mediatek/include/drivers/spm/mt_spm_resource_req.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/lib/mtk_init/mtk_init.h b/atf-20240117-bacca82a8/plat/mediatek/include/lib/mtk_init/mtk_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/lib/mtk_init/mtk_init.h rename to atf-20240117-bacca82a8/plat/mediatek/include/lib/mtk_init/mtk_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/lib/mtk_init/mtk_init_def.h b/atf-20240117-bacca82a8/plat/mediatek/include/lib/mtk_init/mtk_init_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/lib/mtk_init/mtk_init_def.h rename to atf-20240117-bacca82a8/plat/mediatek/include/lib/mtk_init/mtk_init_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_api.h b/atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_api.h rename to atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_api.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_rm.h b/atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_rm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_rm.h rename to atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_rm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_rq.h b/atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_rq.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_rq.h rename to atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_rq.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_rqm.h b/atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_rqm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lp_rqm.h rename to atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lp_rqm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lpm_smc.h b/atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lpm_smc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/lpm/mt_lpm_smc.h rename to atf-20240117-bacca82a8/plat/mediatek/include/lpm/mt_lpm_smc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/mtk_mmap_pool.h b/atf-20240117-bacca82a8/plat/mediatek/include/mtk_mmap_pool.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/mtk_mmap_pool.h rename to atf-20240117-bacca82a8/plat/mediatek/include/mtk_mmap_pool.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/mtk_sip_def.h b/atf-20240117-bacca82a8/plat/mediatek/include/mtk_sip_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/mtk_sip_def.h rename to atf-20240117-bacca82a8/plat/mediatek/include/mtk_sip_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/mtk_sip_svc.h b/atf-20240117-bacca82a8/plat/mediatek/include/mtk_sip_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/mtk_sip_svc.h rename to atf-20240117-bacca82a8/plat/mediatek/include/mtk_sip_svc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/plat.ld.rodata.inc b/atf-20240117-bacca82a8/plat/mediatek/include/plat.ld.rodata.inc similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/plat.ld.rodata.inc rename to atf-20240117-bacca82a8/plat/mediatek/include/plat.ld.rodata.inc diff --git a/atf-20231013-0ea67d76a/plat/mediatek/include/vendor_pubsub_events.h b/atf-20240117-bacca82a8/plat/mediatek/include/vendor_pubsub_events.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/include/vendor_pubsub_events.h rename to atf-20240117-bacca82a8/plat/mediatek/include/vendor_pubsub_events.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/mtk_init/mtk_init.c b/atf-20240117-bacca82a8/plat/mediatek/lib/mtk_init/mtk_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/mtk_init/mtk_init.c rename to atf-20240117-bacca82a8/plat/mediatek/lib/mtk_init/mtk_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/mtk_init/mtk_mmap_init.c b/atf-20240117-bacca82a8/plat/mediatek/lib/mtk_init/mtk_mmap_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/mtk_init/mtk_mmap_init.c rename to atf-20240117-bacca82a8/plat/mediatek/lib/mtk_init/mtk_mmap_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/mtk_init/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/lib/mtk_init/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/mtk_init/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/lib/mtk_init/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c b/atf-20240117-bacca82a8/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c rename to atf-20240117-bacca82a8/plat/mediatek/lib/pm/armv8_2/pwr_ctrl.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/pm/armv8_2/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/lib/pm/armv8_2/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/pm/armv8_2/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/lib/pm/armv8_2/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/pm/mtk_pm.c b/atf-20240117-bacca82a8/plat/mediatek/lib/pm/mtk_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/pm/mtk_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/lib/pm/mtk_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/pm/mtk_pm.h b/atf-20240117-bacca82a8/plat/mediatek/lib/pm/mtk_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/pm/mtk_pm.h rename to atf-20240117-bacca82a8/plat/mediatek/lib/pm/mtk_pm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/pm/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/lib/pm/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/pm/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/lib/pm/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/system_reset/reset_cros.c b/atf-20240117-bacca82a8/plat/mediatek/lib/system_reset/reset_cros.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/system_reset/reset_cros.c rename to atf-20240117-bacca82a8/plat/mediatek/lib/system_reset/reset_cros.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/lib/system_reset/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/lib/system_reset/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/lib/system_reset/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/lib/system_reset/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt7622/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/ar.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/ar.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/ar.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/ar.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/ar_post.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/ar_post.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/ar_post.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/ar_post.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_dev_mmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_dev_mmc.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_dev_mmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_dev_mmc.c index 5d55b93dd..5ab357ddf 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_dev_mmc.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_dev_mmc.c @@ -76,7 +76,7 @@ static const struct mt7622_msdc_conf { } }; -int mtk_plat_mmc_setup(void) +int mtk_plat_mmc_setup(uint32_t *num_sectors) { const struct mt7622_msdc_conf *conf = &mt7622_msdc[MSDC_INDEX]; uint32_t i; @@ -87,5 +87,8 @@ int mtk_plat_mmc_setup(void) mtk_mmc_init(conf->base, 0, conf->dev_comp, conf->src_clk, conf->type, conf->bus_width); + if (num_sectors) + *num_sectors = mtk_mmc_block_count(); + return 0; } diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_dev_snfi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_dev_snfi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_dev_snfi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_dev_snfi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_dev_spi_nor.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_dev_spi_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_dev_spi_nor.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_dev_spi_nor.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_plat_init.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_plat_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2/bl2_plat_init.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2/bl2_plat_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2pl/bl2pl.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2pl/bl2pl.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2pl/bl2pl.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2pl/bl2pl.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2pl/bl2pl_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2pl/bl2pl_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2pl/bl2pl_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2pl/bl2pl_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2pl/serial.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2pl/serial.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl2pl/serial.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl2pl/serial.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/bl31.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/bl31.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/bl31.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/bl31.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/power_tracer.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/power_tracer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/power_tracer.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/power_tracer.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/scu.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/scu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/bl31/scu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/bl31/scu.c diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/Config.in b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/Config.in new file mode 100644 index 000000000..fe03847b0 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/Config.in @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# MT7622 DRAM-pecific configurations +# + +if _PLAT_MT7622 + +config _MT7622_DDR3_FLYBY + bool "Enable Fly-by topology (Uses 2x DDR3 chips)" + default n + +# Makefile option +config DDR3_FLYBY + int + default 1 + depends on _MT7622_DDR3_FLYBY + +endif # _PLAT_MT7622 diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/dram-configs.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/dram-configs.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/dram-configs.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/dram-configs.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/dram.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/dram.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/dram.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/dram.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/emi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/emi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/emi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/emi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/release/dram-flyby.o b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/release/dram-flyby.o similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/release/dram-flyby.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/release/dram-flyby.o diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/release/dram.o b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/release/dram.o similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/dram/release/dram.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/dram/release/dram.o diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/efuse/efuse.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/efuse/efuse.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/efuse/efuse.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/efuse/efuse.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/efuse/release/efuse_cmd.o b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/efuse/release/efuse_cmd.o similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/efuse/release/efuse_cmd.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/efuse/release/efuse_cmd.o diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pinctrl/pinctrl.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pll/pll.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pll/pll.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pll/pll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pll/pll.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pll/pll.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pll/pll.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pll/pll.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pll/pll.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic_wrap.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic_wrap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic_wrap.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic_wrap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic_wrap_init.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic_wrap_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/pmic/pmic_wrap_init.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/pmic/pmic_wrap_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/rtc/rtc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/rtc/rtc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/rtc/rtc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/rtc/rtc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/rtc/rtc.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/rtc/rtc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/rtc/rtc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/rtc/rtc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/mtcmos.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/mtcmos.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/mtcmos.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/mtcmos.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/mtcmos.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/mtcmos.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/mtcmos.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/mtcmos.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_hotplug.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_hotplug.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_hotplug.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_hotplug.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_hotplug.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_hotplug.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_hotplug.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_hotplug.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_mcdi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_mcdi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_mcdi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_mcdi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_mcdi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_mcdi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_mcdi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_mcdi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_suspend.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_suspend.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_suspend.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_suspend.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/spm/spm_suspend.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/spm/spm_suspend.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/timer/cpuxgpt.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/timer/cpuxgpt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/timer/cpuxgpt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/timer/cpuxgpt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/timer/cpuxgpt.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/timer/cpuxgpt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/timer/cpuxgpt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/timer/cpuxgpt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/drivers/wdt/mtk_wdt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/ar_table.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/ar_table.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/ar_table.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/ar_table.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/mt7622_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/mt7622_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/mt7622_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/mt7622_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/power_tracer.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/power_tracer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/power_tracer.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/power_tracer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/scu.h b/atf-20240117-bacca82a8/plat/mediatek/mt7622/include/scu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/include/scu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/include/scu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/mtk_ar_table.c b/atf-20240117-bacca82a8/plat/mediatek/mt7622/mtk_ar_table.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/mtk_ar_table.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/mtk_ar_table.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7622/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7622/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7622/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7622/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/aarch32/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt7629/aarch32/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/aarch32/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/aarch32/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/aarch32/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/aarch32/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/aarch32/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/aarch32/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2_dev_snfi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2_dev_snfi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2_dev_snfi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2_dev_snfi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2_dev_spi_nor.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2_dev_spi_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2_dev_spi_nor.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2_dev_spi_nor.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2_plat_init.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2_plat_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/bl2/bl2_plat_init.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/bl2/bl2_plat_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/dram/dram.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/dram/dram.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/dram/dram.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/dram/dram.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/dram/emi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/dram/emi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/dram/emi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/dram/emi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/dram/release/dram.o b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/dram/release/dram.o similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/dram/release/dram.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/dram/release/dram.o diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/efuse/efuse.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/efuse/efuse.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/efuse/efuse.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/efuse/efuse.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/efuse/release/efuse_cmd.o b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/efuse/release/efuse_cmd.o similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/efuse/release/efuse_cmd.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/efuse/release/efuse_cmd.o diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pinctrl/pinctrl.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pll/pll.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pll/pll.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pll/pll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pll/pll.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pll/pll.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pll/pll.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/pll/pll.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/pll/pll.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/spm/spmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/spm/spmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/spm/spmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/spm/spmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/spm/spmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/spm/spmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/spm/spmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/spm/spmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/timer/timer.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/timer/timer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/timer/timer.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/timer/timer.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/timer/timer.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/timer/timer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/timer/timer.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/timer/timer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/drivers/wdt/mtk_wdt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/mt7629_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/include/mt7629_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/mt7629_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/include/mt7629_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7629/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7629/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/bl32.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/bl32.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/bl32.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/bl32.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/sp_min-mt7629.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/sp_min-mt7629.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/sp_min-mt7629.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/sp_min-mt7629.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/sp_min_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7629/sp_min/sp_min_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7629/sp_min/sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt7981/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/aarch64/platform_common.c similarity index 87% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/aarch64/platform_common.c index b48290144..f004e74a2 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/aarch64/platform_common.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/aarch64/platform_common.c @@ -12,7 +12,7 @@ #include //#include #include -#include +#include #include #if 0 @@ -27,13 +27,7 @@ const mmap_region_t plat_mmap[] = { /* for TF text, RO, RW */ MAP_REGION_FLAT(TZRAM_BASE, TZRAM_SIZE, MT_MEMORY | MT_RW | MT_SECURE), - MAP_REGION_FLAT(MTK_DEV_RNG0_BASE, MTK_DEV_RNG0_SIZE, - MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(MTK_DEV_RNG1_BASE, MTK_DEV_RNG1_SIZE, - MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(MTK_DEV_RNG2_BASE, MTK_DEV_RNG2_SIZE, - MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(TRNG_BASE, TRNG_SIZE, + MAP_REGION_FLAT(MTK_DEV_BASE, MTK_DEV_SIZE, MT_DEVICE | MT_RW | MT_SECURE), { 0 } }; diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_mmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_mmc.c similarity index 97% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_mmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_mmc.c index 3e32249a4..74471b202 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_mmc.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_mmc.c @@ -113,7 +113,7 @@ static void mmc_gpio_setup(void) 0x7 << EMMC45_DAT7_DRV_S, 0x1 << EMMC45_DAT7_DRV_S); } -int mtk_plat_mmc_setup(void) +int mtk_plat_mmc_setup(uint32_t *num_sectors) { const struct mt7981_msdc_conf *conf = &mt7981_msdc[MSDC_INDEX]; uint32_t i; @@ -128,5 +128,8 @@ int mtk_plat_mmc_setup(void) mtk_mmc_init(conf->base, conf->top_base, conf->dev_comp, conf->src_clk, conf->type, conf->bus_width); + if (num_sectors) + *num_sectors = mtk_mmc_block_count(); + return 0; } diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_snfi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_snfi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_snfi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_snfi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_spi_nand.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_spi_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_spi_nand.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_spi_nand.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_spi_nor.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_spi_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_dev_spi_nor.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_dev_spi_nor.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_plat_init.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_plat_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/bl2_plat_init.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/bl2_plat_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/dtb.S b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/dtb.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2/dtb.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2/dtb.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2pl/bl2pl.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2pl/bl2pl.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2pl/bl2pl.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2pl/bl2pl.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2pl/bl2pl_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2pl/bl2pl_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2pl/bl2pl_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2pl/bl2pl_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2pl/serial.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2pl/serial.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl2pl/serial.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl2pl/serial.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/bl31.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/bl31.mk similarity index 85% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/bl31.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/bl31.mk index d60bc362b..2dd8bb124 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/bl31.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/bl31.mk @@ -36,10 +36,18 @@ BL31_SOURCES += drivers/arm/cci/cci.c \ $(MTK_PLAT_SOC)/drivers/timer/timer.c \ $(MTK_PLAT_SOC)/drivers/spmc/mtspmc.c -BL31_SOURCES += lib/xlat_tables/xlat_tables_common.c \ - lib/xlat_tables/aarch64/xlat_tables.c +BL31_SOURCES += $(XLAT_TABLES_LIB_SRCS) BL31_CPPFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC BL31_CPPFLAGS += -I$(APSOC_COMMON)/bl31 +ifeq ($(TRUSTED_BOARD_BOOT),1) +BL31_CPPFLAGS += -DMTK_EFUSE_FIELD_NORMAL +endif + +include $(APSOC_COMMON)/bl31/memdump.mk +ifeq ($(EMERG_MEM_DUMP),1) +BL31_SOURCES += $(MTK_PLAT_SOC)/drivers/pll/pll.c +endif + MTK_SIP_KERNEL_BOOT_ENABLE := 1 $(eval $(call add_define,MTK_SIP_KERNEL_BOOT_ENABLE)) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/bl31_plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/bl31_plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/bl31_plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/bl31_plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/bl31/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/bl31/plat_sip_calls.c diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/Config.in b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/Config.in new file mode 100644 index 000000000..ab4dc92aa --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/Config.in @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# MT7981 DRAM-pecific configurations +# + +if _PLAT_MT7981 + +choice + prompt "Chip package" + + config _MT7981_BOARD_QFN + bool "QFN" + depends on _DRAM_DDR3 + + config _MT7981_BOARD_BGA + bool "BGA" +endchoice + +# Makefile options +config BOARD_QFN + int + default 1 + depends on _MT7981_BOARD_QFN + +config BOARD_BGA + int + default 1 + depends on _MT7981_BOARD_BGA + +endif # _PLAT_MT7981 diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/dram-configs.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/dram-configs.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/dram-configs.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/dram-configs.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/dram.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/dram.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/dram.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/dram.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/emi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/emi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/emi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/emi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/emicfg.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/emicfg.c similarity index 93% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/emicfg.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/emicfg.c index 985c29eda..53eba2173 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/emicfg.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/emicfg.c @@ -9,6 +9,7 @@ #include #include #include +#include /* IAP/REBB eFuse bit */ #define IAP_REBB_SWITCH 0x11D00A0C @@ -20,6 +21,7 @@ extern int mt7981_ddr_size_limit; extern int mt7981_dram_debug; extern int mt7981_bga_pkg; extern int mt7981_ddr3_freq; +extern unsigned int mt7981_dram_size; void mtk_mem_init(void) { @@ -54,6 +56,8 @@ void mtk_mem_init(void) NOTICE("EMI: Using DDR%u settings\n", mt7981_use_ddr4 ? 4 : 3); mtk_mem_init_real(); + + mtk_bl2_set_dram_size((uint64_t)mt7981_dram_size << 20); } void mtk_mem_dbg_print(const char *fmt, ...) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/release/dram.o b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/release/dram.o similarity index 57% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/release/dram.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/release/dram.o index b0c83490b..bacf5b727 100644 Binary files a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/dram/release/dram.o and b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/dram/release/dram.o differ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/efuse/efuse.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/efuse/efuse.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/efuse/efuse.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/efuse/efuse.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/efuse/release/efuse_cmd.o b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/efuse/release/efuse_cmd.o similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/efuse/release/efuse_cmd.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/efuse/release/efuse_cmd.o diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/gpio/mt7981_gpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/pll/pll.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/pll/pll.c similarity index 96% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/pll/pll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/pll/pll.c index 588aacf22..6a064d203 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/pll/pll.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/pll/pll.c @@ -154,3 +154,10 @@ void mtk_pll_init(int skip_dcm_setting) mmio_write_32(0x1001B1C0, 0x7FFEFCE3); mmio_write_32(0x1001B1C4, 0x3); } + +void mtk_pll_eth_init(void) +{ + mmio_clrsetbits_32(CLK_CFG_4, 0xffffff00, 0x01010100); + mmio_clrsetbits_32(CLK_CFG_5, 0x00ffffff, 0x00010101); + mmio_write_32(0x1001B1C0, 0x7e0000); +} diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/pll/pll.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/pll/pll.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/pll/pll.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/pll/pll.h index 498c00f41..626cf3514 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/pll/pll.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/pll/pll.h @@ -176,6 +176,7 @@ enum { #define CLK_CFG_20 0x1001B144 void mtk_pll_init(int); +void mtk_pll_eth_init(void); unsigned int mtk_get_cpu_freq(void); #endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spi/boot_spi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spi/boot_spi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spi/boot_spi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spi/boot_spi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spi/boot_spi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spi/boot_spi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spi/boot_spi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spi/boot_spi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spmc/mtspmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spmc/mtspmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spmc/mtspmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spmc/mtspmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spmc/mtspmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spmc/mtspmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spmc/mtspmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spmc/mtspmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spmc/mtspmc_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spmc/mtspmc_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/spmc/mtspmc_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/spmc/mtspmc_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/timer/timer.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/timer/timer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/timer/timer.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/timer/timer.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/timer/timer.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/timer/timer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/timer/timer.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/timer/timer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.c b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/drivers/wdt/mtk_wdt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/mt7981_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/mt7981_def.h similarity index 90% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/mt7981_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/include/mt7981_def.h index 1e908e882..3e07a3ff7 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/mt7981_def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/mt7981_def.h @@ -16,13 +16,8 @@ #define PRIMARY_CPU 0 /* MMU */ -/* FIXME: Aggregate of all devices in the first GB */ -#define MTK_DEV_RNG0_BASE 0x10000000 -#define MTK_DEV_RNG0_SIZE 0x00402000 -#define MTK_DEV_RNG1_BASE 0x11000000 -#define MTK_DEV_RNG1_SIZE 0x01000000 -#define MTK_DEV_RNG2_BASE 0x0c000000 -#define MTK_DEV_RNG2_SIZE 0x01000000 +#define MTK_DEV_BASE 0x00200000 +#define MTK_DEV_SIZE 0x1fe00000 /* GICv3 */ #define PLAT_ARM_GICD_BASE GIC_BASE diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_eth_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_eth_def.h new file mode 100644 index 000000000..76291bbe8 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_eth_def.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLAT_ETH_DEF_H_ +#define _PLAT_ETH_DEF_H_ + +#include +#include +#include +#include + +/* SoC-specific definitions */ +#define SGMII_BASE SGMII_SBUS0_BASE +#define ETHSYS_BASE NETSYS1_BASE +#define FE_BASE (ETHSYS_BASE + 0x100000) + +#define PDMA_BASE PDMA_V2_BASE +#define ANA_RG3_OFFS 0x128 +#define GDMA_COUNT 2 + +#define SWITCH_RESET_GPIO + +#define TXD_SIZE 32 +#define RXD_SIZE 32 + +#define SOC_CAPS (MTK_GMAC2_U3_QPHY | MTK_NETSYS_V2) + +#if defined(IMAGE_BL31) +#define DMA_BUF_ADDR INTER_SRAM +#define DMA_BUF_REMAP +#elif defined(IMAGE_BL2) +#include +#define DMA_BUF_ADDR SCRATCH_BUF_OFFSET +#endif + +/* Using built-in switch */ +#define GMAC_ID 0 +#define GMAC_FORCE_MODE 1 +#define GMAC_FORCE_SPEED 2500 +#define GMAC_FORCE_FULL_DUPLEX 1 +#define GMAC_INTERFACE_MODE PHY_INTERFACE_MODE_2500BASEX +#define SWITCH_MT7531 + +static inline void mtk_plat_switch_reset(bool assert) +{ +#define MT7981_GPIO_BASE 0x11D00000 + + mmio_write_32(MT7981_GPIO_BASE + 0x348, 0xf0000000); /* GPIO_MODE4_CLR */ + mmio_write_32(MT7981_GPIO_BASE + 0x014, BIT(7)); /* GPIO_DIR1_SET */ + + if (assert) + mmio_write_32(MT7981_GPIO_BASE + 0x118, BIT(7)); /* GPIO_DOUT1_CLR */ + else + mmio_write_32(MT7981_GPIO_BASE + 0x114, BIT(7)); /* GPIO_DOUT1_SET */ +} + +#endif /* _PLAT_ETH_DEF_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_macros.S diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_mdump_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_mdump_def.h new file mode 100644 index 000000000..9bd89faab --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_mdump_def.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLAT_MDUMP_DEF_H_ +#define _PLAT_MDUMP_DEF_H_ + +#include +#include "plat_eth_def.h" +#include +#include "memdump.h" + +#define DRAM_START 0x40000000ULL +#define DRAM_END 0x80000000ULL + +#ifdef NEED_BL32 +#define TZRAM_END (TZRAM_BASE + TZRAM_SIZE + TZRAM2_SIZE) +#else +#define TZRAM_END (TZRAM_BASE + TZRAM_SIZE) +#endif + +static const struct mdump_range mdump_ranges[] = { + { + .r = { + .addr = GIC_BASE, + .end = GIC_BASE + 0x100000, + }, + .is_device = true, + }, + { + .r = { + .addr = DRAM_START, + .end = TZRAM_BASE, + }, + .need_map = true, + }, + { + .r = { + .addr = TZRAM_END, + .end = DRAM_END, + }, + .need_map = true, + } +}; + +#endif /* _PLAT_MDUMP_DEF_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/include/platform_def.h index 9c997b7c7..eeb6459f7 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/platform_def.h @@ -116,7 +116,7 @@ ******************************************************************************/ #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) -#define MAX_XLAT_TABLES 4 +#define MAX_XLAT_TABLES 9 #define MAX_MMAP_REGIONS 16 /******************************************************************************* diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/reg_base.h b/atf-20240117-bacca82a8/plat/mediatek/mt7981/include/reg_base.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/include/reg_base.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/include/reg_base.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7981/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7981/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7981/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7981/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt7986/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/aarch64/platform_common.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/aarch64/platform_common.c index 28242e416..174560648 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/aarch64/platform_common.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/aarch64/platform_common.c @@ -23,9 +23,7 @@ /* Table of regions to map using the MMU. */ const mmap_region_t plat_mmap[] = { MAP_SEC_SYSRAM, - MAP_GIC, - MAP_DEVICE0, - MAP_DEVICE1, + MAP_DEVICE, { 0 } }; diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2.mk similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2.mk index 79ca003fe..e38763220 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2.mk @@ -13,7 +13,7 @@ BL2_SIG_TYPE := sha256+rsa-pss BL2_IMG_HDR_SOC := mt7986 # Whether to enble extra feature -I2C_SUPPORT := 0 +I2C_SUPPORT ?= 0 ENABLE_JTAG ?= 0 DTS_NAME := mt7986 diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_mmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_mmc.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_mmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_mmc.c index 33730107d..fec558a82 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_mmc.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_mmc.c @@ -169,7 +169,7 @@ static void mmc_gpio_setup(void) } } -int mtk_plat_mmc_setup(void) +int mtk_plat_mmc_setup(uint32_t *num_sectors) { const struct mt7986_msdc_conf *conf = &mt7986_msdc[MSDC_INDEX]; @@ -178,5 +178,8 @@ int mtk_plat_mmc_setup(void) mtk_mmc_init(conf->base, conf->top_base, conf->dev_comp, conf->src_clk, conf->type, conf->bus_width); + if (num_sectors) + *num_sectors = mtk_mmc_block_count(); + return 0; } diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_qspi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_qspi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_qspi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_qspi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_snfi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_snfi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_snfi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_snfi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_spi_nand.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_spi_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_spi_nand.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_spi_nand.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_spi_nor.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_spi_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_dev_spi_nor.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_dev_spi_nor.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_plat_init.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_plat_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/bl2_plat_init.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/bl2_plat_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/dtb.S b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/dtb.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2/dtb.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2/dtb.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2pl/bl2pl.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2pl/bl2pl.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2pl/bl2pl.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2pl/bl2pl.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2pl/bl2pl_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2pl/bl2pl_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2pl/bl2pl_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2pl/bl2pl_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2pl/serial.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2pl/serial.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl2pl/serial.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl2pl/serial.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/bl31.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/bl31.mk similarity index 88% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/bl31.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/bl31.mk index fb6638525..316254181 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/bl31.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/bl31.mk @@ -41,7 +41,16 @@ BL31_SOURCES += $(XLAT_TABLES_LIB_SRCS) BL31_CPPFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC BL31_CPPFLAGS += -I$(APSOC_COMMON)/bl31 +ifeq ($(TRUSTED_BOARD_BOOT),1) +BL31_CPPFLAGS += -DMTK_EFUSE_FIELD_NORMAL +endif + include $(APSOC_COMMON)/fsek/fsek.mk +include $(APSOC_COMMON)/bl31/memdump.mk +ifeq ($(EMERG_MEM_DUMP),1) +BL31_SOURCES += $(MTK_PLAT_SOC)/drivers/pll/pll.c +endif + MTK_SIP_KERNEL_BOOT_ENABLE := 1 $(eval $(call add_define,MTK_SIP_KERNEL_BOOT_ENABLE)) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/bl31_plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/bl31_plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/bl31_plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/bl31_plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/bl31/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/bl31/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/crypto/release/libcrypto.a b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/crypto/release/libcrypto.a similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/crypto/release/libcrypto.a rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/crypto/release/libcrypto.a diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/devapc/devapc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/devapc/devapc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/devapc/devapc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/devapc/devapc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/devapc/devapc.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/devapc/devapc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/devapc/devapc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/devapc/devapc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/dram-configs.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/dram-configs.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/dram-configs.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/dram-configs.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/dram.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/dram.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/dram.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/dram.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emi_mpu.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emi_mpu.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emi_mpu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emi_mpu.c index 7fa687808..aae87dd60 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emi_mpu.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emi_mpu.c @@ -97,7 +97,6 @@ void emi_mpu_init(void) /* TZRAM protect address(192KB) */ region_info.start = TZRAM_BASE; - region_info.end = (TZRAM_BASE + TZRAM_SIZE) - 1; #ifdef NEED_BL32 region_info.end += TZRAM2_SIZE; #endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emi_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emi_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emi_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emi_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emicfg.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emicfg.c similarity index 92% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emicfg.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emicfg.c index 6682d81c7..98d50f551 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/emicfg.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/emicfg.c @@ -9,6 +9,7 @@ #include #include #include +#include /* IAP/REBB eFuse bit */ #define IAP_REBB_SWITCH 0x11D00A0C @@ -19,6 +20,7 @@ extern int mt7986_use_ddr4; extern int mt7986_ddr4_freq; extern int mt7986_ddr_size_limit; extern int mt7986_dram_debug; +extern unsigned int mt7986_dram_size; void mtk_mem_init(void) { @@ -51,6 +53,8 @@ void mtk_mem_init(void) NOTICE("EMI: Using DDR%u settings\n", mt7986_use_ddr4 ? 4 : 3); mtk_mem_init_real(); + + mtk_bl2_set_dram_size((uint64_t)mt7986_dram_size << 20); } void mtk_mem_dbg_print(const char *fmt, ...) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/release/dram.o b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/release/dram.o similarity index 53% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/release/dram.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/release/dram.o index 437eca322..8db018fd6 100644 Binary files a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/dram/release/dram.o and b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/dram/release/dram.o differ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/efuse/efuse.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/efuse/efuse.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/efuse/efuse.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/efuse/efuse.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/efuse/release/efuse_cmd.o b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/efuse/release/efuse_cmd.o similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/efuse/release/efuse_cmd.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/efuse/release/efuse_cmd.o diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.c index 29c6331d6..387d78e14 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.c @@ -179,7 +179,7 @@ static void mt_set_pinmux_mode(int gpio, int mode) val = mmio_read_32(GPIO_MODE_REG(pos)); if (GPIO_MODE_GET(val, bit) != mode) { - val &= ~(GPIO_MODE_MASK << bit); + val &= ~(GPIO_MODE_MASK << (bit * GPIO_MODE_BITS)); val |= GPIO_MODE_SET(mode, bit); mmio_write_32(GPIO_MODE_REG(pos), val); diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/gpio/mt7986_gpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/pll/pll.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/pll/pll.c similarity index 96% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/pll/pll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/pll/pll.c index 1d9fa7c1a..f0f496b1c 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/pll/pll.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/pll/pll.c @@ -152,3 +152,10 @@ void mtk_pll_init(int skip_dcm_setting) /* Enable infra cfg to conctrol msdc cg */ mmio_clrbits_32(INFRACFG_HANG_FREE_DEBUG, (0xf << 4)); } + +void mtk_pll_eth_init(void) +{ + mmio_clrsetbits_32(CLK_CFG_4, 0xffffff00, 0x01010100); + mmio_clrsetbits_32(CLK_CFG_5, 0x00ffffff, 0x00010101); + mmio_write_32(0x1001B1C0, 0x7e0000); +} diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/pll/pll.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/pll/pll.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/pll/pll.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/pll/pll.h index 7bd837e5b..c093199e2 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/pll/pll.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/pll/pll.h @@ -178,5 +178,6 @@ enum { uint32_t mt_get_ckgen_ck_freq(uint32_t id); void mtk_pll_init(int); +void mtk_pll_eth_init(void); #endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spi/boot_spi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spi/boot_spi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spi/boot_spi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spi/boot_spi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spi/boot_spi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spi/boot_spi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spi/boot_spi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spi/boot_spi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spmc/mtspmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spmc/mtspmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spmc/mtspmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spmc/mtspmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spmc/mtspmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spmc/mtspmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spmc/mtspmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spmc/mtspmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spmc/mtspmc_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spmc/mtspmc_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/spmc/mtspmc_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/spmc/mtspmc_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/timer/timer.c b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/timer/timer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/timer/timer.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/timer/timer.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/timer/timer.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/timer/timer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/drivers/timer/timer.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/drivers/timer/timer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mt7986_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mt7986_def.h similarity index 97% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mt7986_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mt7986_def.h index dc943189d..1c5719721 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/mt7986_def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mt7986_def.h @@ -15,6 +15,10 @@ /* CPU */ #define PRIMARY_CPU 0 +/* MMU */ +#define MTK_DEV_BASE 0x00200000 +#define MTK_DEV_SIZE 0x1fe00000 + /* GICv3 */ #define PLAT_ARM_GICD_BASE GIC_BASE #define PLAT_ARM_GICR_BASE (GIC_BASE + 0x80000) diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mt7986_mmu.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mt7986_mmu.h new file mode 100644 index 000000000..10b3b4259 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/mt7986_mmu.h @@ -0,0 +1,14 @@ +#ifndef MT7986_MMU_H +#define MT7986_MMU_H + +#include + +#define MAP_SEC_SYSRAM MAP_REGION_FLAT(TZRAM_BASE, \ + TZRAM_SIZE, \ + MT_MEMORY | MT_RW | MT_SECURE) + +#define MAP_DEVICE MAP_REGION_FLAT(MTK_DEV_BASE, \ + MTK_DEV_SIZE, \ + MT_DEVICE | MT_RW | MT_SECURE) + +#endif diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_eth_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_eth_def.h new file mode 100644 index 000000000..b6a641dd4 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_eth_def.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLAT_ETH_DEF_H_ +#define _PLAT_ETH_DEF_H_ + +#include +#include +#include +#include + +/* SoC-specific definitions */ +#define SGMII_BASE SGMII_SBUS0_BASE +#define ETHSYS_BASE NETSYS1_BASE +#define FE_BASE (ETHSYS_BASE + 0x100000) + +#define PDMA_BASE PDMA_V2_BASE +#define ANA_RG3_OFFS 0x128 +#define GDMA_COUNT 2 + +#define SWITCH_RESET_GPIO + +#define TXD_SIZE 32 +#define RXD_SIZE 32 + +#define SOC_CAPS (MTK_NETSYS_V2) + +#if defined(IMAGE_BL31) +#define DMA_BUF_ADDR (TZRAM_BASE + TZRAM_SIZE) /* INTER_SRAM is unusable for MT7986 */ +#define DMA_BUF_REMAP +#elif defined(IMAGE_BL2) +#include +#define DMA_BUF_ADDR SCRATCH_BUF_OFFSET +#endif + +/* Using built-in switch */ +#define GMAC_ID 0 +#define GMAC_FORCE_MODE 1 +#define GMAC_FORCE_SPEED 2500 +#define GMAC_FORCE_FULL_DUPLEX 1 +#define GMAC_INTERFACE_MODE PHY_INTERFACE_MODE_2500BASEX +#define SWITCH_MT7531 + +static inline void mtk_plat_switch_reset(bool assert) +{ + mmio_write_32(GPIO_BASE + 0x308, 0x00f00000); /* GPIO_MODE0_CLR */ + mmio_write_32(GPIO_BASE + 0x004, BIT(5)); /* GPIO_DIR0_SET */ + + if (assert) + mmio_write_32(GPIO_BASE + 0x108, BIT(5)); /* GPIO_DOUT0_CLR */ + else + mmio_write_32(GPIO_BASE + 0x104, BIT(5)); /* GPIO_DOUT0_SET */ +} + +#endif /* _PLAT_ETH_DEF_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_macros.S diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_mdump_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_mdump_def.h new file mode 100644 index 000000000..e364568ff --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_mdump_def.h @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLAT_MDUMP_DEF_H_ +#define _PLAT_MDUMP_DEF_H_ + +#include +#include "plat_eth_def.h" +#include "memdump.h" + +#define DRAM_START 0x40000000ULL +#define DRAM_END 0xC0000000ULL + +#ifdef NEED_BL32 +#define TZRAM_END (TZRAM_BASE + TZRAM_SIZE + TZRAM2_SIZE) +#else +#define TZRAM_END (TZRAM_BASE + TZRAM_SIZE) +#endif + +static const struct mdump_range mdump_ranges[] = { + { + .r = { + .addr = GIC_BASE, + .end = GIC_BASE + 0x100000, + }, + .is_device = true, + }, + { + .r = { + .addr = DRAM_START, + .end = TZRAM_BASE, + }, + .need_map = true, + }, + { + .r = { + /* We have to borrow 32KB for DMA. Please make sure reserved memory is large enough in dts. */ + .addr = TZRAM_END + 0x8000, + .end = DRAM_END, + }, + .need_map = true, + } +}; + +static inline uint32_t plat_get_rnd(uint32_t *val) +{ + *val = 0; + return 0; +} + +#endif /* _PLAT_MDUMP_DEF_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/reg_base.h b/atf-20240117-bacca82a8/plat/mediatek/mt7986/include/reg_base.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/include/reg_base.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/include/reg_base.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7986/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7986/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7986/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7986/platform.mk diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7988/Config.in b/atf-20240117-bacca82a8/plat/mediatek/mt7988/Config.in new file mode 100644 index 000000000..37c1bb70f --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/Config.in @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# MT7988 platform-specific configurations +# + +if _PLAT_MT7988 + +config _ENABLE_EIP197_SUPPORT + bool "Enable EIP197 support" + default n + +config _ENABLE_BL2_CPU_FULL_SPEED + bool "Enable BL2 CPU full speed mode" + select _ENABLE_I2C_SUPPORT + default n + +config _ENABLE_FWDL + bool "Enable BL31 FWDL SMCC" + select _REQUIRE_MBEDTLS + default n + +# Makefile options +config EIP197_SUPPORT + int + default 1 + depends on _ENABLE_EIP197_SUPPORT + +config BL2_CPU_FULL_SPEED + int + default 1 + depends on _ENABLE_BL2_CPU_FULL_SPEED + +config FWDL + int + default 1 + depends on _ENABLE_FWDL + +osource "plat/mediatek/mt7988/drivers/fwdl/Config.in" + +endif # _PLAT_MT7988 diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt7988/aarch64/plat_helpers.S similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/aarch64/plat_helpers.S index 513233198..586359113 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/aarch64/plat_helpers.S +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/aarch64/plat_helpers.S @@ -28,7 +28,6 @@ * ----------------------------------------------------- */ func plat_secondary_cold_boot_setup - /* MT7981 does not do cold boot for secondary CPU */ cb_panic: b cb_panic endfunc plat_secondary_cold_boot_setup diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/aarch64/platform_common.c similarity index 76% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/aarch64/platform_common.c index 047ae0932..b750aebe0 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/aarch64/platform_common.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/aarch64/platform_common.c @@ -9,18 +9,10 @@ #include #include #include -//#include #include #include #include -#if 0 -//static const int cci_map[] = { -// CCI_CLUSTER0_SL_IFACE_IX, -// CCI_CLUSTER1_SL_IFACE_IX -//}; -#endif - /* Table of regions to map using the MMU. */ const mmap_region_t plat_mmap[] = { /* for TF text, RO, RW */ @@ -54,27 +46,3 @@ const mmap_region_t plat_mmap[] = { /* Define EL3 variants of the function initialising the MMU */ DEFINE_CONFIGURE_MMU_EL(3) - -#if 0 -void plat_cci_init(void) -{ - /* Initialize CCI driver */ - cci_init(CCI_BASE, cci_map, ARRAY_SIZE(cci_map)); - /* Eable non-secure access*/ - mmio_write_32(CCI_BASE + CCI_SEC_ACCESS , 0x1); -} - -void plat_cci_enable(void) -{ - /* - * Enable CCI coherency for this cluster. - * No need for locks as no other cpu is active at the moment. - */ - cci_enable_snoop_dvm_reqs(MPIDR_AFFLVL1_VAL(read_mpidr())); -} - -void plat_cci_disable(void) -{ - cci_disable_snoop_dvm_reqs(MPIDR_AFFLVL1_VAL(read_mpidr())); -} -#endif diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2.mk index 13a34dc35..2784a97a8 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2.mk @@ -13,8 +13,8 @@ BL2_SIG_TYPE := sha256+rsa-pss BL2_IMG_HDR_SOC := mt7986 # Whether to enble extra feature -I2C_SUPPORT := 0 -EIP197_SUPPORT := 0 +I2C_SUPPORT ?= 0 +EIP197_SUPPORT ?= 0 ENABLE_JTAG ?= 0 FDT_SOURCES += fdts/$(DTS_NAME).dts diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_mmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_mmc.c similarity index 97% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_mmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_mmc.c index f11050933..0744cbfe3 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_mmc.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_mmc.c @@ -145,7 +145,7 @@ static void mmc_gpio_setup(void) } } -int mtk_plat_mmc_setup(void) +int mtk_plat_mmc_setup(uint32_t *num_sectors) { const struct mt7988_msdc_conf *conf = &mt7988_msdc[MSDC_INDEX]; uint32_t i; @@ -160,5 +160,8 @@ int mtk_plat_mmc_setup(void) mtk_mmc_init(conf->base, conf->top_base, conf->dev_comp, conf->src_clk, conf->type, conf->bus_width); + if (num_sectors) + *num_sectors = mtk_mmc_block_count(); + return 0; } diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_qspi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_qspi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_qspi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_qspi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_snfi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_snfi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_snfi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_snfi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_spi_nand.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_spi_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_spi_nand.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_spi_nand.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_spi_nor.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_spi_nor.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_dev_spi_nor.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_dev_spi_nor.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_plat_init.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_plat_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/bl2_plat_init.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/bl2_plat_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/dtb.S b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/dtb.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2/dtb.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2/dtb.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2pl/bl2pl.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2pl/bl2pl.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2pl/bl2pl.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2pl/bl2pl.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2pl/bl2pl_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2pl/bl2pl_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2pl/bl2pl_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2pl/bl2pl_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2pl/serial.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2pl/serial.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl2pl/serial.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl2pl/serial.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/bl31.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/bl31.mk similarity index 88% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/bl31.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/bl31.mk index 406793bf1..8504c4cdc 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/bl31.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/bl31.mk @@ -41,5 +41,14 @@ BL31_SOURCES += $(XLAT_TABLES_LIB_SRCS) BL31_CPPFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC BL31_CPPFLAGS += -I$(APSOC_COMMON)/bl31 +ifeq ($(TRUSTED_BOARD_BOOT),1) +BL31_CPPFLAGS += -DMTK_EFUSE_FIELD_NORMAL +endif + +include $(APSOC_COMMON)/bl31/memdump.mk +ifeq ($(EMERG_MEM_DUMP),1) +BL31_SOURCES += $(MTK_PLAT_SOC)/drivers/pll/pll.c +endif + MTK_SIP_KERNEL_BOOT_ENABLE := 1 $(eval $(call add_define,MTK_SIP_KERNEL_BOOT_ENABLE)) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/bl31_plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/bl31_plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/bl31_plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/bl31_plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/bl31/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/bl31/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/devapc/devapc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/devapc/devapc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/devapc/devapc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/devapc/devapc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/devapc/devapc.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/devapc/devapc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/devapc/devapc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/devapc/devapc.h diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/Config.in b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/Config.in new file mode 100644 index 000000000..ef9de692f --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/Config.in @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright (c) 2023, MediaTek Inc. All rights reserved. +# Auther: Weijie Gao +# +# MT7988 DRAM-pecific configurations +# + +if _PLAT_MT7988 + +config _MT7988_DDR4_8GB + bool "Support DDR4 8GB (2x16-bits)" + depends on _DRAM_DDR_COMB + default n + +# Makefile options +config DDR4_4BG_MODE + int + default 1 + depends on _MT7988_DDR4_8GB + +endif # _PLAT_MT7988 diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/dram-configs.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/dram-configs.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/dram-configs.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/dram-configs.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/dram.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/dram.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/dram.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/dram.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emi_mpu.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emi_mpu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emi_mpu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emi_mpu.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emi_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emi_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emi_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emi_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emicfg.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emicfg.c similarity index 94% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emicfg.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emicfg.c index eb959eb93..d8c17e90c 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/emicfg.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/emicfg.c @@ -9,6 +9,7 @@ #include #include #include +#include /* IAP/REBB eFuse bit */ #define IAP_REBB_SWITCH 0x11D00A0C @@ -23,6 +24,7 @@ extern int is_ddr4_4bg_mode; extern int mt7988_ddr3_freq; extern int mt7988_ddr4_freq; extern int mt7988_ddr_refresh_interval; +extern unsigned int mt7988_dram_size; void mtk_mem_init(void) { @@ -84,6 +86,8 @@ void mtk_mem_init(void) NOTICE("EMI: Using DDR unknown settings\n"); mtk_mem_init_real(); + + mtk_bl2_set_dram_size((uint64_t)mt7988_dram_size << 20); } void mtk_mem_dbg_print(const char *fmt, ...) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/release/dram.o b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/release/dram.o similarity index 54% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/release/dram.o rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/release/dram.o index 13c6bf03e..e99c84c59 100644 Binary files a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/dram/release/dram.o and b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/dram/release/dram.o differ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/efuse.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/efuse.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/efuse.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/efuse.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/include/efuse_atf.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/include/efuse_atf.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/include/efuse_atf.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/include/efuse_atf.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/include/efuse_cmd.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/include/efuse_cmd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/include/efuse_cmd.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/include/efuse_cmd.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/include/efuse_info.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/include/efuse_info.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/efuse/include/efuse_info.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/include/efuse_info.h diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/release/efuse_cmd.o b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/release/efuse_cmd.o new file mode 100644 index 000000000..8fa873893 Binary files /dev/null and b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/efuse/release/efuse_cmd.o differ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/eip197/eip197_init.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/eip197/eip197_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/eip197/eip197_init.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/eip197/eip197_init.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/eip197/eip197_init.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/eip197/eip197_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/eip197/eip197_init.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/eip197/eip197_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/gpio/mt7988_gpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pll/pll.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pll/pll.c similarity index 89% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pll/pll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pll/pll.c index de62383fe..cc2d1d812 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pll/pll.c +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pll/pll.c @@ -211,6 +211,28 @@ void mtk_pll_init(int skip_dcm_setting) mmio_clrbits_32(AUD_SRAM_PD_CTRL, AUD_SRAM_PWR_ON); } +void mtk_pll_eth_init(void) +{ + mmio_write_32(CLK_CFG0_SET, 0x01010101); + mmio_write_32(CLK_CFG1_SET, 0x01020101); + mmio_clrsetbits_32(CLK_CFG4_SET, 0xff000000, 0x01000000); + mmio_clrsetbits_32(CLK_CFG5_SET, 0x00ffffff, 0x00010101); + mmio_clrsetbits_32(CLK_CFG8_SET, 0xff000000, 0x01000000); + mmio_write_32(CLK_CFG9_SET, 0x01010101); + mmio_clrsetbits_32(CLK_CFG10_SET, 0x00ffffff, 0x00010101); + mmio_clrsetbits_32(CLK_CFG11_SET, 0xffffff00, 0x01010100); + mmio_clrsetbits_32(CLK_CFG12_SET, 0x000000ff, 0x00000001); + mmio_clrsetbits_32(CLK_CFG13_SET, 0xffff0000, 0x01010000); + mmio_clrsetbits_32(CLK_CFG14_SET, 0x0000ffff, 0x00000101); + mmio_clrsetbits_32(CLK_CFG16_SET, 0xff0000ff, 0x01000000); + mmio_clrsetbits_32(CLK_CFG17_SET, 0xffff0000, 0x01010000); + mmio_clrsetbits_32(CLK_CFG18_SET, 0x000000ff, 0x00000001); + + mmio_write_32(CLK_CFG_UPDATE0, 0x7800ff); + mmio_write_32(CLK_CFG_UPDATE1, 0x3C1E7F8); + mmio_write_32(CLK_CFG_UPDATE2, 0x1C9); +} + void eth_2p5g_phy_mtcmos_ctrl(int enable) { int pwr_ack, pwr_ack_2nd; diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pll/pll.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pll/pll.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pll/pll.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pll/pll.h index e5ecf7ffb..d5a7d45e8 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pll/pll.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pll/pll.h @@ -156,6 +156,7 @@ unsigned int mtk_get_cpu_freq(void); void mtk_pll_init(int); +void mtk_pll_eth_init(void); void eth_2p5g_phy_mtcmos_ctrl(int enable); diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pmic/mt6682a.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pmic/mt6682a.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pmic/mt6682a.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pmic/mt6682a.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pmic/mt6682a.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pmic/mt6682a.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/pmic/mt6682a.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/pmic/mt6682a.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spi/boot_spi.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spi/boot_spi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spi/boot_spi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spi/boot_spi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spi/boot_spi.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spi/boot_spi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spi/boot_spi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spi/boot_spi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spmc/mtspmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spmc/mtspmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spmc/mtspmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spmc/mtspmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spmc/mtspmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spmc/mtspmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spmc/mtspmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spmc/mtspmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spmc/mtspmc_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spmc/mtspmc_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/spmc/mtspmc_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/spmc/mtspmc_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/timer/cpuxgpt.c b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/timer/cpuxgpt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/timer/cpuxgpt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/timer/cpuxgpt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/timer/cpuxgpt.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/timer/cpuxgpt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/drivers/timer/cpuxgpt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/drivers/timer/cpuxgpt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/mt7988_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/mt7988_def.h similarity index 59% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/mt7988_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/include/mt7988_def.h index 72e9794d2..16069ce87 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/mt7988_def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/mt7988_def.h @@ -10,26 +10,26 @@ #include "reg_base.h" /* Special value used to verify platform parameters from BL2 to BL3-1 */ -#define MT_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL +#define MT_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL /* CPU */ -#define PRIMARY_CPU 0 +#define PRIMARY_CPU 0 /* MMU */ -#define MTK_DEV_BASE 0x00000000 -#define MTK_DEV_SIZE 0x20000000 +#define MTK_DEV_BASE 0x00200000 +#define MTK_DEV_SIZE 0x20000000 /* GICv3 */ -#define PLAT_ARM_GICD_BASE GIC_BASE -#define PLAT_ARM_GICR_BASE (GIC_BASE + 0x80000) +#define PLAT_ARM_GICD_BASE GIC_BASE +#define PLAT_ARM_GICR_BASE (GIC_BASE + 0x80000) /* Int pol ctl */ -#define NR_INT_POL_CTL 13 -#define SEC_POL_CTL_EN0 (MCUCFG_BASE + 0x0a00) -#define INT_POL_CTL0 (MCUCFG_BASE + 0x0a80) +#define NR_INT_POL_CTL 13 +#define SEC_POL_CTL_EN0 (MCUCFG_BASE + 0x0a00) +#define INT_POL_CTL0 (MCUCFG_BASE + 0x0a80) /* Watchdog */ -#define WDT_BASE TOPRGU_BASE +#define WDT_BASE TOPRGU_BASE /* DDR_RESERVE */ #define MTK_DDR_RESERVE_MODE (DRM_BASE + 0x0000) @@ -46,20 +46,20 @@ (dgroup) * 0x100) /* UART */ -#define UART_BASE UART0_BASE -#define UART_BAUDRATE 115200 -#define UART_CLOCK 40000000 +#define UART_BASE UART0_BASE +#define UART_BAUDRATE 115200 +#define UART_CLOCK 40000000 /* TIMER */ /* In ASIC design, the GPT clock rate is a half of 40M ASIC XTAL */ -#define MTK_GPT_CLOCK_RATE 40000000 / 2 +#define MTK_GPT_CLOCK_RATE (40000000 / 2) /* * In ASIC design, the systimer clock rate is a half of CK_TOP_INFRA_F26M_SEL * CK_TOP_INFRA_26M_SEL default clock rate is a half of 40M ASIC XTAL, but after * PLL initial code, the clock rate of CK_TOP_INFRA_26M_SEL become 26M */ -#define ARM_TIMER_CLOCK_RATE_0 40000000 / 2 / 2 -#define ARM_TIMER_CLOCK_RATE_1 26000000 / 2 +#define ARM_TIMER_CLOCK_RATE_0 (40000000 / 2 / 2) +#define ARM_TIMER_CLOCK_RATE_1 (26000000 / 2) /* TRNG */ #define TRNG_SWRST_SET_REG (INFRACFG_AO_BASE + 0x70) @@ -67,20 +67,20 @@ #define RNG_SWRST_B BIT(17) /* TOP_CLOCK*/ -#define CLK_CFG_3_SET (TOPCKGEN_BASE + 0x034) -#define CLK_SPI_SEL_S (0) -#define CLK_NFI1X_SEL_S (16) -#define CLK_SPINFI_BCLK_SEL_S (24) +#define CLK_CFG_3_SET (TOPCKGEN_BASE + 0x034) +#define CLK_SPI_SEL_S 0 +#define CLK_NFI1X_SEL_S 16 +#define CLK_SPINFI_BCLK_SEL_S 24 -#define CLK_CFG_3_CLR (TOPCKGEN_BASE + 0x038) -#define CLK_SPI_SEL_MASK GENMASK(2, 0) -#define CLK_NFI1X_SEL_MASK GENMASK(18, 16) -#define CLK_SPINFI_BCLK_SEL_MASK GENMASK(26, 24) +#define CLK_CFG_3_CLR (TOPCKGEN_BASE + 0x038) +#define CLK_SPI_SEL_MASK GENMASK(2, 0) +#define CLK_NFI1X_SEL_MASK GENMASK(18, 16) +#define CLK_SPINFI_BCLK_SEL_MASK GENMASK(26, 24) -#define CLK_CFG_UPDATE (TOPCKGEN_BASE + 0x1c0) -#define NFI1X_CK_UPDATE (1U << 14) -#define SPINFI_CK_UPDATE (1U << 15) -#define SPI_CK_UPDATE (1U << 12) +#define CLK_CFG_UPDATE (TOPCKGEN_BASE + 0x1c0) +#define NFI1X_CK_UPDATE (1U << 14) +#define SPINFI_CK_UPDATE (1U << 15) +#define SPI_CK_UPDATE (1U << 12) #ifndef __ASSEMBLER__ enum CLK_NFI1X_RATE { @@ -118,16 +118,16 @@ enum CLK_SPIM_RATE { #endif /* FIQ platform related define */ -#define MT_IRQ_SEC_SGI_0 8 -#define MT_IRQ_SEC_SGI_1 9 -#define MT_IRQ_SEC_SGI_2 10 -#define MT_IRQ_SEC_SGI_3 11 -#define MT_IRQ_SEC_SGI_4 12 -#define MT_IRQ_SEC_SGI_5 13 -#define MT_IRQ_SEC_SGI_6 14 -#define MT_IRQ_SEC_SGI_7 15 +#define MT_IRQ_SEC_SGI_0 8 +#define MT_IRQ_SEC_SGI_1 9 +#define MT_IRQ_SEC_SGI_2 10 +#define MT_IRQ_SEC_SGI_3 11 +#define MT_IRQ_SEC_SGI_4 12 +#define MT_IRQ_SEC_SGI_5 13 +#define MT_IRQ_SEC_SGI_6 14 +#define MT_IRQ_SEC_SGI_7 15 /* Define maximum page size for NAND devices */ -#define PLATFORM_MTD_MAX_PAGE_SIZE 0x1000 +#define PLATFORM_MTD_MAX_PAGE_SIZE 0x1000 #endif /* MT7988_DEF_H */ diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_eth_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_eth_def.h new file mode 100644 index 000000000..23baa1b4c --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_eth_def.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLAT_ETH_DEF_H_ +#define _PLAT_ETH_DEF_H_ + +/* SoC-specific definitions */ +#define SGMII_BASE SGMII_SBUS0_BASE +#define ETHSYS_BASE NETSYS1_BASE +#define FE_BASE (ETHSYS_BASE + 0x100000) + +#define PDMA_BASE PDMA_V3_BASE +#define ANA_RG3_OFFS 0x128 +#define GDMA_COUNT 3 + +#define SWITCH_RESET_MCM +#define SWITCH_RESET_MCM_REG (ETHSYS_BASE + 0x31008) +#define SWITCH_RESET_MCM_BIT 9 + +#define TXD_SIZE 32 +#define RXD_SIZE 32 + +#define SOC_CAPS (MTK_NETSYS_V3 | MTK_INFRA | \ + MTK_RSTCTRL_PPE1 | MTK_RSTCTRL_PPE2) + +#if defined(IMAGE_BL31) +#define DMA_BUF_ADDR INTER_SRAM +#define DMA_BUF_REMAP +#elif defined(IMAGE_BL2) +#include +#define DMA_BUF_ADDR SCRATCH_BUF_OFFSET +#endif + +/* Using built-in switch */ +#define GMAC_ID 0 +#define GMAC_FORCE_MODE 1 +#define GMAC_FORCE_SPEED 10000 +#define GMAC_FORCE_FULL_DUPLEX 1 +#define GMAC_INTERFACE_MODE PHY_INTERFACE_MODE_USXGMII +#define SWITCH_MT7988 + +#endif /* _PLAT_ETH_DEF_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_macros.S diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_mdump_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_mdump_def.h new file mode 100644 index 000000000..e4f761e91 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_mdump_def.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023, MediaTek Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef _PLAT_MDUMP_DEF_H_ +#define _PLAT_MDUMP_DEF_H_ + +#include +#include "plat_eth_def.h" +#include +#include "memdump.h" + +#define DRAM_START 0x40000000ULL +#define DRAM_END 0x240000000ULL + +#ifdef NEED_BL32 +#define TZRAM_END (TZRAM_BASE + TZRAM_SIZE + TZRAM2_SIZE) +#else +#define TZRAM_END (TZRAM_BASE + TZRAM_SIZE) +#endif + +static const struct mdump_range mdump_ranges[] = { + { + .r = { + .addr = GIC_BASE, + .end = GIC_BASE + 0x100000, + }, + .is_device = true, + }, + { + .r = { + .addr = DRAM_START, + .end = TZRAM_BASE, + }, + .need_map = true, + }, + { + .r = { + .addr = TZRAM_END, + .end = DRAM_END, + }, + .need_map = true, + } +}; + +#endif /* _PLAT_MDUMP_DEF_H_ */ diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/platform_def.h similarity index 70% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/include/platform_def.h index 4d34ecb56..784fa353c 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/platform_def.h @@ -16,38 +16,39 @@ /******************************************************************************* * Platform binary types for linking ******************************************************************************/ -#define PLATFORM_LINKER_FORMAT "elf64-littleaarch64" -#define PLATFORM_LINKER_ARCH aarch64 +#define PLATFORM_LINKER_FORMAT "elf64-littleaarch64" +#define PLATFORM_LINKER_ARCH aarch64 /******************************************************************************* * Generic platform constants ******************************************************************************/ +#define SOC_CHIP_ID U(0x7988) /* Size of cacheable stacks */ #if defined(IMAGE_BL1) -#define PLATFORM_STACK_SIZE 0x440 +#define PLATFORM_STACK_SIZE 0x440 #elif defined(IMAGE_BL2) -#define PLATFORM_STACK_SIZE 0x1000 +#define PLATFORM_STACK_SIZE 0x1000 #elif defined(IMAGE_BL31) -#define PLATFORM_STACK_SIZE 0x2000 +#define PLATFORM_STACK_SIZE 0x2000 #elif defined(IMAGE_BL32) -#define PLATFORM_STACK_SIZE 0x440 +#define PLATFORM_STACK_SIZE 0x440 #endif -#define FIRMWARE_WELCOME_STR "Booting Trusted Firmware\n" +#define FIRMWARE_WELCOME_STR "Booting Trusted Firmware\n" -#define PLATFORM_MAX_AFFLVL MPIDR_AFFLVL2 -#define PLAT_MAX_PWR_LVL U(2) -#define PLAT_MAX_RET_STATE U(1) -#define PLAT_MAX_OFF_STATE U(2) -#define PLATFORM_SYSTEM_COUNT 1 -#define PLATFORM_CLUSTER_COUNT 1 +#define PLATFORM_MAX_AFFLVL MPIDR_AFFLVL2 +#define PLAT_MAX_PWR_LVL U(2) +#define PLAT_MAX_RET_STATE U(1) +#define PLAT_MAX_OFF_STATE U(2) +#define PLATFORM_SYSTEM_COUNT 1 +#define PLATFORM_CLUSTER_COUNT 1 -#define PLATFORM_CLUSTER0_CORE_COUNT 4 -#define PLATFORM_CLUSTER1_CORE_COUNT 0 +#define PLATFORM_CLUSTER0_CORE_COUNT 4 +#define PLATFORM_CLUSTER1_CORE_COUNT 0 #define PLATFORM_CORE_COUNT \ (PLATFORM_CLUSTER1_CORE_COUNT + PLATFORM_CLUSTER0_CORE_COUNT) -#define PLATFORM_MAX_CPUS_PER_CLUSTER 4 +#define PLATFORM_MAX_CPUS_PER_CLUSTER 4 #define PLATFORM_NUM_AFFS \ (PLATFORM_SYSTEM_COUNT + PLATFORM_CLUSTER_COUNT + PLATFORM_CORE_COUNT) @@ -57,18 +58,13 @@ /* TF txet, ro, rw, xlat table, coherent memory ... etc. * Size: release: 128KB, debug: 128KB */ -#define IMAGE_LOAD_ADDR (0x40000000) -#define TZRAM_BASE (0x43000000) -#if DEBUG -#define TZRAM_SIZE (0x40000) -#else -#define TZRAM_SIZE (0x40000) -#endif +#define IMAGE_LOAD_ADDR 0x40000000 +#define TZRAM_BASE 0x43000000 +#define TZRAM_SIZE 0x40000 /* Reserved: 64KB */ -#define TZRAM2_BASE (TZRAM_BASE + TZRAM_SIZE) -#define TZRAM2_SIZE OPTEE_TZRAM_SIZE -#define SOC_CHIP_ID U(0x7988) +#define TZRAM2_BASE (TZRAM_BASE + TZRAM_SIZE) +#define TZRAM2_SIZE OPTEE_TZRAM_SIZE /******************************************************************************* * BL2 specific defines. @@ -77,46 +73,46 @@ /* mt7988's SRAM hardware mapping is 0x200000~0x280000. * We assume that BL2_BASE is usually 0x201000 here. */ -#define BL2_LIMIT (BL2_BASE + 0x80000 - 0x1000) +#define BL2_LIMIT (BL2_BASE + 0x80000 - 0x1000) -#define MAX_IO_DEVICES U(3) -#define MAX_IO_HANDLES U(4) -#define MAX_IO_BLOCK_DEVICES 1 +#define MAX_IO_DEVICES U(3) +#define MAX_IO_HANDLES U(4) +#define MAX_IO_BLOCK_DEVICES 1 /******************************************************************************* * BL2PL specific defines. ******************************************************************************/ -#define BL2PL_BASE (0x100000) -#define BL2PL_LIMIT (0x110000) +#define BL2PL_BASE 0x100000 +#define BL2PL_LIMIT 0x110000 -#define L2_SRAM_BASE (0x200000) -#define L2_SRAM_SIZE (0x80000) +#define L2_SRAM_BASE 0x200000 +#define L2_SRAM_SIZE 0x80000 /******************************************************************************* * BL31 specific defines. ******************************************************************************/ -#define BL31_BASE (TZRAM_BASE + 0x1000) -#define BL31_LIMIT (TZRAM_BASE + TZRAM_SIZE) +#define BL31_BASE (TZRAM_BASE + 0x1000) +#define BL31_LIMIT (TZRAM_BASE + TZRAM_SIZE) -#define BL32_BASE (TZRAM2_BASE + 0x1000) -#define BL32_LIMIT (TZRAM2_BASE + TZRAM2_SIZE) -#define BL32_HEADER_SIZE (0x1c) +#define BL32_BASE (TZRAM2_BASE + 0x1000) +#define BL32_LIMIT (TZRAM2_BASE + TZRAM2_SIZE) +#define BL32_HEADER_SIZE 0x1c -#define BL33_BASE (0x41e00000) +#define BL33_BASE 0x41e00000 /******************************************************************************* * FIP decompression specific defines. ******************************************************************************/ -#define FIP_DECOMP_TEMP_BASE (0x42000000) -#define FIP_DECOMP_TEMP_SIZE (0x400000) +#define FIP_DECOMP_TEMP_BASE 0x42000000 +#define FIP_DECOMP_TEMP_SIZE 0x400000 /******************************************************************************* * Platform specific page table and MMU setup constants ******************************************************************************/ -#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) -#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) -#define MAX_XLAT_TABLES 16 -#define MAX_MMAP_REGIONS 16 +#define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 34) +#define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 36) +#define MAX_XLAT_TABLES 16 +#define MAX_MMAP_REGIONS 16 /******************************************************************************* * Declarations and constants to access the mailboxes safely. Each mailbox is @@ -127,8 +123,8 @@ * get written while being protected by different locks causing corruption of * a valid mailbox address. ******************************************************************************/ -#define CACHE_WRITEBACK_SHIFT 6 -#define CACHE_WRITEBACK_GRANULE (1 << CACHE_WRITEBACK_SHIFT) +#define CACHE_WRITEBACK_SHIFT 6 +#define CACHE_WRITEBACK_GRANULE (1 << CACHE_WRITEBACK_SHIFT) #define PLAT_ARM_G1S_IRQ_PROPS(grp) \ INTR_PROP_DESC(MT_IRQ_SEC_SGI_0, GIC_HIGHEST_SEC_PRIORITY, grp, \ @@ -152,9 +148,6 @@ /******************************************************************************* * Platform specific IRQ - ******************************************************************************/ -//#define WDT_IRQ_BIT_ID (160) -//#define FIQ_SMP_CALL_SGI (13) -//#define ATF_LOG_IRQ_ID (281) + ******************************************************************************/ #endif /* PLATFORM_DEF_H */ diff --git a/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/reg_base.h b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/reg_base.h new file mode 100644 index 000000000..a1e988cfd --- /dev/null +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/include/reg_base.h @@ -0,0 +1,160 @@ + + +/* + * Not inside DE memory map + */ +#define GIC_BASE 0x0C000000 +#define INTER_SRAM 0x00100000 + +/* + * Base on memory_map_to_reg_base_H.py + */ + +/* SRAMROM */ +#define ROM_BASE 0x00000000 +/* SRAMROM */ +#define RAM_BASE 0x00100000 +/* L2C */ +#define L2C_BASE 0x00200000 +/* HW_VER CID */ +#define HW_VER_CID_BASE 0x08000000 +/* DEVAPC TOPS_PERI_BUS_AO_PDN_PDN */ +#define DEVAPC_TOPS_PERI_BUS_AO_PDN_PDN_BASE 0x09129000 +/* DEVAPC TOPS_PERI_BUS_AO_PDN */ +#define DEVAPC_TOPS_PERI_BUS_AO_PDN_BASE 0x0912C000 +/* DEVAPC TOPS_BUS_AO_PDN_PDN */ +#define DEVAPC_TOPS_BUS_AO_PDN_PDN_BASE 0x09139000 +/* DEVAPC TOPS_BUS_AO_PDN */ +#define DEVAPC_TOPS_BUS_AO_PDN_BASE 0x0913C000 +/* DEVAPC CLUST_PERI_BUS_AO_PDN_PDN */ +#define DEVAPC_CLUST_PERI_BUS_AO_PDN_PDN_BASE 0x09629000 +/* DEVAPC CLUST_PERI_BUS_AO_PDN */ +#define DEVAPC_CLUST_PERI_BUS_AO_PDN_BASE 0x0962C000 +/* DEVAPC CLUST_BUS_AO_PDN_PDN */ +#define DEVAPC_CLUST_BUS_AO_PDN_PDN_BASE 0x09639000 +/* DEVAPC CLUST_BUS_AO_PDN */ +#define DEVAPC_CLUST_BUS_AO_PDN_BASE 0x0963C000 +/* DEBUGSYS */ +#define DEBUGSYS_BASE 0x0D000000 +/* INFRA_CFG_AO */ +#define INFRACFG_AO_BASE 0x10001000 +/* INFRA_CFG_AO_MEM */ +#define INFRACFG_AO_MEM_BASE 0x10002000 +/* PERICFG_AO */ +#define PERICFG_AO_BASE 0x10003000 +/* APXGPT */ +#define APXGPT_BASE 0x10008000 +/* Reserved */ +#define RESERVED_BASE 0x10009000 +/* AP_CIRQ_ENIT_APB */ +#define AP_CIRQ_ENIT_APB_BASE 0x1000B000 +/* SYS_TIMER */ +#define SYS_TIMER_BASE 0x10017000 +#define TOPCKGEN_BASE 0x1001B000 +#define TOPRGU_BASE 0x1001C000 +#define DRM_BASE 0x1001D000 +#define APMIXEDSYS_BASE 0x1001E000 +/* Pinmux0 */ +#define PINMUX0_BASE 0x10021000 +/* Pinmux1 */ +#define PINMUX1_BASE 0x10022000 +/* PWM */ +#define PWM_BASE 0x10048000 +/* SGMII_SBUS0 */ +#define SGMII_SBUS0_BASE 0x10060000 +/* SGMII_SBUS1 */ +#define SGMII_SBUS1_BASE 0x10070000 +/* USXGMII */ +#define USXGMII_BASE 0x10080000 +/* SYS_CIRQ */ +#define SYS_CIRQ_BASE 0x10204000 +/* INFRACFG_PDN */ +#define INFRACFG_PDN_BASE 0x1020E000 +/* TRNG */ +#define TRNG_BASE 0x1020f000 +/* CQ_DMA */ +#define CQ_DMA_BASE 0x10212000 +/* SRAMROM_APB */ +#define SRAMROM_APB_BASE 0x10214000 +/* AP_DMA */ +#define AP_DMA_BASE 0x10217000 +/* EMI_APB */ +#define EMI_APB_BASE 0x10219000 +/* INFRACFG_MEM_APB */ +#define INFRACFG_MEM_APB_BASE 0x1021C000 +/* EMI_FAKE_ENGINE0 */ +#define EMI_FAKE_ENGINE0_BASE 0x10225000 +/* EMI_MPU_APB */ +#define EMI_MPU_APB_BASE 0x10226000 +/* EMI_FAKE_ENGINE1 */ +#define EMI_FAKE_ENGINE1_BASE 0x10227000 +/* DRAMC_CH0 */ +#define DRAMC_CH0_BASE 0x10230000 +/* DRAMC_CH1 */ +#define DRAMC_CH1_BASE 0x10240000 +/* EIP97 */ +#define EIP97_BASE 0x10320000 +/* MCUSYS_CFGREG_APB */ +#define MCUSYS_CFGREG_APB_BASE 0x10390000 +/* MCUSYS_CFGREG_APB-1 */ +#define MCUSYS_CFGREG_APB_1_BASE 0x100E0000 +#define MCUCFG_BASE MCUSYS_CFGREG_APB_1_BASE +#define MCUCFG_CA73 0x100E2000 + +/* UART0 */ +#define UART0_BASE 0x11000000 +/* UART1 */ +#define UART1_BASE 0x11000100 +/* UART2 */ +#define UART2_BASE 0x11000200 +/* NFI */ +#define NFI_BASE 0x11001000 +/* NFI_ECC */ +#define NFI_ECC_BASE 0x11002000 +/* I2C */ +#define I2C_BASE 0x11008000 +/* SPI0 */ +#define SPI0_BASE 0x11007000 +/* SPI1 */ +#define SPI1_BASE 0x11008000 +/* PTP_THERM_CTRL */ +#define PTP_THERM_CTRL_BASE 0x1100C000 +/* AUXADC */ +#define AUXADC_BASE 0x1100D000 +/* AUDIO_S */ +#define AUDIO_S_BASE 0x11210000 +/* AUDIO_S-1 */ +#define AUDIO_S_1_BASE 0x11219000 +/* MDSC0 */ +#define MSDC0_BASE 0x11230000 +/* EAST0 */ +#define PCIE_PHYD_L0_BASE 0x11C00000 +/* EAST1 */ +#define PCIE_PHYD_L1_BASE 0x11C10000 +/* MDSC0 TOP */ +#define MSDC0_TOP_BASE 0x11C20000 +/* WEST0 */ +#define EFUSE_CONTROLLER_BASE 0x11E00000 +/* WEST1 */ +#define USB_PHYD_BASE 0x11E10000 +/* TOP Misc */ +#define TOP_MISC_BASE 0x11D10000 +/* XFI */ +#define XFI_PEXTP_BASE 0x11F20000 +#define XFI_PLL_BASE 0x11F40000 +/* NETSYS1 */ +#define NETSYS1_BASE 0x15000000 +/* NETSYS2 */ +#define NETSYS2_BASE 0x15180000 +/* NETSYS3 */ +#define NETSYS3_BASE 0x1518C000 +/* NETSYS4 */ +#define NETSYS4_BASE 0x151C0000 +/* CONNSYS */ +#define CONNSYS_BASE 0x18000000 +/* DEVAPC_FMEM_AO */ +#define DEVAPC_FMEM_AO_BASE 0x1A0F0000 +/* DEVAPC_INFRA_AO */ +#define DEVAPC_INFRA_AO_BASE 0x1A100000 +/* DEVAPC_INFRA_PDN */ +#define DEVAPC_INFRA_PDN_BASE 0x1A110000 diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt7988/platform.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/mediatek/mt7988/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt7988/platform.mk index ad814d5d9..3dd3311e9 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt7988/platform.mk +++ b/atf-20240117-bacca82a8/plat/mediatek/mt7988/platform.mk @@ -50,7 +50,7 @@ OPTEE_TZRAM_SIZE := 0x10000 ifneq ($(BL32),) ifeq ($(TRUSTED_BOARD_BOOT),1) CPPFLAGS += -DNEED_BL32 -OPTEE_TZRAM_SIZE := 0xfb0000 +OPTEE_TZRAM_SIZE := 0x400000 endif endif CPPFLAGS += -DOPTEE_TZRAM_SIZE=$(OPTEE_TZRAM_SIZE) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt8173/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/crypt/crypt.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/crypt/crypt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/crypt/crypt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/crypt/crypt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/crypt/crypt.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/crypt/crypt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/crypt/crypt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/crypt/crypt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/mtcmos/mtcmos.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/pmic/pmic_wrap_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/rtc/rtc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/rtc/rtc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/rtc/rtc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/rtc/rtc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/rtc/rtc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/rtc/rtc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/rtc/rtc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/rtc/rtc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_hotplug.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_hotplug.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_hotplug.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_hotplug.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_mcdi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_mcdi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_suspend.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_suspend.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_suspend.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_suspend.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/spm/spm_suspend.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/spm/spm_suspend.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/timer/mt_cpuxgpt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/wdt/wdt.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/wdt/wdt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/wdt/wdt.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/wdt/wdt.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/wdt/wdt.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/wdt/wdt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/drivers/wdt/wdt.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/drivers/wdt/wdt.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/mt8173_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/mt8173_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/mt8173_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/mt8173_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/power_tracer.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/power_tracer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/power_tracer.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/power_tracer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/scu.h b/atf-20240117-bacca82a8/plat/mediatek/mt8173/include/scu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/include/scu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/include/scu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_mt_gic.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_mt_gic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_mt_gic.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_mt_gic.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_topology.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/plat_topology.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8173/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/power_tracer.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/power_tracer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/power_tracer.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/power_tracer.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8173/scu.c b/atf-20240117-bacca82a8/plat/mediatek/mt8173/scu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8173/scu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8173/scu.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt8183/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/devapc/devapc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/devapc/devapc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/devapc/devapc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/devapc/devapc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/devapc/devapc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/devapc/devapc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/devapc/devapc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/devapc/devapc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/emi_mpu/emi_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/gpio/mtgpio.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/gpio/mtgpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/gpio/mtgpio.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/gpio/mtgpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/gpio/mtgpio.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/gpio/mtgpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/gpio/mtgpio.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/gpio/mtgpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/gpio/mtgpio_cfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/gpio/mtgpio_cfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/gpio/mtgpio_cfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/gpio/mtgpio_cfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcdi/mtk_mcdi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcsi/mcsi.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcsi/mcsi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcsi/mcsi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcsi/mcsi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcsi/mcsi.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcsi/mcsi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/mcsi/mcsi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/mcsi/mcsi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/pmic/pmic.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/pmic/pmic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/pmic/pmic.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/pmic/pmic.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/pmic/pmic.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/pmic/pmic.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/pmic/pmic.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/pmic/pmic.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/pmic/pmic_wrap_init.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/pmic/pmic_wrap_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/pmic/pmic_wrap_init.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/pmic/pmic_wrap_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/rtc/rtc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/rtc/rtc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/rtc/rtc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/rtc/rtc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/rtc/rtc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/rtc/rtc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/rtc/rtc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/rtc/rtc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_pmic_wrap.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_suspend.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_suspend.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_suspend.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_suspend.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spm/spm_suspend.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spm/spm_suspend.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spmc/mtspmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spmc/mtspmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spmc/mtspmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spmc/mtspmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spmc/mtspmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spmc/mtspmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spmc/mtspmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spmc/mtspmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spmc/mtspmc_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spmc/mtspmc_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/spmc/mtspmc_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/spmc/mtspmc_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/sspm/sspm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/sspm/sspm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/sspm/sspm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/sspm/sspm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/sspm/sspm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/sspm/sspm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/sspm/sspm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/sspm/sspm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/timer/mt_timer.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/timer/mt_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/timer/mt_timer.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/timer/mt_timer.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/timer/mt_timer.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/timer/mt_timer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/drivers/timer/mt_timer.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/drivers/timer/mt_timer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/mt_gic_v3.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/mt_gic_v3.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/mt_gic_v3.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/mt_gic_v3.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_dcm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_dcm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_dcm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_dcm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_debug.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_debug.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_debug.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_debug.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/power_tracer.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/power_tracer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/power_tracer.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/power_tracer.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/scu.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/scu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/scu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/scu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/sspm_reg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8183/include/sspm_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/include/sspm_reg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/include/sspm_reg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_dcm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_dcm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_dcm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_dcm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_debug.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_debug.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_debug.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_debug.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_mt_gic.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_mt_gic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_mt_gic.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_mt_gic.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_topology.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/plat_topology.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8183/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8183/scu.c b/atf-20240117-bacca82a8/plat/mediatek/mt8183/scu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8183/scu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8183/scu.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt8186/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dcm/mtk_dcm_utils.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dfd/plat_dfd.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dfd/plat_dfd.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dfd/plat_dfd.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dfd/plat_dfd.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dfd/plat_dfd.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dfd/plat_dfd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/dfd/plat_dfd.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/dfd/plat_dfd.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/emi_mpu/emi_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/gpio/mtgpio.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/gpio/mtgpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/gpio/mtgpio.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/gpio/mtgpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/gpio/mtgpio.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/gpio/mtgpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/gpio/mtgpio.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/gpio/mtgpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm_cpc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_lp_irqremain.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/mcdi/mt_mcdi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/pmic/pmic.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/pmic/pmic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/pmic/pmic.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/pmic/pmic.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/pmic/pmic.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/pmic/pmic.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/pmic/pmic.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/pmic/pmic.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/pmic/pmic_wrap_init.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/pmic/pmic_wrap_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/pmic/pmic_wrap_init.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/pmic/pmic_wrap_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/rtc/rtc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/rtc/rtc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/rtc/rtc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/rtc/rtc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/rtc/rtc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/rtc/rtc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/rtc/rtc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/rtc/rtc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/build.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/build.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/build.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/build.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_bus26m.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_bus26m.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_bus26m.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_bus26m.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_dram.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_dram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_dram.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_dram.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_internal.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_syspll.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_syspll.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_syspll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/constraints/mt_spm_rc_syspll.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_cond.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_conservation.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_constraint.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_constraint.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_constraint.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_constraint.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_extern.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_idle.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_pmic_wrap.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_reg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_reg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_reg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_resource_req.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_resource_req.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_resource_req.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_resource_req.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_suspend.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/mt_spm_vcorefs.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_notifier.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_notifier.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_notifier.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_notifier.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_intc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_intc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_intc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_intc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_notifier.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_notifier.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_notifier.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/notifier/mt_spm_sspm_notifier.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/pcm_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/pcm_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/pcm_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/pcm_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/sleep_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/sleep_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spm/sleep_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spm/sleep_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spmc/mtspmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spmc/mtspmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spmc/mtspmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spmc/mtspmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spmc/mtspmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spmc/mtspmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spmc/mtspmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spmc/mtspmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spmc/mtspmc_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spmc/mtspmc_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/drivers/spmc/mtspmc_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/drivers/spmc/mtspmc_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/mt_spm_resource_req.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/mt_spm_resource_req.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/mt_spm_resource_req.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/mt_spm_resource_req.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_helpers.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_helpers.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_helpers.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_mtk_lpm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_mtk_lpm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_mtk_lpm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_mtk_lpm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_pm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_pm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_pm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_uart.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_uart.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/plat_uart.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/plat_uart.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/sspm_reg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8186/include/sspm_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/include/sspm_reg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/include/sspm_reg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/plat_topology.c b/atf-20240117-bacca82a8/plat/mediatek/mt8186/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/plat_topology.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8186/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8186/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8186/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8186/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/plat_helpers.h b/atf-20240117-bacca82a8/plat/mediatek/mt8188/include/plat_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/plat_helpers.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/include/plat_helpers.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt8188/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8188/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8188/include/platform_def.h similarity index 96% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/include/platform_def.h index 0a7ae6d40..71a4e9704 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt8188/include/platform_def.h @@ -107,7 +107,13 @@ #define CIRQ_SPI_START (96) /******************************************************************************* - * MM IOMMU & SMI related constants + * MM IOMMU related constants + ******************************************************************************/ +#define VDO_SECURE_IOMMU_BASE (IO_PHYS + 0x0c028000 + 0x4000) +#define VPP_SECURE_IOMMU_BASE (IO_PHYS + 0x04018000 + 0x4000) + +/******************************************************************************* + * SMI larb constants ******************************************************************************/ #define SMI_LARB_0_BASE (IO_PHYS + 0x0c022000) #define SMI_LARB_1_BASE (IO_PHYS + 0x0c023000) diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/spm_reg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8188/include/spm_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/include/spm_reg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/include/spm_reg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/plat_config.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8188/plat_config.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/plat_config.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/plat_config.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/plat_mmap.c b/atf-20240117-bacca82a8/plat/mediatek/mt8188/plat_mmap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/plat_mmap.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/plat_mmap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8188/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8188/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8188/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8188/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt8192/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/apusys/mtk_apusys_apc_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dcm/mtk_dcm_utils.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/devapc/devapc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/devapc/devapc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/devapc/devapc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/devapc/devapc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/devapc/devapc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/devapc/devapc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/devapc/devapc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/devapc/devapc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dfd/plat_dfd.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dfd/plat_dfd.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dfd/plat_dfd.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dfd/plat_dfd.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dfd/plat_dfd.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dfd/plat_dfd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/dfd/plat_dfd.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/dfd/plat_dfd.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/emi_mpu/emi_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/gpio/mtgpio.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/gpio/mtgpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/gpio/mtgpio.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/gpio/mtgpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/gpio/mtgpio.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/gpio/mtgpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/gpio/mtgpio.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/gpio/mtgpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm_cpc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_lp_irqremain.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/mcdi/mt_mcdi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/pmic/pmic_wrap_init.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/pmic/pmic_wrap_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/pmic/pmic_wrap_init.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/pmic/pmic_wrap_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_common.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_common.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_common.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_main.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_main.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_main.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/ptp3/mtk_ptp3_main.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/build.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/build.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/build.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/build.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_bus26m.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_bus26m.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_bus26m.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_bus26m.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_dram.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_dram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_dram.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_dram.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_internal.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_syspll.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_syspll.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_syspll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/constraints/mt_spm_rc_syspll.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_cond.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_conservation.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_constraint.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_constraint.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_constraint.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_constraint.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_idle.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_pmic_wrap.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_reg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_reg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_reg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_resource_req.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_resource_req.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_resource_req.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_resource_req.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_suspend.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/mt_spm_vcorefs.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_notifier.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_notifier.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_notifier.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_notifier.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_intc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_intc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_intc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_intc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_notifier.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_notifier.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_notifier.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/notifier/mt_spm_sspm_notifier.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/pcm_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/pcm_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/pcm_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/pcm_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/sleep_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/sleep_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spm/sleep_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spm/sleep_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spmc/mtspmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spmc/mtspmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spmc/mtspmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spmc/mtspmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spmc/mtspmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spmc/mtspmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spmc/mtspmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spmc/mtspmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spmc/mtspmc_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spmc/mtspmc_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/drivers/spmc/mtspmc_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/drivers/spmc/mtspmc_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_helpers.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_helpers.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_helpers.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_mtk_lpm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_mtk_lpm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_mtk_lpm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_mtk_lpm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_pm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_pm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_pm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/rtc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8192/include/rtc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/include/rtc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/include/rtc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/plat_topology.c b/atf-20240117-bacca82a8/plat/mediatek/mt8192/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/plat_topology.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8192/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8192/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8192/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8192/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/mediatek/mt8195/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupll.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupll.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupll.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/apupwr_clkctl_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/apusys/mtk_apusys.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dcm/mtk_dcm_utils.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dfd/plat_dfd.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dfd/plat_dfd.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dfd/plat_dfd.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dfd/plat_dfd.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dfd/plat_dfd.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dfd/plat_dfd.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/dfd/plat_dfd.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/dfd/plat_dfd.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/emi_mpu/emi_mpu.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/gpio/mtgpio.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/gpio/mtgpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/gpio/mtgpio.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/gpio/mtgpio.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/gpio/mtgpio.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/gpio/mtgpio.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/gpio/mtgpio.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/gpio/mtgpio.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm_cpc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_lp_irqremain.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/mcdi/mt_mcdi.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/pmic/pmic_wrap_init.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/pmic/pmic_wrap_init.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/pmic/pmic_wrap_init.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/pmic/pmic_wrap_init.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/ptp3/ptp3_plat.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/ptp3/ptp3_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/ptp3/ptp3_plat.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/ptp3/ptp3_plat.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/build.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/build.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/build.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/build.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_bus26m.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_bus26m.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_bus26m.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_bus26m.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_cpu_buck_ldo.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_dram.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_dram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_dram.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_dram.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_internal.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_syspll.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_syspll.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_syspll.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/constraints/mt_spm_rc_syspll.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_cond.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_constraint.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_constraint.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_constraint.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_constraint.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_idle.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_internal.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_pmic_wrap.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_reg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_reg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_reg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_reg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_resource_req.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_resource_req.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_resource_req.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_resource_req.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_suspend.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/mt_spm_vcorefs.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_notifier.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_notifier.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_notifier.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_notifier.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_intc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_intc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_intc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_intc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_notifier.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_notifier.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_notifier.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/notifier/mt_spm_sspm_notifier.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/pcm_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/pcm_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/pcm_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/pcm_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/sleep_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/sleep_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spm/sleep_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spm/sleep_def.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spmc/mtspmc.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spmc/mtspmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spmc/mtspmc.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spmc/mtspmc.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spmc/mtspmc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spmc/mtspmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spmc/mtspmc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spmc/mtspmc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spmc/mtspmc_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spmc/mtspmc_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/drivers/spmc/mtspmc_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/drivers/spmc/mtspmc_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/mcucfg.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/mcucfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/mcucfg.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/mcucfg.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_helpers.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_helpers.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_helpers.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_helpers.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_macros.S b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_mtk_lpm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_mtk_lpm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_mtk_lpm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_mtk_lpm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_pm.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_pm.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_pm.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_private.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_private.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/platform_def.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/platform_def.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/platform_def.h index 2a2f559da..8696f2a12 100644 --- a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/platform_def.h @@ -133,7 +133,7 @@ * Platform memory map related constants ******************************************************************************/ #define TZRAM_BASE 0x54600000 -#define TZRAM_SIZE 0x00030000 +#define TZRAM_SIZE 0x00040000 /******************************************************************************* * BL31 specific defines. diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/rtc.h b/atf-20240117-bacca82a8/plat/mediatek/mt8195/include/rtc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/include/rtc.h rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/include/rtc.h diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/plat_pm.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/plat_pm.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/plat_topology.c b/atf-20240117-bacca82a8/plat/mediatek/mt8195/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/plat_topology.c rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/mt8195/platform.mk b/atf-20240117-bacca82a8/plat/mediatek/mt8195/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/mt8195/platform.mk rename to atf-20240117-bacca82a8/plat/mediatek/mt8195/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/mediatek/topology/armv8_2/topology.c b/atf-20240117-bacca82a8/plat/mediatek/topology/armv8_2/topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/topology/armv8_2/topology.c rename to atf-20240117-bacca82a8/plat/mediatek/topology/armv8_2/topology.c diff --git a/atf-20231013-0ea67d76a/plat/mediatek/topology/rules.mk b/atf-20240117-bacca82a8/plat/mediatek/topology/rules.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/mediatek/topology/rules.mk rename to atf-20240117-bacca82a8/plat/mediatek/topology/rules.mk diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/common/nuvoton_helpers.S b/atf-20240117-bacca82a8/plat/nuvoton/common/nuvoton_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/common/nuvoton_helpers.S rename to atf-20240117-bacca82a8/plat/nuvoton/common/nuvoton_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/common/nuvoton_pm.c b/atf-20240117-bacca82a8/plat/nuvoton/common/nuvoton_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/common/nuvoton_pm.c rename to atf-20240117-bacca82a8/plat/nuvoton/common/nuvoton_pm.c diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/common/nuvoton_topology.c b/atf-20240117-bacca82a8/plat/nuvoton/common/nuvoton_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/common/nuvoton_topology.c rename to atf-20240117-bacca82a8/plat/nuvoton/common/nuvoton_topology.c diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/common/plat_nuvoton_gic.c b/atf-20240117-bacca82a8/plat/nuvoton/common/plat_nuvoton_gic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/common/plat_nuvoton_gic.c rename to atf-20240117-bacca82a8/plat/nuvoton/common/plat_nuvoton_gic.c diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_bl31_setup.c b/atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_bl31_setup.c rename to atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_common.c b/atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_common.c rename to atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_common.c diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_psci.c b/atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_psci.c rename to atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_psci.c diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_serial_port.c b/atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_serial_port.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/npcm845x_serial_port.c rename to atf-20240117-bacca82a8/plat/nuvoton/npcm845x/npcm845x_serial_port.c diff --git a/atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/platform.mk b/atf-20240117-bacca82a8/plat/nuvoton/npcm845x/platform.mk similarity index 94% rename from atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/platform.mk rename to atf-20240117-bacca82a8/plat/nuvoton/npcm845x/platform.mk index 5120cc6c6..92c7e2fec 100644 --- a/atf-20231013-0ea67d76a/plat/nuvoton/npcm845x/platform.mk +++ b/atf-20240117-bacca82a8/plat/nuvoton/npcm845x/platform.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. # # Copyright (c) 2017-2023 Nuvoton Ltd. # @@ -140,25 +140,11 @@ $(error For SEPARATE_NOBITS_REGION, RECLAIM_INIT_CODE cannot be supported) endif endif -# Disable ARM Cryptocell by default -ARM_CRYPTOCELL_INTEG := 0 -$(eval $(call assert_boolean,ARM_CRYPTOCELL_INTEG)) -$(eval $(call add_define,ARM_CRYPTOCELL_INTEG)) - # Enable PIE support for RESET_TO_BL31 case ifeq (${RESET_TO_BL31},1) ENABLE_PIE := 1 endif -# CryptoCell integration relies on coherent buffers for passing data from -# the AP CPU to the CryptoCell - -ifeq (${ARM_CRYPTOCELL_INTEG},1) -ifeq (${USE_COHERENT_MEM},0) -$(error "ARM_CRYPTOCELL_INTEG needs USE_COHERENT_MEM to be set.") -endif -endif - PLAT_INCLUDES := -Iinclude/plat/nuvoton/npcm845x \ -Iinclude/plat/nuvoton/common \ -Iinclude/drivers/nuvoton/npcm845x \ @@ -273,9 +259,11 @@ ifeq (${ENABLE_PMF}, 1) ifeq (${ARCH}, aarch64) BL31_SOURCES += plat/arm/common/aarch64/execution_state_switch.c \ plat/arm/common/arm_sip_svc.c \ + plat/arm/common/plat_arm_sip_svc.c \ lib/pmf/pmf_smc.c else BL32_SOURCES += plat/arm/common/arm_sip_svc.c \ + plat/arm/common/plat_arm_sip_svc.c \ lib/pmf/pmf_smc.c endif endif @@ -337,11 +325,7 @@ BL2_SOURCES += ${AUTH_SOURCES} \ $(eval $(call TOOL_ADD_IMG,ns_bl2u,--fwu,FWU_)) # We expect to locate the *.mk files under the directories specified below -ifeq (${ARM_CRYPTOCELL_INTEG},0) CRYPTO_LIB_MK := drivers/auth/mbedtls/mbedtls_crypto.mk -else -CRYPTO_LIB_MK := drivers/auth/cryptocell/cryptocell_crypto.mk -endif IMG_PARSER_LIB_MK := drivers/auth/mbedtls/mbedtls_x509.mk diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/aarch64/tegra_helpers.S b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/aarch64/tegra_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/aarch64/tegra_helpers.S rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/aarch64/tegra_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_bl31_setup.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_common.mk b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_common.mk rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_common.mk diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_delay_timer.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_delay_timer.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_delay_timer.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_delay_timer.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_fiq_glue.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_fiq_glue.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_fiq_glue.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_fiq_glue.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_gicv2.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_gicv2.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_gicv3.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_gicv3.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_io_storage.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_io_storage.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_platform.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_platform.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_platform.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_pm.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_pm.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_pm.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_sdei.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_sdei.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_sdei.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_sdei.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_sip_calls.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_sip_calls.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_stack_protector.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/common/tegra_stack_protector.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/common/tegra_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp/bpmp.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp/bpmp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp/bpmp.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp/bpmp.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/intf.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/intf.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/intf.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/intf.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/intf.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/intf.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/intf.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/intf.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/bpmp_ipc/ivc.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/flowctrl/flowctrl.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/flowctrl/flowctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/flowctrl/flowctrl.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/flowctrl/flowctrl.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/gpcdma/gpcdma.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/gpcdma/gpcdma.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/gpcdma/gpcdma.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/gpcdma/gpcdma.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/memctrl/memctrl_v1.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/memctrl/memctrl_v1.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/memctrl/memctrl_v1.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/memctrl/memctrl_v1.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/memctrl/memctrl_v2.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/memctrl/memctrl_v2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/memctrl/memctrl_v2.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/memctrl/memctrl_v2.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/pmc/pmc.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/pmc/pmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/pmc/pmc.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/pmc/pmc.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/smmu/smmu.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/smmu/smmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/smmu/smmu.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/smmu/smmu.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/spe/shared_console.S b/atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/spe/shared_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/drivers/spe/shared_console.S rename to atf-20240117-bacca82a8/plat/nvidia/tegra/drivers/spe/shared_console.S diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/bpmp.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/bpmp.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/bpmp.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/bpmp.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/bpmp_ipc.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/bpmp_ipc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/bpmp_ipc.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/bpmp_ipc.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/flowctrl.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/flowctrl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/flowctrl.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/flowctrl.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/gpcdma.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/gpcdma.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/gpcdma.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/gpcdma.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/mce.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/mce.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/mce.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/mce.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/memctrl.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/memctrl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/memctrl.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/memctrl.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/memctrl_v1.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/memctrl_v1.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/memctrl_v1.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/memctrl_v1.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/memctrl_v2.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/memctrl_v2.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/memctrl_v2.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/memctrl_v2.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/pmc.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/pmc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/pmc.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/pmc.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/security_engine.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/security_engine.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/security_engine.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/security_engine.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/smmu.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/smmu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/smmu.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/smmu.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/spe.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/spe.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/spe.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/spe.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/tegra_gic.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/tegra_gic.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/drivers/tegra_gic.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/drivers/tegra_gic.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/lib/profiler.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/lib/profiler.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/lib/profiler.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/lib/profiler.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/plat_macros.S b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/platform_def.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/platform_def.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t186/tegra186_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/t186/tegra186_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t186/tegra186_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/t186/tegra186_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t186/tegra_def.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/t186/tegra_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t186/tegra_def.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/t186/tegra_def.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t186/tegra_mc_def.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/t186/tegra_mc_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t186/tegra_mc_def.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/t186/tegra_mc_def.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t194/tegra194_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/t194/tegra194_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t194/tegra194_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/t194/tegra194_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t194/tegra194_ras_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/t194/tegra194_ras_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t194/tegra194_ras_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/t194/tegra194_ras_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t194/tegra_def.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/t194/tegra_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t194/tegra_def.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/t194/tegra_def.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t210/tegra_def.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/t210/tegra_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/t210/tegra_def.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/t210/tegra_def.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/tegra_platform.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/tegra_platform.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/tegra_platform.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/tegra_platform.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/tegra_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/tegra_private.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/include/tegra_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/include/tegra_private.h index f93585d9d..ad80596b7 100644 --- a/atf-20231013-0ea67d76a/plat/nvidia/tegra/include/tegra_private.h +++ b/atf-20240117-bacca82a8/plat/nvidia/tegra/include/tegra_private.h @@ -154,7 +154,7 @@ int plat_sip_handler(uint32_t smc_fid, void *handle, uint64_t flags); -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS && FFH_SUPPORT void tegra194_ras_enable(void); void tegra194_ras_corrected_err_clear(uint64_t *cookie); #endif diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/lib/debug/profiler.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/lib/debug/profiler.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/lib/debug/profiler.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/lib/debug/profiler.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/platform.mk b/atf-20240117-bacca82a8/plat/nvidia/tegra/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/platform.mk rename to atf-20240117-bacca82a8/plat/nvidia/tegra/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/scat/bl31.scat b/atf-20240117-bacca82a8/plat/nvidia/tegra/scat/bl31.scat similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/scat/bl31.scat rename to atf-20240117-bacca82a8/plat/nvidia/tegra/scat/bl31.scat diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/include/mce_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/include/mce_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/include/mce_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/include/mce_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/include/t18x_ari.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/include/t18x_ari.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/include/t18x_ari.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/include/t18x_ari.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/aarch64/nvg_helpers.S b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/aarch64/nvg_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/aarch64/nvg_helpers.S rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/aarch64/nvg_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/ari.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/ari.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/ari.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/ari.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/mce.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/mce.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/mce.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/mce.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/nvg.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/nvg.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/mce/nvg.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/mce/nvg.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/se/se.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/se/se.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/se/se.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/se/se.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/se/se_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/se/se_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/drivers/se/se_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/drivers/se/se_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_memctrl.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_memctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_memctrl.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_memctrl.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_psci_handlers.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_secondary.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_secondary.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_secondary.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_secondary.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_setup.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_setup.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_setup.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_setup.c index d6d090aba..b21faa361 100644 --- a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_setup.c +++ b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_setup.c @@ -302,14 +302,14 @@ int32_t plat_core_pos_by_mpidr(u_register_t mpidr) */ if ((cluster_id >= (u_register_t)PLATFORM_CLUSTER_COUNT) || (cpu_id >= (u_register_t)PLATFORM_MAX_CPUS_PER_CLUSTER)) { - ret = PSCI_E_NOT_PRESENT; + ret = -1; } else { /* calculate the core position */ pos = cpu_id + (cluster_id << 2U); /* check for non-existent CPUs */ if ((pos == TEGRA186_CLUSTER0_CORE2) || (pos == TEGRA186_CLUSTER0_CORE3)) { - ret = PSCI_E_NOT_PRESENT; + ret = -1; } else { ret = (int32_t)pos; } diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_smmu.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_smmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_smmu.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_smmu.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_trampoline.S b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_trampoline.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/plat_trampoline.S rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/plat_trampoline.S diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/platform_t186.mk b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/platform_t186.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t186/platform_t186.mk rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t186/platform_t186.mk diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/include/mce_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/include/mce_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/include/mce_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/include/mce_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/include/se.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/include/se.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/include/se.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/include/se.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/include/t194_nvg.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/include/t194_nvg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/include/t194_nvg.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/include/t194_nvg.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/mce/aarch64/nvg_helpers.S b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/mce/aarch64/nvg_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/mce/aarch64/nvg_helpers.S rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/mce/aarch64/nvg_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/mce/mce.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/mce/mce.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/mce/mce.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/mce/mce.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/mce/nvg.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/mce/nvg.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/mce/nvg.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/mce/nvg.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/se/se.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/se/se.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/se/se.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/se/se.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/se/se_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/se/se_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/drivers/se/se_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/drivers/se/se_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_memctrl.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_memctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_memctrl.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_memctrl.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_psci_handlers.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_psci_handlers.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_psci_handlers.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_psci_handlers.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_ras.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_ras.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_ras.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_ras.c index 2f438c3c0..841d70b2f 100644 --- a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_ras.c +++ b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_ras.c @@ -484,7 +484,7 @@ REGISTER_RAS_INTERRUPTS(carmel_ras_interrupts); void plat_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie, void *handle, uint64_t flags) { -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS tegra194_ea_handler(ea_reason, syndrome, cookie, handle, flags); #else plat_default_ea_handler(ea_reason, syndrome, cookie, handle, flags); diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_secondary.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_secondary.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_secondary.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_secondary.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_setup.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_setup.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_setup.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_setup.c index d3d09d3dc..68503301e 100644 --- a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_setup.c +++ b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_setup.c @@ -254,7 +254,7 @@ void plat_early_platform_setup(void) /* sanity check MCE firmware compatibility */ mce_verify_firmware_version(); -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS /* Enable Uncorrectable RAS error */ tegra194_ras_enable(); #endif diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_sip_calls.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_sip_calls.c index f0704edb1..6e42e6458 100644 --- a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_sip_calls.c +++ b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_sip_calls.c @@ -71,7 +71,7 @@ int32_t plat_sip_handler(uint32_t smc_fid, break; -#if RAS_FFH_SUPPORT +#if ENABLE_FEAT_RAS case TEGRA_SIP_CLEAR_RAS_CORRECTED_ERRORS: { /* diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_smmu.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_smmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_smmu.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_smmu.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_trampoline.S b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_trampoline.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/plat_trampoline.S rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/plat_trampoline.S diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/platform_t194.mk b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/platform_t194.mk similarity index 92% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/platform_t194.mk rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/platform_t194.mk index a183d0e9d..e6e0b5eea 100644 --- a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t194/platform_t194.mk +++ b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t194/platform_t194.mk @@ -1,11 +1,14 @@ # -# Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # include common/fdt_wrappers.mk +ARM_ARCH_MAJOR := 8 +ARM_ARCH_MINOR := 2 + # platform configs ENABLE_CONSOLE_SPE := 1 $(eval $(call add_define,ENABLE_CONSOLE_SPE)) @@ -35,7 +38,6 @@ $(eval $(call add_define,MAX_MMAP_REGIONS)) # enable RAS handling HANDLE_EA_EL3_FIRST_NS := 1 ENABLE_FEAT_RAS := 1 -RAS_FFH_SUPPORT := 1 # platform files PLAT_INCLUDES += -Iplat/nvidia/tegra/include/t194 \ @@ -69,7 +71,7 @@ BL31_SOURCES += ${TEGRA_DRIVERS}/spe/shared_console.S endif # RAS sources -ifeq (${RAS_FFH_SUPPORT},1) +ifeq (${ENABLE_FEAT_RAS}-${HANDLE_EA_EL3_FIRST_NS},1-1) BL31_SOURCES += lib/extensions/ras/std_err_record.c \ lib/extensions/ras/ras_common.c \ ${SOC_DIR}/plat_ras.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/drivers/se/se_private.h b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/drivers/se/se_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/drivers/se/se_private.h rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/drivers/se/se_private.h diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/drivers/se/security_engine.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/drivers/se/security_engine.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/drivers/se/security_engine.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/drivers/se/security_engine.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_psci_handlers.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_secondary.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_secondary.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_secondary.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_secondary.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_setup.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_setup.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/platform_t210.mk b/atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/platform_t210.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nvidia/tegra/soc/t210/platform_t210.mk rename to atf-20240117-bacca82a8/plat/nvidia/tegra/soc/t210/platform_t210.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/aarch64/bl31_data.S b/atf-20240117-bacca82a8/plat/nxp/common/aarch64/bl31_data.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/aarch64/bl31_data.S rename to atf-20240117-bacca82a8/plat/nxp/common/aarch64/bl31_data.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/aarch64/ls_helpers.S b/atf-20240117-bacca82a8/plat/nxp/common/aarch64/ls_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/aarch64/ls_helpers.S rename to atf-20240117-bacca82a8/plat/nxp/common/aarch64/ls_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/common/plat_def_fip_uuid.h b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/common/plat_def_fip_uuid.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/common/plat_def_fip_uuid.h rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/common/plat_def_fip_uuid.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/common/plat_tbbr_img_def.h b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/common/plat_tbbr_img_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/common/plat_tbbr_img_def.h rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/common/plat_tbbr_img_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/common/platform_oid.h b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/common/platform_oid.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/common/platform_oid.h rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/common/platform_oid.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/ddr_fip/ddr_fip_io.mk b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/ddr_fip/ddr_fip_io.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/ddr_fip/ddr_fip_io.mk rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/ddr_fip/ddr_fip_io.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.c b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.c rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.h b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.h rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/ddr_fip/ddr_io_storage.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/fuse_fip/fuse.mk b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/fuse_fip/fuse.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/fuse_fip/fuse.mk rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/fuse_fip/fuse.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/fuse_fip/fuse_io.h b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/fuse_fip/fuse_io.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/fuse_fip/fuse_io.h rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/fuse_fip/fuse_io.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/fuse_fip/fuse_io_storage.c b/atf-20240117-bacca82a8/plat/nxp/common/fip_handler/fuse_fip/fuse_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/fip_handler/fuse_fip/fuse_io_storage.c rename to atf-20240117-bacca82a8/plat/nxp/common/fip_handler/fuse_fip/fuse_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/img_loadr/img_loadr.mk b/atf-20240117-bacca82a8/plat/nxp/common/img_loadr/img_loadr.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/img_loadr/img_loadr.mk rename to atf-20240117-bacca82a8/plat/nxp/common/img_loadr/img_loadr.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/img_loadr/load_img.c b/atf-20240117-bacca82a8/plat/nxp/common/img_loadr/load_img.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/img_loadr/load_img.c rename to atf-20240117-bacca82a8/plat/nxp/common/img_loadr/load_img.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/img_loadr/load_img.h b/atf-20240117-bacca82a8/plat/nxp/common/img_loadr/load_img.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/img_loadr/load_img.h rename to atf-20240117-bacca82a8/plat/nxp/common/img_loadr/load_img.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_2/soc_default_base_addr.h b/atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_2/soc_default_base_addr.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_2/soc_default_base_addr.h rename to atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_2/soc_default_base_addr.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_2/soc_default_helper_macros.h b/atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_2/soc_default_helper_macros.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_2/soc_default_helper_macros.h rename to atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_2/soc_default_helper_macros.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3/soc_default_base_addr.h b/atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3/soc_default_base_addr.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3/soc_default_base_addr.h rename to atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3/soc_default_base_addr.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3/soc_default_helper_macros.h b/atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3/soc_default_helper_macros.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3/soc_default_helper_macros.h rename to atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3/soc_default_helper_macros.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3_2/soc_default_base_addr.h b/atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3_2/soc_default_base_addr.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3_2/soc_default_base_addr.h rename to atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3_2/soc_default_base_addr.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3_2/soc_default_helper_macros.h b/atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3_2/soc_default_helper_macros.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/include/default/ch_3_2/soc_default_helper_macros.h rename to atf-20240117-bacca82a8/plat/nxp/common/include/default/ch_3_2/soc_default_helper_macros.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/include/default/plat_default_def.h b/atf-20240117-bacca82a8/plat/nxp/common/include/default/plat_default_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/include/default/plat_default_def.h rename to atf-20240117-bacca82a8/plat/nxp/common/include/default/plat_default_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/nv_storage/nv_storage.mk b/atf-20240117-bacca82a8/plat/nxp/common/nv_storage/nv_storage.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/nv_storage/nv_storage.mk rename to atf-20240117-bacca82a8/plat/nxp/common/nv_storage/nv_storage.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/nv_storage/plat_nv_storage.c b/atf-20240117-bacca82a8/plat/nxp/common/nv_storage/plat_nv_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/nv_storage/plat_nv_storage.c rename to atf-20240117-bacca82a8/plat/nxp/common/nv_storage/plat_nv_storage.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/nv_storage/plat_nv_storage.h b/atf-20240117-bacca82a8/plat/nxp/common/nv_storage/plat_nv_storage.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/nv_storage/plat_nv_storage.h rename to atf-20240117-bacca82a8/plat/nxp/common/nv_storage/plat_nv_storage.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/ocram/aarch64/ocram.S b/atf-20240117-bacca82a8/plat/nxp/common/ocram/aarch64/ocram.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/ocram/aarch64/ocram.S rename to atf-20240117-bacca82a8/plat/nxp/common/ocram/aarch64/ocram.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/ocram/ocram.h b/atf-20240117-bacca82a8/plat/nxp/common/ocram/ocram.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/ocram/ocram.h rename to atf-20240117-bacca82a8/plat/nxp/common/ocram/ocram.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/ocram/ocram.mk b/atf-20240117-bacca82a8/plat/nxp/common/ocram/ocram.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/ocram/ocram.mk rename to atf-20240117-bacca82a8/plat/nxp/common/ocram/ocram.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/plat_make_helper/plat_build_macros.mk b/atf-20240117-bacca82a8/plat/nxp/common/plat_make_helper/plat_build_macros.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/plat_make_helper/plat_build_macros.mk rename to atf-20240117-bacca82a8/plat/nxp/common/plat_make_helper/plat_build_macros.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/plat_make_helper/plat_common_def.mk b/atf-20240117-bacca82a8/plat/nxp/common/plat_make_helper/plat_common_def.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/plat_make_helper/plat_common_def.mk rename to atf-20240117-bacca82a8/plat/nxp/common/plat_make_helper/plat_common_def.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/plat_make_helper/soc_common_def.mk b/atf-20240117-bacca82a8/plat/nxp/common/plat_make_helper/soc_common_def.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/plat_make_helper/soc_common_def.mk rename to atf-20240117-bacca82a8/plat/nxp/common/plat_make_helper/soc_common_def.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/psci/aarch64/psci_utils.S b/atf-20240117-bacca82a8/plat/nxp/common/psci/aarch64/psci_utils.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/psci/aarch64/psci_utils.S rename to atf-20240117-bacca82a8/plat/nxp/common/psci/aarch64/psci_utils.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/psci/include/plat_psci.h b/atf-20240117-bacca82a8/plat/nxp/common/psci/include/plat_psci.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/psci/include/plat_psci.h rename to atf-20240117-bacca82a8/plat/nxp/common/psci/include/plat_psci.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/psci/plat_psci.c b/atf-20240117-bacca82a8/plat/nxp/common/psci/plat_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/psci/plat_psci.c rename to atf-20240117-bacca82a8/plat/nxp/common/psci/plat_psci.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/psci/psci.mk b/atf-20240117-bacca82a8/plat/nxp/common/psci/psci.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/psci/psci.mk rename to atf-20240117-bacca82a8/plat/nxp/common/psci/psci.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/aarch64/ls_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/aarch64/ls_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/aarch64/ls_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/aarch64/ls_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/common.mk b/atf-20240117-bacca82a8/plat/nxp/common/setup/common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/common.mk rename to atf-20240117-bacca82a8/plat/nxp/common/setup/common.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/core.mk b/atf-20240117-bacca82a8/plat/nxp/common/setup/core.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/core.mk rename to atf-20240117-bacca82a8/plat/nxp/common/setup/core.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/include/bl31_data.h b/atf-20240117-bacca82a8/plat/nxp/common/setup/include/bl31_data.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/include/bl31_data.h rename to atf-20240117-bacca82a8/plat/nxp/common/setup/include/bl31_data.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/include/ls_interrupt_mgmt.h b/atf-20240117-bacca82a8/plat/nxp/common/setup/include/ls_interrupt_mgmt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/include/ls_interrupt_mgmt.h rename to atf-20240117-bacca82a8/plat/nxp/common/setup/include/ls_interrupt_mgmt.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/include/mmu_def.h b/atf-20240117-bacca82a8/plat/nxp/common/setup/include/mmu_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/include/mmu_def.h rename to atf-20240117-bacca82a8/plat/nxp/common/setup/include/mmu_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/include/plat_common.h b/atf-20240117-bacca82a8/plat/nxp/common/setup/include/plat_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/include/plat_common.h rename to atf-20240117-bacca82a8/plat/nxp/common/setup/include/plat_common.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/include/plat_macros.S b/atf-20240117-bacca82a8/plat/nxp/common/setup/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/nxp/common/setup/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_bl2_el3_setup.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_bl2_el3_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_bl2_el3_setup.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_bl2_el3_setup.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_bl31_setup.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_bl31_setup.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_common.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_common.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_common.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_err.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_err.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_err.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_err.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_image_load.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_image_load.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_interrupt_mgmt.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_interrupt_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_interrupt_mgmt.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_interrupt_mgmt.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_io_storage.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_io_storage.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_stack_protector.c b/atf-20240117-bacca82a8/plat/nxp/common/setup/ls_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/setup/ls_stack_protector.c rename to atf-20240117-bacca82a8/plat/nxp/common/setup/ls_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/aarch64/sipsvc.S b/atf-20240117-bacca82a8/plat/nxp/common/sip_svc/aarch64/sipsvc.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/aarch64/sipsvc.S rename to atf-20240117-bacca82a8/plat/nxp/common/sip_svc/aarch64/sipsvc.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/include/sipsvc.h b/atf-20240117-bacca82a8/plat/nxp/common/sip_svc/include/sipsvc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/include/sipsvc.h rename to atf-20240117-bacca82a8/plat/nxp/common/sip_svc/include/sipsvc.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/sip_svc.c b/atf-20240117-bacca82a8/plat/nxp/common/sip_svc/sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/sip_svc.c rename to atf-20240117-bacca82a8/plat/nxp/common/sip_svc/sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/sipsvc.mk b/atf-20240117-bacca82a8/plat/nxp/common/sip_svc/sipsvc.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/sip_svc/sipsvc.mk rename to atf-20240117-bacca82a8/plat/nxp/common/sip_svc/sipsvc.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata.c b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata.c rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata.h b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata.h rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata.mk b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata.mk rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a008850.c b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a008850.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a008850.c rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a008850.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a009660.c b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a009660.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a009660.c rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a009660.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a010539.c b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a010539.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a010539.c rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a010539.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a050426.c b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a050426.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_a050426.c rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_a050426.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_list.h b/atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_list.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/soc_errata/errata_list.h rename to atf-20240117-bacca82a8/plat/nxp/common/soc_errata/errata_list.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/tbbr/csf_tbbr.c b/atf-20240117-bacca82a8/plat/nxp/common/tbbr/csf_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/tbbr/csf_tbbr.c rename to atf-20240117-bacca82a8/plat/nxp/common/tbbr/csf_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/tbbr/nxp_rotpk.S b/atf-20240117-bacca82a8/plat/nxp/common/tbbr/nxp_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/tbbr/nxp_rotpk.S rename to atf-20240117-bacca82a8/plat/nxp/common/tbbr/nxp_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/tbbr/tbbr.mk b/atf-20240117-bacca82a8/plat/nxp/common/tbbr/tbbr.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/tbbr/tbbr.mk rename to atf-20240117-bacca82a8/plat/nxp/common/tbbr/tbbr.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/tbbr/x509_tbbr.c b/atf-20240117-bacca82a8/plat/nxp/common/tbbr/x509_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/tbbr/x509_tbbr.c rename to atf-20240117-bacca82a8/plat/nxp/common/tbbr/x509_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/warm_reset/plat_warm_reset.c b/atf-20240117-bacca82a8/plat/nxp/common/warm_reset/plat_warm_reset.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/warm_reset/plat_warm_reset.c rename to atf-20240117-bacca82a8/plat/nxp/common/warm_reset/plat_warm_reset.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/warm_reset/plat_warm_rst.h b/atf-20240117-bacca82a8/plat/nxp/common/warm_reset/plat_warm_rst.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/warm_reset/plat_warm_rst.h rename to atf-20240117-bacca82a8/plat/nxp/common/warm_reset/plat_warm_rst.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/common/warm_reset/warm_reset.mk b/atf-20240117-bacca82a8/plat/nxp/common/warm_reset/warm_reset.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/common/warm_reset/warm_reset.mk rename to atf-20240117-bacca82a8/plat/nxp/common/warm_reset/warm_reset.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/aarch64/ls1028a.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/aarch64/ls1028a.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/aarch64/ls1028a.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/aarch64/ls1028a.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/aarch64/ls1028a_helpers.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/aarch64/ls1028a_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/aarch64/ls1028a_helpers.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/aarch64/ls1028a_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/include/soc.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/include/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/include/soc.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/include/soc.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/ls1028ardb/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/ls1028ardb/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/soc.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/soc.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/soc.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/soc.def b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/soc.def similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/soc.def rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/soc.def diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/soc.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/soc.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1028a/soc.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1028a/soc.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/aarch64/ls1043a.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/aarch64/ls1043a.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/aarch64/ls1043a.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/aarch64/ls1043a.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/aarch64/ls1043a_helpers.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/aarch64/ls1043a_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/aarch64/ls1043a_helpers.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/aarch64/ls1043a_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/include/ns_access.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/include/ns_access.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/include/ns_access.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/include/ns_access.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/include/soc.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/include/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/include/soc.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/include/soc.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/ls1043ardb/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/ls1043ardb/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/soc.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/soc.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/soc.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/soc.def b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/soc.def similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/soc.def rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/soc.def diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/soc.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/soc.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1043a/soc.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1043a/soc.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/aarch64/ls1046a.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/aarch64/ls1046a.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/aarch64/ls1046a.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/aarch64/ls1046a.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/aarch64/ls1046a_helpers.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/aarch64/ls1046a_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/aarch64/ls1046a_helpers.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/aarch64/ls1046a_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/include/ns_access.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/include/ns_access.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/include/ns_access.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/include/ns_access.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/include/soc.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/include/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/include/soc.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/include/soc.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046afrwy/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046afrwy/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046aqds/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046aqds/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/ls1046ardb/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/ls1046ardb/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/soc.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/soc.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/soc.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/soc.def b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/soc.def similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/soc.def rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/soc.def diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/soc.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/soc.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1046a/soc.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1046a/soc.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/aarch64/ls1088a.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/aarch64/ls1088a.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/aarch64/ls1088a.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/aarch64/ls1088a.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/aarch64/ls1088a_helpers.S b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/aarch64/ls1088a_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/aarch64/ls1088a_helpers.S rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/aarch64/ls1088a_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/include/soc.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/include/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/include/soc.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/include/soc.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088aqds/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088aqds/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/ls1088ardb/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/ls1088ardb/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/soc.c b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/soc.c rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/soc.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/soc.def b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/soc.def similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/soc.def rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/soc.def diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/soc.mk b/atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/soc.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-ls1088a/soc.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-ls1088a/soc.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/aarch64/lx2160a.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/aarch64/lx2160a.S rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/aarch64/lx2160a.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/aarch64/lx2160a_helpers.S b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/aarch64/lx2160a_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/aarch64/lx2160a_helpers.S rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/aarch64/lx2160a_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/aarch64/lx2160a_warm_rst.S b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/aarch64/lx2160a_warm_rst.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/aarch64/lx2160a_warm_rst.S rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/aarch64/lx2160a_warm_rst.S diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/ddr_fip.mk b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/ddr_fip.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/ddr_fip.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/ddr_fip.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/ddr_sb.mk b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/ddr_sb.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/ddr_sb.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/ddr_sb.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/ddr_tbbr.mk b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/ddr_tbbr.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/ddr_tbbr.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/ddr_tbbr.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/include/soc.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/include/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/include/soc.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/include/soc.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160aqds/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160aqds/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2160ardb/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2160ardb/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/ddr_init.c b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/ddr_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/ddr_init.c rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/ddr_init.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/plat_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/plat_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/plat_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/plat_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/platform.c b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/platform.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/platform.c rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/platform.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/platform.mk b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/platform.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/platform_def.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/platform_def.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/policy.h b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/policy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/lx2162aqds/policy.h rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/lx2162aqds/policy.h diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/soc.c b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/soc.c rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/soc.c diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/soc.def b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/soc.def similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/soc.def rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/soc.def diff --git a/atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/soc.mk b/atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/soc.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/nxp/soc-lx2160a/soc.mk rename to atf-20240117-bacca82a8/plat/nxp/soc-lx2160a/soc.mk diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/aarch32/plat_helpers.S b/atf-20240117-bacca82a8/plat/qemu/common/aarch32/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/aarch32/plat_helpers.S rename to atf-20240117-bacca82a8/plat/qemu/common/aarch32/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/qemu/common/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/qemu/common/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/common.mk b/atf-20240117-bacca82a8/plat/qemu/common/common.mk similarity index 82% rename from atf-20231013-0ea67d76a/plat/qemu/common/common.mk rename to atf-20240117-bacca82a8/plat/qemu/common/common.mk index b23f7fd38..36d9f5b2f 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/common.mk +++ b/atf-20240117-bacca82a8/plat/qemu/common/common.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Linaro Limited and Contributors. All rights reserved. +# Copyright (c) 2023-2024, Linaro Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -29,18 +29,6 @@ QEMU_CPU_LIBS := lib/cpus/aarch64/aem_generic.S \ lib/cpus/aarch64/qemu_max.S PLAT_INCLUDES += -Iinclude/plat/arm/common/${ARCH} - -# Cpu core architecture level: -# v8.0: a53, a57, a72 -# v8.2: a76, n1 -# v8.4: v1 -# v9.0: a710, n2 -# -# let treat v9.0 as v8.5 as they share cpu features -# https://developer.arm.com/documentation/102378/0201/Armv8-x-and-Armv9-x-extensions-and-features - -ARM_ARCH_MAJOR := 8 -ARM_ARCH_MINOR := 5 endif PLAT_BL_COMMON_SOURCES := ${PLAT_QEMU_COMMON_PATH}/qemu_common.c \ @@ -91,7 +79,44 @@ BL31_SOURCES += ${QEMU_CPU_LIBS} \ # CPU flag enablement ifeq (${ARCH},aarch64) -# Later QEMU versions support SME and SVE. +# Cpu core architecture level: +# v8.0: a53, a57, a72 +# v8.2: a55, a76, n1 +# v8.4: v1 +# v9.0: a710, n2 +# +# +# We go v8.0 by default and will enable all features we want + +ARM_ARCH_MAJOR := 8 +ARM_ARCH_MINOR := 0 + +# 8.0 +ENABLE_FEAT_CSV2_2 := 2 + +# 8.1 +ENABLE_FEAT_PAN := 2 +ENABLE_FEAT_VHE := 2 + +# 8.2 +# TF-A currently does not permit dynamic detection of FEAT_RAS +# so this is the only safe setting +ENABLE_FEAT_RAS := 0 + +# 8.4 +ENABLE_FEAT_SEL2 := 2 +ENABLE_FEAT_DIT := 2 + +# 8.5 +ENABLE_FEAT_RNG := 2 +ENABLE_FEAT_SB := 2 + +# 8.6 +ENABLE_FEAT_FGT := 2 + +# 8.7 +ENABLE_FEAT_HCX := 2 + # SPM_MM is not compatible with ENABLE_SVE_FOR_NS (build breaks) ifeq (${SPM_MM},1) ENABLE_SVE_FOR_NS := 0 @@ -101,11 +126,10 @@ else ENABLE_SME_FOR_NS := 2 endif -# QEMU will use the RNDR instruction for the stack protector canary. -ENABLE_FEAT_RNG := 2 - -# QEMU 7.2+ has support for FGT and Linux needs it enabled to boot on max -ENABLE_FEAT_FGT := 2 +ifeq (${ENABLE_RME},1) +BL31_SOURCES += plat/qemu/common/qemu_plat_attest_token.c \ + plat/qemu/common/qemu_realm_attest_key.c +endif # Treating this as a memory-constrained port for now USE_COHERENT_MEM := 0 diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/qemu/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/qemu/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl1_setup.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl1_setup.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_bl2_mem_params_desc.c similarity index 90% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_bl2_mem_params_desc.c index bb1797d15..c444be41a 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl2_mem_params_desc.c +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_bl2_mem_params_desc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -67,11 +67,28 @@ static bl_mem_params_node_t bl2_mem_params_descs[] = { # ifdef QEMU_LOAD_BL32 .next_handoff_image_id = BL32_IMAGE_ID, +# elif ENABLE_RME + .next_handoff_image_id = RMM_IMAGE_ID, # else .next_handoff_image_id = BL33_IMAGE_ID, # endif }, #endif /* __aarch64__ */ + +#if ENABLE_RME + /* Fill RMM related information */ + { .image_id = RMM_IMAGE_ID, + SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP, + VERSION_2, entry_point_info_t, EP_REALM | EXECUTABLE), + .ep_info.pc = RMM_BASE, + SET_STATIC_PARAM_HEAD(image_info, PARAM_EP, + VERSION_2, image_info_t, 0), + .image_info.image_base = RMM_BASE, + .image_info.image_max_size = RMM_LIMIT - RMM_BASE, + .next_handoff_image_id = BL33_IMAGE_ID, + }, +#endif /* ENABLE_RME */ + # ifdef QEMU_LOAD_BL32 #ifdef __aarch64__ @@ -95,7 +112,11 @@ static bl_mem_params_node_t bl2_mem_params_descs[] = { .image_info.image_base = BL32_BASE, .image_info.image_max_size = BL32_LIMIT - BL32_BASE, +#if ENABLE_RME + .next_handoff_image_id = RMM_IMAGE_ID, +#else .next_handoff_image_id = BL33_IMAGE_ID, +#endif }, /* diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl2_setup.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_bl2_setup.c similarity index 83% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl2_setup.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_bl2_setup.c index 231f23a77..8c7518d1d 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl2_setup.c +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_bl2_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -11,6 +11,7 @@ #include +#include #include #include #include @@ -23,30 +24,33 @@ #endif #include #include +#if ENABLE_RME +#include +#endif #include "qemu_private.h" #define MAP_BL2_TOTAL MAP_REGION_FLAT( \ bl2_tzram_layout.total_base, \ bl2_tzram_layout.total_size, \ - MT_MEMORY | MT_RW | MT_SECURE) + MT_MEMORY | MT_RW | EL3_PAS) #define MAP_BL2_RO MAP_REGION_FLAT( \ BL_CODE_BASE, \ BL_CODE_END - BL_CODE_BASE, \ - MT_CODE | MT_SECURE), \ + MT_CODE | EL3_PAS), \ MAP_REGION_FLAT( \ BL_RO_DATA_BASE, \ BL_RO_DATA_END \ - BL_RO_DATA_BASE, \ - MT_RO_DATA | MT_SECURE) + MT_RO_DATA | EL3_PAS) #if USE_COHERENT_MEM #define MAP_BL_COHERENT_RAM MAP_REGION_FLAT( \ BL_COHERENT_RAM_BASE, \ BL_COHERENT_RAM_END \ - BL_COHERENT_RAM_BASE, \ - MT_DEVICE | MT_RW | MT_SECURE) + MT_DEVICE | MT_RW | EL3_PAS) #endif /* Data structure which holds the extents of the trusted SRAM for BL2 */ @@ -101,6 +105,18 @@ static void update_dt(void) return; } +#if ENABLE_RME + if (fdt_add_reserved_memory(fdt, "rmm", REALM_DRAM_BASE, + REALM_DRAM_SIZE)) { + ERROR("Failed to reserve RMM memory in Device Tree\n"); + return; + } + + INFO("Reserved RMM memory [0x%lx, 0x%lx] in Device tree\n", + (uintptr_t)REALM_DRAM_BASE, + (uintptr_t)REALM_DRAM_BASE + REALM_DRAM_SIZE - 1); +#endif + ret = fdt_pack(fdt); if (ret < 0) ERROR("Failed to pack Device Tree at %p: error %d\n", fdt, ret); @@ -138,6 +154,53 @@ void qemu_bl2_sync_transfer_list(void) #endif } +#if ENABLE_RME +static void bl2_plat_gpt_setup(void) +{ + /* + * The GPT library might modify the gpt regions structure to optimize + * the layout, so the array cannot be constant. + */ + pas_region_t pas_regions[] = { + QEMU_PAS_ROOT, + QEMU_PAS_SECURE, + QEMU_PAS_GPTS, + QEMU_PAS_NS0, + QEMU_PAS_REALM, + QEMU_PAS_NS1, + }; + + /* + * Initialize entire protected space to GPT_GPI_ANY. With each L0 entry + * covering 1GB (currently the only supported option), then covering + * 256TB of RAM (48-bit PA) would require a 2MB L0 region. At the + * moment we use a 8KB table, which covers 1TB of RAM (40-bit PA). + */ + if (gpt_init_l0_tables(GPCCR_PPS_1TB, PLAT_QEMU_L0_GPT_BASE, + PLAT_QEMU_L0_GPT_SIZE) < 0) { + ERROR("gpt_init_l0_tables() failed!\n"); + panic(); + } + + /* Carve out defined PAS ranges. */ + if (gpt_init_pas_l1_tables(GPCCR_PGS_4K, + PLAT_QEMU_L1_GPT_BASE, + PLAT_QEMU_L1_GPT_SIZE, + pas_regions, + (unsigned int)(sizeof(pas_regions) / + sizeof(pas_region_t))) < 0) { + ERROR("gpt_init_pas_l1_tables() failed!\n"); + panic(); + } + + INFO("Enabling Granule Protection Checks\n"); + if (gpt_enable() < 0) { + ERROR("gpt_enable() failed!\n"); + panic(); + } +} +#endif + void bl2_plat_arch_setup(void) { const mmap_region_t bl_regions[] = { @@ -145,17 +208,32 @@ void bl2_plat_arch_setup(void) MAP_BL2_RO, #if USE_COHERENT_MEM MAP_BL_COHERENT_RAM, +#endif +#if ENABLE_RME + MAP_RMM_DRAM, + MAP_GPT_L0_REGION, + MAP_GPT_L1_REGION, #endif {0} }; setup_page_tables(bl_regions, plat_qemu_get_mmap()); +#if ENABLE_RME + /* BL2 runs in EL3 when RME enabled. */ + assert(get_armv9_2_feat_rme_support() != 0U); + enable_mmu_el3(0); + + /* Initialise and enable granule protection after MMU. */ + bl2_plat_gpt_setup(); +#else /* ENABLE_RME */ + #ifdef __aarch64__ enable_mmu_el1(0); #else enable_mmu_svc_mon(0); #endif +#endif /* ENABLE_RME */ } /******************************************************************************* diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl31_setup.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_bl31_setup.c similarity index 77% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl31_setup.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_bl31_setup.c index f309efdc5..894b8420d 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_bl31_setup.c +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_bl31_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -8,6 +8,7 @@ #include #include +#include #include #include "qemu_private.h" @@ -40,6 +41,9 @@ */ static entry_point_info_t bl32_image_ep_info; static entry_point_info_t bl33_image_ep_info; +#if ENABLE_RME +static entry_point_info_t rmm_image_ep_info; +#endif /******************************************************************************* * Perform any BL3-1 early platform setup. Here is an opportunity to copy @@ -72,13 +76,18 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, bl_params_node_t *bl_params = params_from_bl2->head; /* - * Copy BL33 and BL32 (if present), entry point information. + * Copy BL33, BL32 and RMM (if present), entry point information. * They are stored in Secure RAM, in BL2's address space. */ while (bl_params) { if (bl_params->image_id == BL32_IMAGE_ID) bl32_image_ep_info = *bl_params->ep_info; +#if ENABLE_RME + if (bl_params->image_id == RMM_IMAGE_ID) + rmm_image_ep_info = *bl_params->ep_info; +#endif + if (bl_params->image_id == BL33_IMAGE_ID) bl33_image_ep_info = *bl_params->ep_info; @@ -87,6 +96,10 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, if (!bl33_image_ep_info.pc) panic(); +#if ENABLE_RME + if (!rmm_image_ep_info.pc) + panic(); +#endif } void bl31_plat_arch_setup(void) @@ -96,6 +109,11 @@ void bl31_plat_arch_setup(void) MAP_BL31_RO, #if USE_COHERENT_MEM MAP_BL_COHERENT_RAM, +#endif +#if ENABLE_RME + MAP_GPT_L0_REGION, + MAP_GPT_L1_REGION, + MAP_RMM_SHARED_MEM, #endif {0} }; @@ -103,6 +121,20 @@ void bl31_plat_arch_setup(void) setup_page_tables(bl_regions, plat_qemu_get_mmap()); enable_mmu_el3(0); + +#if ENABLE_RME + /* + * Initialise Granule Protection library and enable GPC for the primary + * processor. The tables have already been initialized by a previous BL + * stage, so there is no need to provide any PAS here. This function + * sets up pointers to those tables. + */ + if (gpt_runtime_init() < 0) { + ERROR("gpt_runtime_init() failed!\n"); + panic(); + } +#endif /* ENABLE_RME */ + } static void qemu_gpio_init(void) @@ -135,8 +167,18 @@ entry_point_info_t *bl31_plat_get_next_image_ep_info(uint32_t type) entry_point_info_t *next_image_info; assert(sec_state_is_valid(type)); - next_image_info = (type == NON_SECURE) - ? &bl33_image_ep_info : &bl32_image_ep_info; + if (type == NON_SECURE) { + next_image_info = &bl33_image_ep_info; + } +#if ENABLE_RME + else if (type == REALM) { + next_image_info = &rmm_image_ep_info; + } +#endif + else { + next_image_info = &bl32_image_ep_info; + } + /* * None of the images on the ARM development platforms can have 0x0 * as the entrypoint diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_common.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_common.c similarity index 59% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_common.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_common.c index d4488a4bd..cafee6fc6 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_common.c +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_common.c @@ -1,6 +1,6 @@ /* - * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -11,45 +11,48 @@ #include #include #include +#if ENABLE_RME +#include +#endif #include #include "qemu_private.h" #define MAP_DEVICE0 MAP_REGION_FLAT(DEVICE0_BASE, \ DEVICE0_SIZE, \ - MT_DEVICE | MT_RW | MT_SECURE) + MT_DEVICE | MT_RW | EL3_PAS) #ifdef DEVICE1_BASE #define MAP_DEVICE1 MAP_REGION_FLAT(DEVICE1_BASE, \ DEVICE1_SIZE, \ - MT_DEVICE | MT_RW | MT_SECURE) + MT_DEVICE | MT_RW | EL3_PAS) #endif #ifdef DEVICE2_BASE #define MAP_DEVICE2 MAP_REGION_FLAT(DEVICE2_BASE, \ DEVICE2_SIZE, \ - MT_DEVICE | MT_RW | MT_SECURE) + MT_DEVICE | MT_RW | EL3_PAS) #endif #define MAP_SHARED_RAM MAP_REGION_FLAT(SHARED_RAM_BASE, \ SHARED_RAM_SIZE, \ - MT_DEVICE | MT_RW | MT_SECURE) + MT_DEVICE | MT_RW | EL3_PAS) #define MAP_BL32_MEM MAP_REGION_FLAT(BL32_MEM_BASE, BL32_MEM_SIZE, \ - MT_MEMORY | MT_RW | MT_SECURE) + MT_MEMORY | MT_RW | EL3_PAS) #define MAP_NS_DRAM0 MAP_REGION_FLAT(NS_DRAM0_BASE, NS_DRAM0_SIZE, \ MT_MEMORY | MT_RW | MT_NS) #define MAP_FLASH0 MAP_REGION_FLAT(QEMU_FLASH0_BASE, QEMU_FLASH0_SIZE, \ - MT_MEMORY | MT_RO | MT_SECURE) + MT_MEMORY | MT_RO | EL3_PAS) #define MAP_FLASH1 MAP_REGION_FLAT(QEMU_FLASH1_BASE, QEMU_FLASH1_SIZE, \ - MT_MEMORY | MT_RO | MT_SECURE) + MT_MEMORY | MT_RO | EL3_PAS) #ifdef FW_HANDOFF_BASE #define MAP_FW_HANDOFF MAP_REGION_FLAT(FW_HANDOFF_BASE, FW_HANDOFF_SIZE, \ - MT_MEMORY | MT_RW | MT_SECURE) + MT_MEMORY | MT_RW | EL3_PAS) #endif #ifdef FW_NS_HANDOFF_BASE #define MAP_FW_NS_HANDOFF MAP_REGION_FLAT(FW_NS_HANDOFF_BASE, FW_HANDOFF_SIZE, \ @@ -138,6 +141,19 @@ static const mmap_region_t plat_qemu_mmap[] = { }; #endif +#ifdef IMAGE_RMM +const mmap_region_t plat_qemu_mmap[] = { + MAP_DEVICE0, +#ifdef MAP_DEVICE1 + MAP_DEVICE1, +#endif +#ifdef MAP_DEVICE2 + MAP_DEVICE2, +#endif + {0} +}; +#endif + /******************************************************************************* * Returns QEMU platform specific memory map regions. ******************************************************************************/ @@ -190,3 +206,76 @@ int plat_spmd_handle_group0_interrupt(uint32_t intid) return -1; } #endif /*defined(SPD_spmd) && (SPMC_AT_EL3 == 0)*/ + +#if ENABLE_RME +/* + * Get a pointer to the RMM-EL3 Shared buffer and return it + * through the pointer passed as parameter. + * + * This function returns the size of the shared buffer. + */ +size_t plat_rmmd_get_el3_rmm_shared_mem(uintptr_t *shared) +{ + *shared = (uintptr_t)RMM_SHARED_BASE; + + return (size_t)RMM_SHARED_SIZE; +} + +int plat_rmmd_load_manifest(struct rmm_manifest *manifest) +{ + uint64_t checksum; + uintptr_t base; + uint64_t size; + struct ns_dram_bank *bank_ptr; + + assert(manifest != NULL); + + manifest->version = RMMD_MANIFEST_VERSION; + manifest->padding = 0U; /* RES0 */ + manifest->plat_data = (uintptr_t)NULL; + manifest->plat_dram.num_banks = 1; + + /* + * Array ns_dram_banks[] follows ns_dram_info structure: + * + * +-----------------------------------+ + * | offset | field | comment | + * +----------+-----------+------------+ + * | 0 | version | 0x00000002 | + * +----------+-----------+------------+ + * | 4 | padding | 0x00000000 | + * +----------+-----------+------------+ + * | 8 | plat_data | NULL | + * +----------+-----------+------------+ + * | 16 | num_banks | | + * +----------+-----------+ | + * | 24 | banks | plat_dram | + * +----------+-----------+ | + * | 32 | checksum | | + * +----------+-----------+------------+ + * | 40 | base 0 | | + * +----------+-----------+ bank[0] | + * | 48 | size 0 | | + * +----------+-----------+------------+ + */ + bank_ptr = (struct ns_dram_bank *) + ((uintptr_t)&manifest->plat_dram.checksum + + sizeof(manifest->plat_dram.checksum)); + + manifest->plat_dram.banks = bank_ptr; + + /* Calculate checksum of plat_dram structure */ + checksum = 1 + (uint64_t)bank_ptr; + + base = NS_DRAM0_BASE; + size = NS_DRAM0_SIZE; + bank_ptr[0].base = base; + bank_ptr[0].size = size; + checksum += base + size; + + /* Checksum must be 0 */ + manifest->plat_dram.checksum = ~checksum + 1UL; + + return 0; +} +#endif /* ENABLE_RME */ diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_console.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_console.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_console.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_gicv2.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_gicv2.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_gicv3.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_gicv3.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_image_load.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_image_load.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_io_storage.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_io_storage.c similarity index 97% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_io_storage.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_io_storage.c index 4c61b1466..59bba8679 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_io_storage.c +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_io_storage.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -33,6 +33,7 @@ #define BL32_EXTRA1_IMAGE_NAME "bl32_extra1.bin" #define BL32_EXTRA2_IMAGE_NAME "bl32_extra2.bin" #define BL33_IMAGE_NAME "bl33.bin" +#define RMM_IMAGE_NAME "rmm.bin" #if TRUSTED_BOARD_BOOT #define TRUSTED_BOOT_FW_CERT_NAME "tb_fw.crt" @@ -96,6 +97,10 @@ static const io_uuid_spec_t bl33_uuid_spec = { .uuid = UUID_NON_TRUSTED_FIRMWARE_BL33, }; +static const io_uuid_spec_t rmm_uuid_spec = { + .uuid = UUID_REALM_MONITOR_MGMT_FIRMWARE, +}; + #if TRUSTED_BOARD_BOOT static const io_uuid_spec_t tb_fw_cert_uuid_spec = { .uuid = UUID_TRUSTED_BOOT_FW_CERT, @@ -163,6 +168,10 @@ static const io_file_spec_t sh_file_spec[] = { .path = BL33_IMAGE_NAME, .mode = FOPEN_MODE_RB }, + [RMM_IMAGE_ID] = { + .path = RMM_IMAGE_NAME, + .mode = FOPEN_MODE_RB + }, #if TRUSTED_BOARD_BOOT [TRUSTED_BOOT_FW_CERT_ID] = { .path = TRUSTED_BOOT_FW_CERT_NAME, @@ -289,6 +298,12 @@ static const struct plat_io_policy policies[] = { (uintptr_t)&bl33_uuid_spec, open_fip }, + [RMM_IMAGE_ID] = { + &fip_dev_handle, + (uintptr_t)&rmm_uuid_spec, + open_fip + }, + #if TRUSTED_BOARD_BOOT [TRUSTED_BOOT_FW_CERT_ID] = { &fip_dev_handle, diff --git a/atf-20240117-bacca82a8/plat/qemu/common/qemu_plat_attest_token.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_plat_attest_token.c new file mode 100644 index 000000000..cf3376d52 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_plat_attest_token.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include + +#include + +static const uint8_t sample_platform_token[] = { + 0xD2, 0x84, 0x44, 0xA1, 0x01, 0x38, 0x22, 0xA0, + 0x59, 0x02, 0x33, 0xA9, 0x19, 0x01, 0x09, 0x78, + 0x1C, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, + 0x61, 0x72, 0x6D, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, + 0x43, 0x43, 0x41, 0x2D, 0x53, 0x53, 0x44, 0x2F, + 0x31, 0x2E, 0x30, 0x2E, 0x30, 0x0A, 0x58, 0x20, + 0xB5, 0x97, 0x3C, 0xB6, 0x8B, 0xAA, 0x9F, 0xC5, + 0x55, 0x58, 0x78, 0x6B, 0x7E, 0xC6, 0x7F, 0x69, + 0xE4, 0x0D, 0xF5, 0xBA, 0x5A, 0xA9, 0x21, 0xCD, + 0x0C, 0x27, 0xF4, 0x05, 0x87, 0xA0, 0x11, 0xEA, + 0x19, 0x09, 0x5C, 0x58, 0x20, 0x7F, 0x45, 0x4C, + 0x46, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x3E, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x58, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x01, 0x00, + 0x58, 0x21, 0x01, 0x07, 0x06, 0x05, 0x04, 0x03, + 0x02, 0x01, 0x00, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, + 0x0A, 0x09, 0x08, 0x17, 0x16, 0x15, 0x14, 0x13, + 0x12, 0x11, 0x10, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, + 0x1A, 0x19, 0x18, 0x19, 0x09, 0x61, 0x58, 0x21, + 0x01, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, + 0x00, 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, + 0x08, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, + 0x10, 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, + 0x18, 0x19, 0x09, 0x5B, 0x19, 0x30, 0x03, 0x19, + 0x09, 0x62, 0x67, 0x73, 0x68, 0x61, 0x2D, 0x32, + 0x35, 0x36, 0x19, 0x09, 0x5F, 0x84, 0xA5, 0x01, + 0x62, 0x42, 0x4C, 0x05, 0x58, 0x20, 0x07, 0x06, + 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x0F, 0x0E, + 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x17, 0x16, + 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x1F, 0x1E, + 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x04, 0x65, + 0x33, 0x2E, 0x34, 0x2E, 0x32, 0x02, 0x58, 0x20, + 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, + 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, + 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, + 0x06, 0x74, 0x54, 0x46, 0x2D, 0x4D, 0x5F, 0x53, + 0x48, 0x41, 0x32, 0x35, 0x36, 0x4D, 0x65, 0x6D, + 0x50, 0x72, 0x65, 0x58, 0x49, 0x50, 0xA4, 0x01, + 0x62, 0x4D, 0x31, 0x05, 0x58, 0x20, 0x07, 0x06, + 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x0F, 0x0E, + 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x17, 0x16, + 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x1F, 0x1E, + 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x04, 0x63, + 0x31, 0x2E, 0x32, 0x02, 0x58, 0x20, 0x07, 0x06, + 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x0F, 0x0E, + 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x17, 0x16, + 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x1F, 0x1E, + 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0xA4, 0x01, + 0x62, 0x4D, 0x32, 0x05, 0x58, 0x20, 0x07, 0x06, + 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x0F, 0x0E, + 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x17, 0x16, + 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x1F, 0x1E, + 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x04, 0x65, + 0x31, 0x2E, 0x32, 0x2E, 0x33, 0x02, 0x58, 0x20, + 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, + 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, + 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, + 0xA4, 0x01, 0x62, 0x4D, 0x33, 0x05, 0x58, 0x20, + 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, + 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, + 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, + 0x04, 0x61, 0x31, 0x02, 0x58, 0x20, 0x07, 0x06, + 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x0F, 0x0E, + 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x17, 0x16, + 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x1F, 0x1E, + 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18, 0x19, 0x09, + 0x60, 0x6C, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, + 0x65, 0x72, 0x2E, 0x63, 0x6F, 0x6D, 0x58, 0x60, + 0xE6, 0xB6, 0x38, 0x4F, 0xAE, 0x3F, 0x6E, 0x67, + 0xF5, 0xD4, 0x97, 0x4B, 0x3F, 0xFD, 0x0A, 0xFA, + 0x1D, 0xF0, 0x2F, 0x73, 0xB8, 0xFF, 0x5F, 0x02, + 0xC0, 0x0F, 0x40, 0xAC, 0xF3, 0xA2, 0x9D, 0xB5, + 0x31, 0x50, 0x16, 0x4F, 0xFA, 0x34, 0x3D, 0x0E, + 0xAF, 0xE0, 0xD0, 0xD1, 0x6C, 0xF0, 0x9D, 0xC1, + 0x01, 0x42, 0xA2, 0x3C, 0xCE, 0xD4, 0x4A, 0x59, + 0xDC, 0x29, 0x0A, 0x30, 0x93, 0x5F, 0xB4, 0x98, + 0x61, 0xBA, 0xE3, 0x91, 0x22, 0x95, 0x24, 0xF4, + 0xAE, 0x47, 0x93, 0xD3, 0x84, 0xA3, 0x76, 0xD0, + 0xC1, 0x26, 0x96, 0x53, 0xA3, 0x60, 0x3F, 0x6C, + 0x75, 0x96, 0x90, 0x6A, 0xF9, 0x4E, 0xDA, 0x30 +}; + +/* + * Get the hardcoded platform attestation token as QEMU does not support + * RSS. + */ +int plat_rmmd_get_cca_attest_token(uintptr_t buf, size_t *len, + uintptr_t hash, size_t hash_size) +{ + (void)hash; + (void)hash_size; + + if (*len < sizeof(sample_platform_token)) { + return -EINVAL; + } + + (void)memcpy((void *)buf, (const void *)sample_platform_token, + sizeof(sample_platform_token)); + *len = sizeof(sample_platform_token); + + return 0; +} diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_pm.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_pm.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_pm.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_private.h b/atf-20240117-bacca82a8/plat/qemu/common/qemu_private.h similarity index 95% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_private.h rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_private.h index c8912b22f..25b14e28b 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_private.h +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_private.h @@ -9,7 +9,7 @@ #include -#include +#include void plat_qemu_io_setup(void); int qemu_io_register_sp_pkg(const char *name, const char *uuid, diff --git a/atf-20240117-bacca82a8/plat/qemu/common/qemu_realm_attest_key.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_realm_attest_key.c new file mode 100644 index 000000000..abd569b39 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_realm_attest_key.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include + +#include + +static const uint8_t sample_delegated_key[] = { + 0x20, 0x11, 0xC7, 0xF0, 0x3C, 0xEE, 0x43, 0x25, 0x17, 0x6E, + 0x52, 0x4F, 0x03, 0x3C, 0x0C, 0xE1, 0xE2, 0x1A, 0x76, 0xE6, + 0xC1, 0xA4, 0xF0, 0xB8, 0x39, 0xAA, 0x1D, 0xF6, 0x1E, 0x0E, + 0x8A, 0x5C, 0x8A, 0x05, 0x74, 0x0F, 0x9B, 0x69, 0xEF, 0xA7, + 0xEB, 0x1A, 0x41, 0x85, 0xBD, 0x11, 0x7F, 0x68 +}; + +/* + * Get the hardcoded delegated realm attestation key as QEMU + * does not support RSS. + */ +int plat_rmmd_get_cca_realm_attest_key(uintptr_t buf, size_t *len, + unsigned int type) +{ + if (*len < sizeof(sample_delegated_key)) { + return -EINVAL; + } + + (void)memcpy((void *)buf, (const void *)sample_delegated_key, + sizeof(sample_delegated_key)); + *len = sizeof(sample_delegated_key); + + return 0; +} diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_rotpk.S b/atf-20240117-bacca82a8/plat/qemu/common/qemu_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_rotpk.S rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_sdei.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_sdei.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_sdei.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_sdei.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_spm.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_spm.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_spm.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_spm.c index c66f47ebc..abedbe4a7 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_spm.c +++ b/atf-20240117-bacca82a8/plat/qemu/common/qemu_spm.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_stack_protector.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_stack_protector.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/qemu_trusted_boot.c b/atf-20240117-bacca82a8/plat/qemu/common/qemu_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/qemu_trusted_boot.c rename to atf-20240117-bacca82a8/plat/qemu/common/qemu_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/sp_min/sp_min-qemu.mk b/atf-20240117-bacca82a8/plat/qemu/common/sp_min/sp_min-qemu.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/sp_min/sp_min-qemu.mk rename to atf-20240117-bacca82a8/plat/qemu/common/sp_min/sp_min-qemu.mk diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/sp_min/sp_min_setup.c b/atf-20240117-bacca82a8/plat/qemu/common/sp_min/sp_min_setup.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/qemu/common/sp_min/sp_min_setup.c rename to atf-20240117-bacca82a8/plat/qemu/common/sp_min/sp_min_setup.c index 7ec657b79..d0c38e026 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/common/sp_min/sp_min_setup.c +++ b/atf-20240117-bacca82a8/plat/qemu/common/sp_min/sp_min_setup.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include "../qemu_private.h" diff --git a/atf-20231013-0ea67d76a/plat/qemu/common/topology.c b/atf-20240117-bacca82a8/plat/qemu/common/topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/common/topology.c rename to atf-20240117-bacca82a8/plat/qemu/common/topology.c diff --git a/atf-20240117-bacca82a8/plat/qemu/common/trp/qemu_trp_setup.c b/atf-20240117-bacca82a8/plat/qemu/common/trp/qemu_trp_setup.c new file mode 100644 index 000000000..0b914ee07 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/qemu/common/trp/qemu_trp_setup.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include +#include +#include + +#include "../qemu_private.h" + +/******************************************************************************* + * Received from boot manifest and populated here + ******************************************************************************/ +extern uint32_t trp_boot_manifest_version; + +static int qemu_trp_process_manifest(struct rmm_manifest *manifest) +{ + /* padding field on the manifest must be RES0 */ + assert(manifest->padding == 0U); + + /* Verify the Boot Manifest Version. Only the Major is considered */ + if (RMMD_MANIFEST_VERSION_MAJOR != + RMMD_GET_MANIFEST_VERSION_MAJOR(manifest->version)) { + return E_RMM_BOOT_MANIFEST_VERSION_NOT_SUPPORTED; + } + + trp_boot_manifest_version = manifest->version; + flush_dcache_range((uintptr_t)manifest, sizeof(struct rmm_manifest)); + + return 0; +} + +void trp_early_platform_setup(struct rmm_manifest *manifest) +{ + int rc; + + rc = qemu_trp_process_manifest(manifest); + if (rc != 0) { + trp_boot_abort(rc); + } + + qemu_console_init(); +} diff --git a/atf-20240117-bacca82a8/plat/qemu/common/trp/trp-qemu-common.mk b/atf-20240117-bacca82a8/plat/qemu/common/trp/trp-qemu-common.mk new file mode 100644 index 000000000..081ba5587 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/qemu/common/trp/trp-qemu-common.mk @@ -0,0 +1,12 @@ +# +# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +# TRP source files common to QEMU platforms +RMM_SOURCES += plat/qemu/common/trp/qemu_trp_setup.c \ + plat/common/aarch64/platform_mp_stack.S \ + plat/qemu/common/aarch64/plat_helpers.S + +INCLUDES += -Iinclude/services/trp diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu/include/platform_def.h b/atf-20240117-bacca82a8/plat/qemu/qemu/include/platform_def.h similarity index 81% rename from atf-20231013-0ea67d76a/plat/qemu/qemu/include/platform_def.h rename to atf-20240117-bacca82a8/plat/qemu/qemu/include/platform_def.h index 903c809dd..4e0b50ad8 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/qemu/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/qemu/qemu/include/platform_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -171,7 +171,8 @@ #define BL32_SRAM_BASE BL_RAM_BASE #define BL32_SRAM_LIMIT BL31_BASE #define BL32_DRAM_BASE SEC_DRAM_BASE -#define BL32_DRAM_LIMIT (SEC_DRAM_BASE + SEC_DRAM_SIZE) +#define BL32_DRAM_LIMIT (SEC_DRAM_BASE + SEC_DRAM_SIZE - \ + RME_GPT_DRAM_SIZE) #define SEC_SRAM_ID 0 #define SEC_DRAM_ID 1 @@ -199,7 +200,7 @@ #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32) #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32) -#define MAX_MMAP_REGIONS (11 + MAX_MMAP_REGIONS_SPMC) +#define MAX_MMAP_REGIONS (13 + MAX_MMAP_REGIONS_SPMC) #define MAX_XLAT_TABLES (6 + MAX_XLAT_TABLES_SPMC) #define MAX_IO_DEVICES 4 #define MAX_IO_HANDLES 4 @@ -226,7 +227,7 @@ #define QEMU_FLASH1_SIZE 0x04000000 #define PLAT_QEMU_FIP_BASE 0x00040000 -#define PLAT_QEMU_FIP_MAX_SIZE 0x00400000 +#define PLAT_QEMU_FIP_MAX_SIZE (QEMU_FLASH0_SIZE - PLAT_QEMU_FIP_BASE) #define DEVICE0_BASE 0x08000000 #define DEVICE0_SIZE 0x01000000 @@ -338,4 +339,72 @@ #define MAX_MMAP_REGIONS_SPMC 0 #define MAX_XLAT_TABLES_SPMC 0 #endif + +#if ENABLE_RME + +/* + * Reserve some space at the end of secure DRAM for the Granule Protection + * Tables + */ +#define PLAT_QEMU_L0_GPT_BASE (PLAT_QEMU_L1_GPT_BASE - \ + PLAT_QEMU_L0_GPT_SIZE) +#define PLAT_QEMU_L0_GPT_SIZE (2 * PAGE_SIZE) + +#define PLAT_QEMU_L1_GPT_BASE (SEC_DRAM_BASE + SEC_DRAM_SIZE - \ + PLAT_QEMU_L1_GPT_SIZE) +#define PLAT_QEMU_L1_GPT_END (PLAT_QEMU_L1_GPT_BASE + \ + PLAT_QEMU_L1_GPT_SIZE - 1U) +#define PLAT_QEMU_L1_GPT_SIZE UL(0x00100000) /* 1MB */ + +#define RME_GPT_DRAM_BASE PLAT_QEMU_L0_GPT_BASE +#define RME_GPT_DRAM_SIZE (PLAT_QEMU_L1_GPT_SIZE + \ + PLAT_QEMU_L0_GPT_SIZE) + +#ifndef __ASSEMBLER__ +/* L0 table greater than 4KB must be naturally aligned */ +CASSERT((PLAT_QEMU_L0_GPT_BASE & (PLAT_QEMU_L0_GPT_SIZE - 1)) == 0, + assert_l0_gpt_naturally_aligned); +#endif + +/* Reserved some DRAM space for RMM (24MB) */ +#define REALM_DRAM_BASE (NS_DRAM0_BASE + PLAT_QEMU_DT_MAX_SIZE) +#define REALM_DRAM_SIZE 0x01800000 + +#define PLAT_QEMU_RMM_SIZE (REALM_DRAM_SIZE - RMM_SHARED_SIZE) +#define PLAT_QEMU_RMM_SHARED_SIZE (PAGE_SIZE) /* 4KB */ + +#define RMM_BASE (REALM_DRAM_BASE) +#define RMM_LIMIT (RMM_BASE + PLAT_QEMU_RMM_SIZE) +#define RMM_SHARED_BASE (RMM_LIMIT) +#define RMM_SHARED_SIZE PLAT_QEMU_RMM_SHARED_SIZE + +#define MAP_GPT_L0_REGION MAP_REGION_FLAT( \ + PLAT_QEMU_L0_GPT_BASE, \ + PLAT_QEMU_L0_GPT_SIZE, \ + MT_MEMORY | MT_RW | EL3_PAS) + +#define MAP_GPT_L1_REGION MAP_REGION_FLAT( \ + PLAT_QEMU_L1_GPT_BASE, \ + PLAT_QEMU_L1_GPT_SIZE, \ + MT_MEMORY | MT_RW | EL3_PAS) +/* + * We add the RMM_SHARED size to RMM mapping to map the region as a block. + * Else we end up requiring more pagetables in BL2 for ROMLIB build. + */ +#define MAP_RMM_DRAM MAP_REGION_FLAT( \ + RMM_BASE, \ + (PLAT_QEMU_RMM_SIZE + \ + RMM_SHARED_SIZE), \ + MT_MEMORY | MT_RW | MT_REALM) + +#define MAP_RMM_SHARED_MEM MAP_REGION_FLAT( \ + RMM_SHARED_BASE, \ + RMM_SHARED_SIZE, \ + MT_MEMORY | MT_RW | MT_REALM) +#else /* !ENABLE_RME */ + +#define RME_GPT_DRAM_SIZE 0 + +#endif /* ENABLE_RME */ + #endif /* PLATFORM_DEF_H */ diff --git a/atf-20240117-bacca82a8/plat/qemu/qemu/include/qemu_pas_def.h b/atf-20240117-bacca82a8/plat/qemu/qemu/include/qemu_pas_def.h new file mode 100644 index 000000000..c108920c1 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/qemu/qemu/include/qemu_pas_def.h @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#ifndef QEMU_PAS_DEF_H +#define QEMU_PAS_DEF_H + +#include +#include "platform_def.h" + +/***************************************************************************** + * PAS regions used to initialize the Granule Protection Table (GPT) + ****************************************************************************/ + +/* + * The PA space is initially mapped in the GPT as follows: + * + * =========================================================================== + * Base Addr | Size |L? GPT|PAS |Content |Comment + * =========================================================================== + * | 1GB |L0 GPT|ANY |Flash | + * 00000000 | | | |IO | + * --------------------------------------------------------------------------- + * 224MB | 1KB |L0 GPT|ANY |Secure RAM (EL3) | + * 0e000000 | | | | (shared) | + * --------------------------------------------------------------------------- + * | 1MB-1KB |L1 GPT|ROOT |Secure RAM (EL3) | + * 0e001000 | | | | | + * --------------------------------------------------------------------------- + * 225MB | 14MB |L1 GPT|SECURE|Secure RAM | + * 0e100000 | | | | (EL2, EL1) | + * --------------------------------------------------------------------------- + * | 1MB+8KB |L1 GPT|ROOT |L0 and L1 GPTs | + * 0eefe000 | | | | | + * --------------------------------------------------------------------------- + * 240MB | 800MB |L0 GPT|ANY |IO | + * 0f000000 | | | | | + * --------------------------------------------------------------------------- + * 1GB | 1MB |L1 GPT|NS |DRAM | + * 40000000 | | | | (device tree) | + * --------------------------------------------------------------------------- + * 1GB+1MB | 24MB |L1 GPT|REALM |DRAM (RMM) | + * 40100000 | | | | | + * --------------------------------------------------------------------------- + * 1GB+25MB | 3GB |L1 GPT|NS |DRAM (kernel) | Limit set by + * 41900000 | | | | | NS_DRAM0_SIZE + * --------------------------------------------------------------------------- + * 256GB | 512+GB |L0 GPT|ANY |IO | Floating. Higher + * 40000000000 | | | | | when RAM>256GB + * ---------------------------------------------------------------------------- + */ + +/* EL3 SRAM */ +#define QEMU_PAS_ROOT_BASE BL_RAM_BASE +#define QEMU_PAS_ROOT_SIZE BL_RAM_SIZE + +/* Secure DRAM */ +#define QEMU_PAS_SEC_BASE SEC_DRAM_BASE +#define QEMU_PAS_SEC_SIZE (SEC_DRAM_SIZE - RME_GPT_DRAM_SIZE) + +/* GPTs */ +#define QEMU_PAS_GPT_BASE RME_GPT_DRAM_BASE +#define QEMU_PAS_GPT_SIZE RME_GPT_DRAM_SIZE + +/* RMM */ +#define QEMU_PAS_RMM_BASE RMM_BASE +#define QEMU_PAS_RMM_SIZE PLAT_QEMU_RMM_SIZE + +/* Shared area between EL3 and RMM */ +#define QEMU_PAS_RMM_SHARED_BASE RMM_SHARED_BASE +#define QEMU_PAS_RMM_SHARED_SIZE RMM_SHARED_SIZE + +#define QEMU_PAS_NS0_BASE NS_DRAM0_BASE +#define QEMU_PAS_NS0_SIZE PLAT_QEMU_DT_MAX_SIZE +#define QEMU_PAS_NS1_BASE (REALM_DRAM_BASE + REALM_DRAM_SIZE) +#define QEMU_PAS_NS1_SIZE (NS_DRAM0_SIZE - \ + (QEMU_PAS_NS0_SIZE + REALM_DRAM_SIZE)) + +#define QEMU_PAS_ROOT GPT_MAP_REGION_GRANULE(QEMU_PAS_ROOT_BASE, \ + QEMU_PAS_ROOT_SIZE, \ + GPT_GPI_ROOT) + +#define QEMU_PAS_SECURE GPT_MAP_REGION_GRANULE(QEMU_PAS_SEC_BASE, \ + QEMU_PAS_SEC_SIZE, \ + GPT_GPI_SECURE) + +#define QEMU_PAS_GPTS GPT_MAP_REGION_GRANULE(QEMU_PAS_GPT_BASE, \ + QEMU_PAS_GPT_SIZE, \ + GPT_GPI_ROOT) + +#define QEMU_PAS_NS0 GPT_MAP_REGION_GRANULE(QEMU_PAS_NS0_BASE, \ + QEMU_PAS_NS0_SIZE, \ + GPT_GPI_NS) + +#define QEMU_PAS_NS1 GPT_MAP_REGION_GRANULE(QEMU_PAS_NS1_BASE, \ + QEMU_PAS_NS1_SIZE, \ + GPT_GPI_NS) + +#define QEMU_PAS_REALM GPT_MAP_REGION_GRANULE(QEMU_PAS_RMM_BASE, \ + QEMU_PAS_RMM_SIZE + \ + QEMU_PAS_RMM_SHARED_SIZE, \ + GPT_GPI_REALM) + +/* GPT Configuration options */ +#define PLATFORM_L0GPTSZ GPCCR_L0GPTSZ_30BITS + +#endif /* QEMU_PAS_DEF_H */ diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu/platform.mk b/atf-20240117-bacca82a8/plat/qemu/qemu/platform.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/qemu/qemu/platform.mk rename to atf-20240117-bacca82a8/plat/qemu/qemu/platform.mk index e902c1214..436e42509 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/qemu/platform.mk +++ b/atf-20240117-bacca82a8/plat/qemu/qemu/platform.mk @@ -204,6 +204,10 @@ endif BL32_RAM_LOCATION := tdram ifeq (${BL32_RAM_LOCATION}, tsram) BL32_RAM_LOCATION_ID = SEC_SRAM_ID + ifeq (${ENABLE_RME},1) + # Avoid overlap between BL2 and BL32 to ease GPT partition + $(error "With RME, BL32 must use secure DRAM") + endif else ifeq (${BL32_RAM_LOCATION}, tdram) BL32_RAM_LOCATION_ID = SEC_DRAM_ID else diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu/qemu_bl1_measured_boot.c b/atf-20240117-bacca82a8/plat/qemu/qemu/qemu_bl1_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu/qemu_bl1_measured_boot.c rename to atf-20240117-bacca82a8/plat/qemu/qemu/qemu_bl1_measured_boot.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu/qemu_helpers.c b/atf-20240117-bacca82a8/plat/qemu/qemu/qemu_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu/qemu_helpers.c rename to atf-20240117-bacca82a8/plat/qemu/qemu/qemu_helpers.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu/qemu_measured_boot.c b/atf-20240117-bacca82a8/plat/qemu/qemu/qemu_measured_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu/qemu_measured_boot.c rename to atf-20240117-bacca82a8/plat/qemu/qemu/qemu_measured_boot.c diff --git a/atf-20240117-bacca82a8/plat/qemu/qemu/trp/trp-qemu.mk b/atf-20240117-bacca82a8/plat/qemu/qemu/trp/trp-qemu.mk new file mode 100644 index 000000000..e0f530ef4 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/qemu/qemu/trp/trp-qemu.mk @@ -0,0 +1,8 @@ +# +# Copyright (c) 2024, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +include plat/qemu/common/trp/trp-qemu-common.mk + diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/include/platform_def.h b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/include/platform_def.h rename to atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/platform.mk b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/platform.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/platform.mk rename to atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/platform.mk index 1b147cee0..528e09354 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/platform.mk +++ b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/platform.mk @@ -18,7 +18,6 @@ ENABLE_STACK_PROTECTOR := 0 ifeq (${SPM_MM},1) NEED_BL32 := yes EL3_EXCEPTION_HANDLING := 1 -GICV2_G0_FOR_EL3 := 1 endif include plat/qemu/common/common.mk diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_gic.c b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_gic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_gic.c rename to atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_gic.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_pm.c b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_pm.c rename to atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_pm.c diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_private.h b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_private.h rename to atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_private.h diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_sip_svc.c b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_sip_svc.c similarity index 62% rename from atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_sip_svc.c rename to atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_sip_svc.c index 05ebec472..ed49e915a 100644 --- a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_sip_svc.c +++ b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_sip_svc.c @@ -28,13 +28,105 @@ static int platform_version_minor; #define SIP_SVC_VERSION SIP_FUNCTION_ID(1) #define SIP_SVC_GET_GIC SIP_FUNCTION_ID(100) #define SIP_SVC_GET_GIC_ITS SIP_FUNCTION_ID(101) +#define SIP_SVC_GET_CPU_COUNT SIP_FUNCTION_ID(200) +#define SIP_SVC_GET_CPU_NODE SIP_FUNCTION_ID(201) static uint64_t gic_its_addr; +typedef struct { + uint32_t nodeid; + uint32_t mpidr; +} cpu_data; + +static struct { + uint32_t num_cpus; + cpu_data cpu[PLATFORM_CORE_COUNT]; +} dynamic_platform_info; + void sbsa_set_gic_bases(const uintptr_t gicd_base, const uintptr_t gicr_base); uintptr_t sbsa_get_gicd(void); uintptr_t sbsa_get_gicr(void); +/* + * QEMU provides us with minimal information about hardware platform using + * minimalistic DeviceTree. This is not a Linux DeviceTree. It is not even + * a firmware DeviceTree. + * + * It is information passed from QEMU to describe the information a hardware + * platform would have other mechanisms to discover at runtime, that are + * affected by the QEMU command line. + * + * Ultimately this device tree will be replaced by IPC calls to an emulated SCP. + * And when we do that, we won't then have to rewrite Normal world firmware to + * cope. + */ + +void read_cpuinfo_from_dt(void *dtb) +{ + int node; + int prev; + int cpu = 0; + uint32_t nodeid = 0; + uintptr_t mpidr; + + /* + * QEMU gives us this DeviceTree node: + * numa-node-id entries are only when NUMA config is used + * + * cpus { + * #size-cells = <0x00>; + * #address-cells = <0x02>; + * + * cpu@0 { + * numa-node-id = <0x00>; + * reg = <0x00 0x00>; + * }; + * + * cpu@1 { + * numa-node-id = <0x03>; + * reg = <0x00 0x01>; + * }; + * }; + */ + node = fdt_path_offset(dtb, "/cpus"); + if (node < 0) { + ERROR("No information about cpus in DeviceTree.\n"); + panic(); + } + + /* + * QEMU numbers cpus from 0 and there can be /cpus/cpu-map present so we + * cannot use fdt_first_subnode() here + */ + node = fdt_path_offset(dtb, "/cpus/cpu@0"); + + while (node > 0) { + if (fdt_getprop(dtb, node, "reg", NULL)) { + fdt_get_reg_props_by_index(dtb, node, 0, &mpidr, NULL); + } else { + ERROR("Incomplete information for cpu %d in DeviceTree.\n", cpu); + panic(); + } + + if (fdt_getprop(dtb, node, "numa-node-id", NULL)) { + fdt_read_uint32(dtb, node, "numa-node-id", &nodeid); + } + + dynamic_platform_info.cpu[cpu].nodeid = nodeid; + dynamic_platform_info.cpu[cpu].mpidr = mpidr; + + INFO("CPU %d: node-id: %d, mpidr: %ld\n", cpu, nodeid, mpidr); + + cpu++; + + prev = node; + node = fdt_next_subnode(dtb, prev); + } + + dynamic_platform_info.num_cpus = cpu; + INFO("Found %d cpus\n", dynamic_platform_info.num_cpus); +} + void read_platform_config_from_dt(void *dtb) { int node; @@ -129,6 +221,7 @@ void sip_svc_init(void) INFO("Platform version: %d.%d\n", platform_version_major, platform_version_minor); read_platform_config_from_dt(dtb); + read_cpuinfo_from_dt(dtb); } /* @@ -144,6 +237,7 @@ uintptr_t sbsa_sip_smc_handler(uint32_t smc_fid, u_register_t flags) { uint32_t ns; + uint64_t index; /* Determine which security state this SMC originated from */ ns = is_caller_non_secure(flags); @@ -163,6 +257,19 @@ uintptr_t sbsa_sip_smc_handler(uint32_t smc_fid, case SIP_SVC_GET_GIC_ITS: SMC_RET2(handle, NULL, gic_its_addr); + case SIP_SVC_GET_CPU_COUNT: + SMC_RET2(handle, NULL, dynamic_platform_info.num_cpus); + + case SIP_SVC_GET_CPU_NODE: + index = x1; + if (index < PLATFORM_CORE_COUNT) { + SMC_RET3(handle, NULL, + dynamic_platform_info.cpu[index].nodeid, + dynamic_platform_info.cpu[index].mpidr); + } else { + SMC_RET1(handle, SMC_ARCH_CALL_INVAL_PARAM); + } + default: ERROR("%s: unhandled SMC (0x%x) (function id: %d)\n", __func__, smc_fid, smc_fid - SIP_FUNCTION); diff --git a/atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_topology.c b/atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qemu/qemu_sbsa/sbsa_topology.c rename to atf-20240117-bacca82a8/plat/qemu/qemu_sbsa/sbsa_topology.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/aarch64/plat_macros.S b/atf-20240117-bacca82a8/plat/qti/common/inc/aarch64/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/aarch64/plat_macros.S rename to atf-20240117-bacca82a8/plat/qti/common/inc/aarch64/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/qti_board_def.h b/atf-20240117-bacca82a8/plat/qti/common/inc/qti_board_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/qti_board_def.h rename to atf-20240117-bacca82a8/plat/qti/common/inc/qti_board_def.h diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/qti_cpu.h b/atf-20240117-bacca82a8/plat/qti/common/inc/qti_cpu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/qti_cpu.h rename to atf-20240117-bacca82a8/plat/qti/common/inc/qti_cpu.h diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/qti_interrupt_svc.h b/atf-20240117-bacca82a8/plat/qti/common/inc/qti_interrupt_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/qti_interrupt_svc.h rename to atf-20240117-bacca82a8/plat/qti/common/inc/qti_interrupt_svc.h diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/qti_plat.h b/atf-20240117-bacca82a8/plat/qti/common/inc/qti_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/qti_plat.h rename to atf-20240117-bacca82a8/plat/qti/common/inc/qti_plat.h diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/qti_rng.h b/atf-20240117-bacca82a8/plat/qti/common/inc/qti_rng.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/qti_rng.h rename to atf-20240117-bacca82a8/plat/qti/common/inc/qti_rng.h diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/qti_uart_console.h b/atf-20240117-bacca82a8/plat/qti/common/inc/qti_uart_console.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/qti_uart_console.h rename to atf-20240117-bacca82a8/plat/qti/common/inc/qti_uart_console.h diff --git a/atf-20231013-0ea67d76a/plat/qti/common/inc/spmi_arb.h b/atf-20240117-bacca82a8/plat/qti/common/inc/spmi_arb.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/inc/spmi_arb.h rename to atf-20240117-bacca82a8/plat/qti/common/inc/spmi_arb.h diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_helpers.S b/atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_helpers.S rename to atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo4_gold.S b/atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo4_gold.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo4_gold.S rename to atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo4_gold.S diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo4_silver.S b/atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo4_silver.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo4_silver.S rename to atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo4_silver.S diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo6_gold.S b/atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo6_gold.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo6_gold.S rename to atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo6_gold.S diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo6_silver.S b/atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo6_silver.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_kryo6_silver.S rename to atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_kryo6_silver.S diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_uart_console.S b/atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_uart_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/aarch64/qti_uart_console.S rename to atf-20240117-bacca82a8/plat/qti/common/src/aarch64/qti_uart_console.S diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/pm_ps_hold.c b/atf-20240117-bacca82a8/plat/qti/common/src/pm_ps_hold.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/pm_ps_hold.c rename to atf-20240117-bacca82a8/plat/qti/common/src/pm_ps_hold.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_bl31_setup.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_bl31_setup.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_common.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_common.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_common.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_gic_v3.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_gic_v3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_gic_v3.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_gic_v3.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_interrupt_svc.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_interrupt_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_interrupt_svc.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_interrupt_svc.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_pm.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_pm.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_pm.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_rng.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_rng.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_rng.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_rng.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_stack_protector.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_stack_protector.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_syscall.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_syscall.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_syscall.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_syscall.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/qti_topology.c b/atf-20240117-bacca82a8/plat/qti/common/src/qti_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/qti_topology.c rename to atf-20240117-bacca82a8/plat/qti/common/src/qti_topology.c diff --git a/atf-20231013-0ea67d76a/plat/qti/common/src/spmi_arb.c b/atf-20240117-bacca82a8/plat/qti/common/src/spmi_arb.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/common/src/spmi_arb.c rename to atf-20240117-bacca82a8/plat/qti/common/src/spmi_arb.c diff --git a/atf-20231013-0ea67d76a/plat/qti/mdm9607/platform.mk b/atf-20240117-bacca82a8/plat/qti/mdm9607/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/mdm9607/platform.mk rename to atf-20240117-bacca82a8/plat/qti/mdm9607/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/mdm9607/sp_min/sp_min-mdm9607.mk b/atf-20240117-bacca82a8/plat/qti/mdm9607/sp_min/sp_min-mdm9607.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/mdm9607/sp_min/sp_min-mdm9607.mk rename to atf-20240117-bacca82a8/plat/qti/mdm9607/sp_min/sp_min-mdm9607.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8909/platform.mk b/atf-20240117-bacca82a8/plat/qti/msm8909/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8909/platform.mk rename to atf-20240117-bacca82a8/plat/qti/msm8909/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8909/sp_min/sp_min-msm8909.mk b/atf-20240117-bacca82a8/plat/qti/msm8909/sp_min/sp_min-msm8909.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8909/sp_min/sp_min-msm8909.mk rename to atf-20240117-bacca82a8/plat/qti/msm8909/sp_min/sp_min-msm8909.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/aarch32/msm8916_helpers.S b/atf-20240117-bacca82a8/plat/qti/msm8916/aarch32/msm8916_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/aarch32/msm8916_helpers.S rename to atf-20240117-bacca82a8/plat/qti/msm8916/aarch32/msm8916_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/aarch32/uartdm_console.S b/atf-20240117-bacca82a8/plat/qti/msm8916/aarch32/uartdm_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/aarch32/uartdm_console.S rename to atf-20240117-bacca82a8/plat/qti/msm8916/aarch32/uartdm_console.S diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/aarch64/msm8916_helpers.S b/atf-20240117-bacca82a8/plat/qti/msm8916/aarch64/msm8916_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/aarch64/msm8916_helpers.S rename to atf-20240117-bacca82a8/plat/qti/msm8916/aarch64/msm8916_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/aarch64/uartdm_console.S b/atf-20240117-bacca82a8/plat/qti/msm8916/aarch64/uartdm_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/aarch64/uartdm_console.S rename to atf-20240117-bacca82a8/plat/qti/msm8916/aarch64/uartdm_console.S diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/include/msm8916_mmap.h b/atf-20240117-bacca82a8/plat/qti/msm8916/include/msm8916_mmap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/include/msm8916_mmap.h rename to atf-20240117-bacca82a8/plat/qti/msm8916/include/msm8916_mmap.h diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/include/plat_macros.S b/atf-20240117-bacca82a8/plat/qti/msm8916/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/qti/msm8916/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/include/platform_def.h b/atf-20240117-bacca82a8/plat/qti/msm8916/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/include/platform_def.h rename to atf-20240117-bacca82a8/plat/qti/msm8916/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/include/uartdm_console.h b/atf-20240117-bacca82a8/plat/qti/msm8916/include/uartdm_console.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/include/uartdm_console.h rename to atf-20240117-bacca82a8/plat/qti/msm8916/include/uartdm_console.h diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_bl31_setup.c b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_bl31_setup.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_config.c b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_config.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_config.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_config.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_config.h b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_config.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_config.h rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_config.h diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_cpu_boot.c b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_cpu_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_cpu_boot.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_cpu_boot.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_gicv2.c b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_gicv2.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_gicv2.h b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_gicv2.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_gicv2.h rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_gicv2.h diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_pm.c b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_pm.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_pm.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_pm.h b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_pm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_pm.h rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_pm.h diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_setup.c b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_setup.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_setup.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_setup.h b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_setup.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_setup.h rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_setup.h diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_topology.c b/atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/msm8916_topology.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/msm8916_topology.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/platform.mk b/atf-20240117-bacca82a8/plat/qti/msm8916/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/platform.mk rename to atf-20240117-bacca82a8/plat/qti/msm8916/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/sp_min/msm8916_sp_min_setup.c b/atf-20240117-bacca82a8/plat/qti/msm8916/sp_min/msm8916_sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/sp_min/msm8916_sp_min_setup.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/sp_min/msm8916_sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/sp_min/sp_min-msm8916.mk b/atf-20240117-bacca82a8/plat/qti/msm8916/sp_min/sp_min-msm8916.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/sp_min/sp_min-msm8916.mk rename to atf-20240117-bacca82a8/plat/qti/msm8916/sp_min/sp_min-msm8916.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/tsp/msm8916_tsp_setup.c b/atf-20240117-bacca82a8/plat/qti/msm8916/tsp/msm8916_tsp_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/tsp/msm8916_tsp_setup.c rename to atf-20240117-bacca82a8/plat/qti/msm8916/tsp/msm8916_tsp_setup.c diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8916/tsp/tsp-msm8916.mk b/atf-20240117-bacca82a8/plat/qti/msm8916/tsp/tsp-msm8916.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8916/tsp/tsp-msm8916.mk rename to atf-20240117-bacca82a8/plat/qti/msm8916/tsp/tsp-msm8916.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8939/platform.mk b/atf-20240117-bacca82a8/plat/qti/msm8939/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8939/platform.mk rename to atf-20240117-bacca82a8/plat/qti/msm8939/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8939/sp_min/sp_min-msm8939.mk b/atf-20240117-bacca82a8/plat/qti/msm8939/sp_min/sp_min-msm8939.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8939/sp_min/sp_min-msm8939.mk rename to atf-20240117-bacca82a8/plat/qti/msm8939/sp_min/sp_min-msm8939.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/msm8939/tsp/tsp-msm8939.mk b/atf-20240117-bacca82a8/plat/qti/msm8939/tsp/tsp-msm8939.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/msm8939/tsp/tsp-msm8939.mk rename to atf-20240117-bacca82a8/plat/qti/msm8939/tsp/tsp-msm8939.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h b/atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h rename to atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/qtiseclib_cb_interface.h diff --git a/atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/qtiseclib_defs.h b/atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/qtiseclib_defs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/qtiseclib_defs.h rename to atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/qtiseclib_defs.h diff --git a/atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/qtiseclib_interface.h b/atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/qtiseclib_interface.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/qtiseclib_interface.h rename to atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/qtiseclib_interface.h diff --git a/atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/sc7180/qtiseclib_defs_plat.h b/atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/sc7180/qtiseclib_defs_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/sc7180/qtiseclib_defs_plat.h rename to atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/sc7180/qtiseclib_defs_plat.h diff --git a/atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/sc7280/qtiseclib_defs_plat.h b/atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/sc7280/qtiseclib_defs_plat.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/qtiseclib/inc/sc7280/qtiseclib_defs_plat.h rename to atf-20240117-bacca82a8/plat/qti/qtiseclib/inc/sc7280/qtiseclib_defs_plat.h diff --git a/atf-20231013-0ea67d76a/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c b/atf-20240117-bacca82a8/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c rename to atf-20240117-bacca82a8/plat/qti/qtiseclib/src/qtiseclib_cb_interface.c diff --git a/atf-20231013-0ea67d76a/plat/qti/qtiseclib/src/qtiseclib_interface_stub.c b/atf-20240117-bacca82a8/plat/qti/qtiseclib/src/qtiseclib_interface_stub.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/qtiseclib/src/qtiseclib_interface_stub.c rename to atf-20240117-bacca82a8/plat/qti/qtiseclib/src/qtiseclib_interface_stub.c diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7180/inc/platform_def.h b/atf-20240117-bacca82a8/plat/qti/sc7180/inc/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7180/inc/platform_def.h rename to atf-20240117-bacca82a8/plat/qti/sc7180/inc/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7180/inc/qti_map_chipinfo.h b/atf-20240117-bacca82a8/plat/qti/sc7180/inc/qti_map_chipinfo.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7180/inc/qti_map_chipinfo.h rename to atf-20240117-bacca82a8/plat/qti/sc7180/inc/qti_map_chipinfo.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7180/inc/qti_rng_io.h b/atf-20240117-bacca82a8/plat/qti/sc7180/inc/qti_rng_io.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7180/inc/qti_rng_io.h rename to atf-20240117-bacca82a8/plat/qti/sc7180/inc/qti_rng_io.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7180/inc/qti_secure_io_cfg.h b/atf-20240117-bacca82a8/plat/qti/sc7180/inc/qti_secure_io_cfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7180/inc/qti_secure_io_cfg.h rename to atf-20240117-bacca82a8/plat/qti/sc7180/inc/qti_secure_io_cfg.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7180/platform.mk b/atf-20240117-bacca82a8/plat/qti/sc7180/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7180/platform.mk rename to atf-20240117-bacca82a8/plat/qti/sc7180/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7280/inc/platform_def.h b/atf-20240117-bacca82a8/plat/qti/sc7280/inc/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7280/inc/platform_def.h rename to atf-20240117-bacca82a8/plat/qti/sc7280/inc/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7280/inc/qti_map_chipinfo.h b/atf-20240117-bacca82a8/plat/qti/sc7280/inc/qti_map_chipinfo.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7280/inc/qti_map_chipinfo.h rename to atf-20240117-bacca82a8/plat/qti/sc7280/inc/qti_map_chipinfo.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7280/inc/qti_rng_io.h b/atf-20240117-bacca82a8/plat/qti/sc7280/inc/qti_rng_io.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7280/inc/qti_rng_io.h rename to atf-20240117-bacca82a8/plat/qti/sc7280/inc/qti_rng_io.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7280/inc/qti_secure_io_cfg.h b/atf-20240117-bacca82a8/plat/qti/sc7280/inc/qti_secure_io_cfg.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7280/inc/qti_secure_io_cfg.h rename to atf-20240117-bacca82a8/plat/qti/sc7280/inc/qti_secure_io_cfg.h diff --git a/atf-20231013-0ea67d76a/plat/qti/sc7280/platform.mk b/atf-20240117-bacca82a8/plat/qti/sc7280/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/qti/sc7280/platform.mk rename to atf-20240117-bacca82a8/plat/qti/sc7280/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/renesas/common/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/renesas/common/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/renesas/common/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/renesas/common/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/bl2_cpg_init.c b/atf-20240117-bacca82a8/plat/renesas/common/bl2_cpg_init.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/bl2_cpg_init.c rename to atf-20240117-bacca82a8/plat/renesas/common/bl2_cpg_init.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/bl2_interrupt_error.c b/atf-20240117-bacca82a8/plat/renesas/common/bl2_interrupt_error.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/bl2_interrupt_error.c rename to atf-20240117-bacca82a8/plat/renesas/common/bl2_interrupt_error.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/bl2_plat_mem_params_desc.c b/atf-20240117-bacca82a8/plat/renesas/common/bl2_plat_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/bl2_plat_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/renesas/common/bl2_plat_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/bl2_secure_setting.c b/atf-20240117-bacca82a8/plat/renesas/common/bl2_secure_setting.c similarity index 95% rename from atf-20231013-0ea67d76a/plat/renesas/common/bl2_secure_setting.c rename to atf-20240117-bacca82a8/plat/renesas/common/bl2_secure_setting.c index 2f8b0011d..297b1a9e4 100644 --- a/atf-20231013-0ea67d76a/plat/renesas/common/bl2_secure_setting.c +++ b/atf-20240117-bacca82a8/plat/renesas/common/bl2_secure_setting.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -107,8 +107,10 @@ static const struct { /* * Security group 0 attribute setting for master ports 3 * Security group 1 attribute setting for master ports 3 - * {SEC_GRP0CR3, 0x00000000U}, - * {SEC_GRP1CR3, 0x00000000U}, + */ + { SEC_GRP0CR3, 0x00003780U }, + { SEC_GRP1CR3, 0x00003780U }, + /* * Security group 0 attribute setting for slave ports 0 * Security group 1 attribute setting for slave ports 0 * {SEC_GRP0COND0, 0x00000000U}, @@ -259,46 +261,12 @@ static const struct { }; /* AXI settings */ -static const struct { +struct axi_t { uint32_t reg; uint32_t val; -} axi[] = { - /* - * DRAM protection - * AXI dram protected area division - */ - {AXI_DPTDIVCR0, 0x0E0403F0U}, - {AXI_DPTDIVCR1, 0x0E0407E0U}, - {AXI_DPTDIVCR2, 0x0E080000U}, - {AXI_DPTDIVCR3, 0x0E080000U}, - {AXI_DPTDIVCR4, 0x0E080000U}, - {AXI_DPTDIVCR5, 0x0E080000U}, - {AXI_DPTDIVCR6, 0x0E080000U}, - {AXI_DPTDIVCR7, 0x0E080000U}, - {AXI_DPTDIVCR8, 0x0E080000U}, - {AXI_DPTDIVCR9, 0x0E080000U}, - {AXI_DPTDIVCR10, 0x0E080000U}, - {AXI_DPTDIVCR11, 0x0E080000U}, - {AXI_DPTDIVCR12, 0x0E080000U}, - {AXI_DPTDIVCR13, 0x0E080000U}, - {AXI_DPTDIVCR14, 0x0E080000U}, - /* AXI dram protected area setting */ - {AXI_DPTCR0, 0x0E000000U}, - {AXI_DPTCR1, 0x0E000E0EU}, - {AXI_DPTCR2, 0x0E000000U}, - {AXI_DPTCR3, 0x0E000000U}, - {AXI_DPTCR4, 0x0E000000U}, - {AXI_DPTCR5, 0x0E000000U}, - {AXI_DPTCR6, 0x0E000000U}, - {AXI_DPTCR7, 0x0E000000U}, - {AXI_DPTCR8, 0x0E000000U}, - {AXI_DPTCR9, 0x0E000000U}, - {AXI_DPTCR10, 0x0E000000U}, - {AXI_DPTCR11, 0x0E000000U}, - {AXI_DPTCR12, 0x0E000000U}, - {AXI_DPTCR13, 0x0E000000U}, - {AXI_DPTCR14, 0x0E000000U}, - {AXI_DPTCR15, 0x0E000000U}, +}; + +static const struct axi_t axi[] = { /* * SRAM ptotection * AXI sram protected area division @@ -337,6 +305,47 @@ static const struct { {AXI_SPTCR15, 0x0E000000U} }; +static const struct axi_t axi_dram[] = { + /* + * DRAM protection + * AXI dram protected area division + */ + {AXI_DPTDIVCR0, 0x0E0403F0U}, + {AXI_DPTDIVCR1, 0x0E0407E0U}, + {AXI_DPTDIVCR2, 0x0E080000U}, + {AXI_DPTDIVCR3, 0x0E080000U}, + {AXI_DPTDIVCR4, 0x0E080000U}, + {AXI_DPTDIVCR5, 0x0E080000U}, + {AXI_DPTDIVCR6, 0x0E080000U}, + {AXI_DPTDIVCR7, 0x0E080000U}, + {AXI_DPTDIVCR8, 0x0E080000U}, + {AXI_DPTDIVCR9, 0x0E080000U}, + {AXI_DPTDIVCR10, 0x0E080000U}, + {AXI_DPTDIVCR11, 0x0E080000U}, + {AXI_DPTDIVCR12, 0x0E080000U}, + {AXI_DPTDIVCR13, 0x0E080000U}, + {AXI_DPTDIVCR14, 0x0E080000U}, + /* AXI dram protected area setting */ + {AXI_DPTCR0, 0x0E000000U}, + {AXI_DPTCR1, 0x0E000E0EU}, + {AXI_DPTCR2, 0x0E000000U}, + {AXI_DPTCR3, 0x0E000000U}, + {AXI_DPTCR4, 0x0E000000U}, + {AXI_DPTCR5, 0x0E000000U}, + {AXI_DPTCR6, 0x0E000000U}, + {AXI_DPTCR7, 0x0E000000U}, + {AXI_DPTCR8, 0x0E000000U}, + {AXI_DPTCR9, 0x0E000000U}, + {AXI_DPTCR10, 0x0E000000U}, + {AXI_DPTCR11, 0x0E000000U}, + {AXI_DPTCR12, 0x0E000000U}, + {AXI_DPTCR13, 0x0E000000U}, + {AXI_DPTCR14, 0x0E000000U}, + {AXI_DPTCR15, 0x0E000000U}, + /* AXI sram protected area setting */ + {AXI_SPTCR15, 0x0E000000U} +}; + static void lifec_security_setting(void) { uint32_t i; @@ -345,7 +354,7 @@ static void lifec_security_setting(void) mmio_write_32(lifec[i].reg, lifec[i].val); } -/* SRAM/DRAM protection setting */ +/* SRAM protection setting */ static void axi_security_setting(void) { uint32_t i; @@ -354,6 +363,15 @@ static void axi_security_setting(void) mmio_write_32(axi[i].reg, axi[i].val); } +/* DRAM protection setting */ +void bl2_ram_security_setting_finish(void) +{ + uint32_t i; + + for (i = 0; i < ARRAY_SIZE(axi_dram); i++) + mmio_write_32(axi_dram[i].reg, axi_dram[i].val); +} + void bl2_secure_setting(void) { lifec_security_setting(); diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/renesas/common/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/renesas/common/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/common.mk b/atf-20240117-bacca82a8/plat/renesas/common/common.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/common.mk rename to atf-20240117-bacca82a8/plat/renesas/common/common.mk diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/plat.ld.S b/atf-20240117-bacca82a8/plat/renesas/common/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/renesas/common/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/renesas/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/renesas/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/platform_def.h b/atf-20240117-bacca82a8/plat/renesas/common/include/platform_def.h similarity index 96% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/platform_def.h rename to atf-20240117-bacca82a8/plat/renesas/common/include/platform_def.h index ab071ec08..8178f3a71 100644 --- a/atf-20231013-0ea67d76a/plat/renesas/common/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/renesas/common/include/platform_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -144,7 +144,8 @@ ******************************************************************************/ #ifndef SPD_NONE #define BL32_BASE U(0x44100000) -#define BL32_LIMIT (BL32_BASE + U(0x200000)) +#define BL32_SIZE U(0x200000) +#define BL32_LIMIT (BL32_BASE + BL32_SIZE) #endif /******************************************************************************* @@ -152,7 +153,8 @@ ******************************************************************************/ #define BL33_BASE DRAM1_NS_BASE #define BL33_COMP_SIZE U(0x200000) -#define BL33_COMP_BASE (BL33_BASE - BL33_COMP_SIZE) +#define BL33_DECOMP_SIZE (BL33_COMP_SIZE * 32) +#define BL33_COMP_BASE (BL33_BASE + BL33_DECOMP_SIZE) /******************************************************************************* * Platform specific page table and MMU setup constants diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/rcar_def.h b/atf-20240117-bacca82a8/plat/renesas/common/include/rcar_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/rcar_def.h rename to atf-20240117-bacca82a8/plat/renesas/common/include/rcar_def.h index 2cd26edbf..f1c255377 100644 --- a/atf-20231013-0ea67d76a/plat/renesas/common/include/rcar_def.h +++ b/atf-20240117-bacca82a8/plat/renesas/common/include/rcar_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -31,7 +31,7 @@ #define DRAM_LIMIT ULL(0x0000010000000000) #define DRAM1_BASE U(0x40000000) #define DRAM1_SIZE U(0x80000000) -#define DRAM1_NS_BASE (DRAM1_BASE + U(0x10000000)) +#define DRAM1_NS_BASE (DRAM1_BASE + U(0x08000000)) #define DRAM1_NS_SIZE (DRAM1_SIZE - DRAM1_NS_BASE) #define DRAM_40BIT_BASE ULL(0x0400000000) #define DRAM_40BIT_SIZE ULL(0x0400000000) diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/rcar_private.h b/atf-20240117-bacca82a8/plat/renesas/common/include/rcar_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/rcar_private.h rename to atf-20240117-bacca82a8/plat/renesas/common/include/rcar_private.h diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/rcar_version.h b/atf-20240117-bacca82a8/plat/renesas/common/include/rcar_version.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/rcar_version.h rename to atf-20240117-bacca82a8/plat/renesas/common/include/rcar_version.h diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/registers/axi_registers.h b/atf-20240117-bacca82a8/plat/renesas/common/include/registers/axi_registers.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/registers/axi_registers.h rename to atf-20240117-bacca82a8/plat/renesas/common/include/registers/axi_registers.h diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/registers/cpg_registers.h b/atf-20240117-bacca82a8/plat/renesas/common/include/registers/cpg_registers.h similarity index 98% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/registers/cpg_registers.h rename to atf-20240117-bacca82a8/plat/renesas/common/include/registers/cpg_registers.h index 5d2bb9e3a..277f11b77 100644 --- a/atf-20231013-0ea67d76a/plat/renesas/common/include/registers/cpg_registers.h +++ b/atf-20240117-bacca82a8/plat/renesas/common/include/registers/cpg_registers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -16,7 +16,7 @@ #define CPG_SRCR2 (CPG_BASE + 0x00B0U) /* CPG module stop status 2 */ #define CPG_MSTPSR2 (CPG_BASE + 0x0040U) -/* CPG module stop status 2 */ +/* CPG module stop status 3 */ #define CPG_MSTPSR3 (CPG_BASE + 0x0048U) /* CPG write protect */ #define CPG_CPGWPR (CPG_BASE + 0x0900U) diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/include/registers/lifec_registers.h b/atf-20240117-bacca82a8/plat/renesas/common/include/registers/lifec_registers.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/include/registers/lifec_registers.h rename to atf-20240117-bacca82a8/plat/renesas/common/include/registers/lifec_registers.h diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/plat_image_load.c b/atf-20240117-bacca82a8/plat/renesas/common/plat_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/plat_image_load.c rename to atf-20240117-bacca82a8/plat/renesas/common/plat_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/plat_pm.c b/atf-20240117-bacca82a8/plat/renesas/common/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/plat_pm.c rename to atf-20240117-bacca82a8/plat/renesas/common/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/plat_storage.c b/atf-20240117-bacca82a8/plat/renesas/common/plat_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/plat_storage.c rename to atf-20240117-bacca82a8/plat/renesas/common/plat_storage.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/plat_topology.c b/atf-20240117-bacca82a8/plat/renesas/common/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/plat_topology.c rename to atf-20240117-bacca82a8/plat/renesas/common/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/common/rcar_common.c b/atf-20240117-bacca82a8/plat/renesas/common/rcar_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/common/rcar_common.c rename to atf-20240117-bacca82a8/plat/renesas/common/rcar_common.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/rcar/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/renesas/rcar/bl2_plat_setup.c similarity index 89% rename from atf-20231013-0ea67d76a/plat/renesas/rcar/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/renesas/rcar/bl2_plat_setup.c index 81ee93e53..cf77da28d 100644 --- a/atf-20231013-0ea67d76a/plat/renesas/rcar/bl2_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/renesas/rcar/bl2_plat_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2021, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2018-2023, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -68,6 +68,7 @@ extern void plat_rcar_gic_init(void); extern void bl2_enter_bl31(const struct entry_point_info *bl_ep_info); extern void bl2_system_cpg_init(void); extern void bl2_secure_setting(void); +extern void bl2_ram_security_setting_finish(void); extern void bl2_cpg_init(void); extern void rcar_io_emmc_setup(void); extern void rcar_io_setup(void); @@ -417,44 +418,61 @@ void bl2_plat_preload_setup(void) } #endif -int bl2_plat_handle_pre_image_load(unsigned int image_id) +static uint64_t check_secure_load_area(uintptr_t base, uint32_t size, + uintptr_t dest, uint32_t len) { - u_register_t *boot_kind = (void *) BOOT_KIND_BASE; - bl_mem_params_node_t *bl_mem_params; + uintptr_t free_end, requested_end; - bl_mem_params = get_bl_mem_params_node(image_id); - -#if RCAR_GEN3_BL33_GZIP == 1 - if (image_id == BL33_IMAGE_ID) { - image_decompress_prepare(&bl_mem_params->image_info); + /* + * Handle corner cases first. + * + * The order of the 2 tests is important, because if there's no space + * left (i.e. free_size == 0) but we don't ask for any memory + * (i.e. size == 0) then we should report that the memory is free. + */ + if (len == 0U) { + WARN("BL2: load data size is zero\n"); + return 0; /* A zero-byte region is always free */ + } + if (size == 0U) { + goto err; } -#endif - if (image_id != BL31_IMAGE_ID) - return 0; + /* + * Check that the end addresses don't overflow. + * If they do, consider that this memory region is not free, as this + * is an invalid scenario. + */ + if (check_uptr_overflow(base, size - 1U)) { + goto err; + } + free_end = base + (size - 1U); - if (is_ddr_backup_mode() == RCAR_COLD_BOOT) - goto cold_boot; + if (check_uptr_overflow(dest, len - 1U)) { + goto err; + } + requested_end = dest + (len - 1U); - *boot_kind = RCAR_WARM_BOOT; - flush_dcache_range(BOOT_KIND_BASE, sizeof(*boot_kind)); - - console_flush(); - bl2_plat_flush_bl31_params(); - - /* will not return */ - bl2_enter_bl31(&bl_mem_params->ep_info); - -cold_boot: - *boot_kind = RCAR_COLD_BOOT; - flush_dcache_range(BOOT_KIND_BASE, sizeof(*boot_kind)); + /* + * Finally, check that the requested memory region lies within the free + * region. + */ + if ((dest < base) || (requested_end > free_end)) { + goto err; + } return 0; + +err: + ERROR("BL2: load data is outside the loadable area.\n"); + ERROR("BL2: dst=0x%lx, len=%d(0x%x)\n", dest, len, len); + return 1; } -static uint64_t rcar_get_dest_addr_from_cert(uint32_t certid, uintptr_t *dest) +static uint64_t rcar_get_dest_addr_from_cert(uint32_t certid, uintptr_t *dest, + uint32_t *len) { - uint32_t cert, len; + uint32_t cert; int ret; ret = rcar_get_certificate(certid, &cert); @@ -463,7 +481,104 @@ static uint64_t rcar_get_dest_addr_from_cert(uint32_t certid, uintptr_t *dest) return 1; } - rcar_read_certificate((uint64_t) cert, &len, dest); + rcar_read_certificate((uint64_t) cert, len, dest); + + return 0; +} + +int bl2_plat_handle_pre_image_load(unsigned int image_id) +{ + u_register_t *boot_kind = (void *) BOOT_KIND_BASE; + bl_mem_params_node_t *bl_mem_params; + uintptr_t dev_handle; + uintptr_t image_spec; + uintptr_t dest; + uint32_t len; + uint64_t ui64_ret; + int iret; + + bl_mem_params = get_bl_mem_params_node(image_id); + if (bl_mem_params == NULL) { + ERROR("BL2: Failed to get loading parameter.\n"); + return 1; + } + + switch (image_id) { + case BL31_IMAGE_ID: + if (is_ddr_backup_mode() == RCAR_COLD_BOOT) { + iret = plat_get_image_source(image_id, &dev_handle, + &image_spec); + if (iret != 0) { + return 1; + } + + ui64_ret = rcar_get_dest_addr_from_cert( + SOC_FW_CONTENT_CERT_ID, &dest, &len); + if (ui64_ret != 0U) { + return 1; + } + + ui64_ret = check_secure_load_area( + BL31_BASE, BL31_LIMIT - BL31_BASE, + dest, len); + if (ui64_ret != 0U) { + return 1; + } + + *boot_kind = RCAR_COLD_BOOT; + flush_dcache_range(BOOT_KIND_BASE, sizeof(*boot_kind)); + + bl_mem_params->image_info.image_base = dest; + bl_mem_params->image_info.image_size = len; + } else { + *boot_kind = RCAR_WARM_BOOT; + flush_dcache_range(BOOT_KIND_BASE, sizeof(*boot_kind)); + + console_flush(); + bl2_plat_flush_bl31_params(); + + /* will not return */ + bl2_enter_bl31(&bl_mem_params->ep_info); + } + + return 0; +#ifndef SPD_NONE + case BL32_IMAGE_ID: + ui64_ret = rcar_get_dest_addr_from_cert( + TRUSTED_OS_FW_CONTENT_CERT_ID, &dest, &len); + if (ui64_ret != 0U) { + return 1; + } + + ui64_ret = check_secure_load_area( + BL32_BASE, BL32_LIMIT - BL32_BASE, dest, len); + if (ui64_ret != 0U) { + return 1; + } + + bl_mem_params->image_info.image_base = dest; + bl_mem_params->image_info.image_size = len; + + return 0; +#endif + case BL33_IMAGE_ID: + /* case of image_id == BL33_IMAGE_ID */ + ui64_ret = rcar_get_dest_addr_from_cert( + NON_TRUSTED_FW_CONTENT_CERT_ID, + &dest, &len); + + if (ui64_ret != 0U) { + return 1; + } + +#if RCAR_GEN3_BL33_GZIP == 1 + image_decompress_prepare(&bl_mem_params->image_info); +#endif + + return 0; + default: + return 1; + } return 0; } @@ -472,8 +587,6 @@ int bl2_plat_handle_post_image_load(unsigned int image_id) { static bl2_to_bl31_params_mem_t *params; bl_mem_params_node_t *bl_mem_params; - uintptr_t dest; - int ret; if (!params) { params = (bl2_to_bl31_params_mem_t *) PARAMS_BASE; @@ -481,25 +594,23 @@ int bl2_plat_handle_post_image_load(unsigned int image_id) } bl_mem_params = get_bl_mem_params_node(image_id); + if (!bl_mem_params) { + ERROR("BL2: Failed to get loading parameter.\n"); + return 1; + } switch (image_id) { case BL31_IMAGE_ID: - ret = rcar_get_dest_addr_from_cert(SOC_FW_CONTENT_CERT_ID, - &dest); - if (!ret) - bl_mem_params->image_info.image_base = dest; - break; + bl_mem_params->ep_info.pc = bl_mem_params->image_info.image_base; + return 0; case BL32_IMAGE_ID: - ret = rcar_get_dest_addr_from_cert(TRUSTED_OS_FW_CONTENT_CERT_ID, - &dest); - if (!ret) - bl_mem_params->image_info.image_base = dest; - + bl_mem_params->ep_info.pc = bl_mem_params->image_info.image_base; memcpy(¶ms->bl32_ep_info, &bl_mem_params->ep_info, sizeof(entry_point_info_t)); - break; + return 0; case BL33_IMAGE_ID: #if RCAR_GEN3_BL33_GZIP == 1 + int ret; if ((mmio_read_32(BL33_COMP_BASE) & 0xffff) == 0x8b1f) { /* decompress gzip-compressed image */ ret = image_decompress(&bl_mem_params->image_info); @@ -514,7 +625,9 @@ int bl2_plat_handle_post_image_load(unsigned int image_id) #endif memcpy(¶ms->bl33_ep_info, &bl_mem_params->ep_info, sizeof(entry_point_info_t)); - break; + return 0; + default: + return 1; } return 0; @@ -1173,6 +1286,11 @@ void bl2_el3_plat_arch_setup(void) #endif } +void bl2_el3_plat_prepare_exit(void) +{ + bl2_ram_security_setting_finish(); +} + void bl2_platform_setup(void) { diff --git a/atf-20231013-0ea67d76a/plat/renesas/rcar/platform.mk b/atf-20240117-bacca82a8/plat/renesas/rcar/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/rcar/platform.mk rename to atf-20240117-bacca82a8/plat/renesas/rcar/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/renesas/rzg/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/renesas/rzg/bl2_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/rzg/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/renesas/rzg/bl2_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/renesas/rzg/platform.mk b/atf-20240117-bacca82a8/plat/renesas/rzg/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/renesas/rzg/platform.mk rename to atf-20240117-bacca82a8/plat/renesas/rzg/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/aarch32/plat_helpers.S b/atf-20240117-bacca82a8/plat/rockchip/common/aarch32/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/aarch32/plat_helpers.S rename to atf-20240117-bacca82a8/plat/rockchip/common/aarch32/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/aarch32/platform_common.c b/atf-20240117-bacca82a8/plat/rockchip/common/aarch32/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/aarch32/platform_common.c rename to atf-20240117-bacca82a8/plat/rockchip/common/aarch32/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/aarch32/pmu_sram_cpus_on.S b/atf-20240117-bacca82a8/plat/rockchip/common/aarch32/pmu_sram_cpus_on.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/aarch32/pmu_sram_cpus_on.S rename to atf-20240117-bacca82a8/plat/rockchip/common/aarch32/pmu_sram_cpus_on.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/rockchip/common/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/rockchip/common/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/aarch64/platform_common.c b/atf-20240117-bacca82a8/plat/rockchip/common/aarch64/platform_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/aarch64/platform_common.c rename to atf-20240117-bacca82a8/plat/rockchip/common/aarch64/platform_common.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/aarch64/pmu_sram_cpus_on.S b/atf-20240117-bacca82a8/plat/rockchip/common/aarch64/pmu_sram_cpus_on.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/aarch64/pmu_sram_cpus_on.S rename to atf-20240117-bacca82a8/plat/rockchip/common/aarch64/pmu_sram_cpus_on.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/bl31_plat_setup.c b/atf-20240117-bacca82a8/plat/rockchip/common/bl31_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/bl31_plat_setup.c rename to atf-20240117-bacca82a8/plat/rockchip/common/bl31_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/drivers/parameter/ddr_parameter.c b/atf-20240117-bacca82a8/plat/rockchip/common/drivers/parameter/ddr_parameter.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/drivers/parameter/ddr_parameter.c rename to atf-20240117-bacca82a8/plat/rockchip/common/drivers/parameter/ddr_parameter.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/drivers/parameter/ddr_parameter.h b/atf-20240117-bacca82a8/plat/rockchip/common/drivers/parameter/ddr_parameter.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/drivers/parameter/ddr_parameter.h rename to atf-20240117-bacca82a8/plat/rockchip/common/drivers/parameter/ddr_parameter.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/drivers/pmu/pmu_com.h b/atf-20240117-bacca82a8/plat/rockchip/common/drivers/pmu/pmu_com.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/drivers/pmu/pmu_com.h rename to atf-20240117-bacca82a8/plat/rockchip/common/drivers/pmu/pmu_com.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/include/plat_macros.S b/atf-20240117-bacca82a8/plat/rockchip/common/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/rockchip/common/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/include/plat_params.h b/atf-20240117-bacca82a8/plat/rockchip/common/include/plat_params.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/include/plat_params.h rename to atf-20240117-bacca82a8/plat/rockchip/common/include/plat_params.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/include/plat_private.h b/atf-20240117-bacca82a8/plat/rockchip/common/include/plat_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/include/plat_private.h rename to atf-20240117-bacca82a8/plat/rockchip/common/include/plat_private.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/include/rockchip_sip_svc.h b/atf-20240117-bacca82a8/plat/rockchip/common/include/rockchip_sip_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/include/rockchip_sip_svc.h rename to atf-20240117-bacca82a8/plat/rockchip/common/include/rockchip_sip_svc.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/params_setup.c b/atf-20240117-bacca82a8/plat/rockchip/common/params_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/params_setup.c rename to atf-20240117-bacca82a8/plat/rockchip/common/params_setup.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/plat_pm.c b/atf-20240117-bacca82a8/plat/rockchip/common/plat_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/plat_pm.c rename to atf-20240117-bacca82a8/plat/rockchip/common/plat_pm.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/plat_topology.c b/atf-20240117-bacca82a8/plat/rockchip/common/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/plat_topology.c rename to atf-20240117-bacca82a8/plat/rockchip/common/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/pmusram/cpus_on_fixed_addr.S b/atf-20240117-bacca82a8/plat/rockchip/common/pmusram/cpus_on_fixed_addr.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/pmusram/cpus_on_fixed_addr.S rename to atf-20240117-bacca82a8/plat/rockchip/common/pmusram/cpus_on_fixed_addr.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/pmusram/cpus_on_fixed_addr.h b/atf-20240117-bacca82a8/plat/rockchip/common/pmusram/cpus_on_fixed_addr.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/pmusram/cpus_on_fixed_addr.h rename to atf-20240117-bacca82a8/plat/rockchip/common/pmusram/cpus_on_fixed_addr.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_gicv2.c b/atf-20240117-bacca82a8/plat/rockchip/common/rockchip_gicv2.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_gicv2.c rename to atf-20240117-bacca82a8/plat/rockchip/common/rockchip_gicv2.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_gicv3.c b/atf-20240117-bacca82a8/plat/rockchip/common/rockchip_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_gicv3.c rename to atf-20240117-bacca82a8/plat/rockchip/common/rockchip_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_sip_svc.c b/atf-20240117-bacca82a8/plat/rockchip/common/rockchip_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_sip_svc.c rename to atf-20240117-bacca82a8/plat/rockchip/common/rockchip_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_stack_protector.c b/atf-20240117-bacca82a8/plat/rockchip/common/rockchip_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/rockchip_stack_protector.c rename to atf-20240117-bacca82a8/plat/rockchip/common/rockchip_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/common/sp_min_plat_setup.c b/atf-20240117-bacca82a8/plat/rockchip/common/sp_min_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/common/sp_min_plat_setup.c rename to atf-20240117-bacca82a8/plat/rockchip/common/sp_min_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/pmu/plat_pmu_macros.S b/atf-20240117-bacca82a8/plat/rockchip/px30/drivers/pmu/plat_pmu_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/pmu/plat_pmu_macros.S rename to atf-20240117-bacca82a8/plat/rockchip/px30/drivers/pmu/plat_pmu_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/pmu/pmu.c b/atf-20240117-bacca82a8/plat/rockchip/px30/drivers/pmu/pmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/pmu/pmu.c rename to atf-20240117-bacca82a8/plat/rockchip/px30/drivers/pmu/pmu.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/pmu/pmu.h b/atf-20240117-bacca82a8/plat/rockchip/px30/drivers/pmu/pmu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/pmu/pmu.h rename to atf-20240117-bacca82a8/plat/rockchip/px30/drivers/pmu/pmu.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/secure/secure.c b/atf-20240117-bacca82a8/plat/rockchip/px30/drivers/secure/secure.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/secure/secure.c rename to atf-20240117-bacca82a8/plat/rockchip/px30/drivers/secure/secure.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/secure/secure.h b/atf-20240117-bacca82a8/plat/rockchip/px30/drivers/secure/secure.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/secure/secure.h rename to atf-20240117-bacca82a8/plat/rockchip/px30/drivers/secure/secure.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/soc/soc.c b/atf-20240117-bacca82a8/plat/rockchip/px30/drivers/soc/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/soc/soc.c rename to atf-20240117-bacca82a8/plat/rockchip/px30/drivers/soc/soc.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/soc/soc.h b/atf-20240117-bacca82a8/plat/rockchip/px30/drivers/soc/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/drivers/soc/soc.h rename to atf-20240117-bacca82a8/plat/rockchip/px30/drivers/soc/soc.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/include/plat.ld.S b/atf-20240117-bacca82a8/plat/rockchip/px30/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/rockchip/px30/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/rockchip/px30/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/rockchip/px30/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/include/platform_def.h b/atf-20240117-bacca82a8/plat/rockchip/px30/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/include/platform_def.h rename to atf-20240117-bacca82a8/plat/rockchip/px30/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/rockchip/px30/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/rockchip/px30/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/platform.mk b/atf-20240117-bacca82a8/plat/rockchip/px30/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/platform.mk rename to atf-20240117-bacca82a8/plat/rockchip/px30/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/rockchip/px30/px30_def.h b/atf-20240117-bacca82a8/plat/rockchip/px30/px30_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/px30/px30_def.h rename to atf-20240117-bacca82a8/plat/rockchip/px30/px30_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/pmu/plat_pmu_macros.S b/atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/pmu/plat_pmu_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/pmu/plat_pmu_macros.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/pmu/plat_pmu_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/pmu/pmu.c b/atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/pmu/pmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/pmu/pmu.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/pmu/pmu.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/pmu/pmu.h b/atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/pmu/pmu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/pmu/pmu.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/pmu/pmu.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/secure/secure.c b/atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/secure/secure.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/secure/secure.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/secure/secure.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/secure/secure.h b/atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/secure/secure.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/secure/secure.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/secure/secure.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/soc/soc.c b/atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/soc/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/soc/soc.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/soc/soc.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/soc/soc.h b/atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/soc/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/drivers/soc/soc.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/drivers/soc/soc.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/rockchip/rk3288/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/plat_sp_min.ld.S b/atf-20240117-bacca82a8/plat/rockchip/rk3288/include/plat_sp_min.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/plat_sp_min.ld.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/include/plat_sp_min.ld.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/platform_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3288/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/platform_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/shared/bl32_param.h b/atf-20240117-bacca82a8/plat/rockchip/rk3288/include/shared/bl32_param.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/include/shared/bl32_param.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/include/shared/bl32_param.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/rockchip/rk3288/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/platform.mk b/atf-20240117-bacca82a8/plat/rockchip/rk3288/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/platform.mk rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/rk3288_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3288/rk3288_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/rk3288_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/rk3288_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3288/sp_min/sp_min-rk3288.mk b/atf-20240117-bacca82a8/plat/rockchip/rk3288/sp_min/sp_min-rk3288.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3288/sp_min/sp_min-rk3288.mk rename to atf-20240117-bacca82a8/plat/rockchip/rk3288/sp_min/sp_min-rk3288.mk diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/pmu/plat_pmu_macros.S b/atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/pmu/plat_pmu_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/pmu/plat_pmu_macros.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/pmu/plat_pmu_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/pmu/pmu.c b/atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/pmu/pmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/pmu/pmu.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/pmu/pmu.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/pmu/pmu.h b/atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/pmu/pmu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/pmu/pmu.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/pmu/pmu.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/soc/soc.c b/atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/soc/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/soc/soc.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/soc/soc.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/soc/soc.h b/atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/soc/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/drivers/soc/soc.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/drivers/soc/soc.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/include/plat.ld.S b/atf-20240117-bacca82a8/plat/rockchip/rk3328/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/include/platform_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3328/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/include/platform_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/platform.mk b/atf-20240117-bacca82a8/plat/rockchip/rk3328/platform.mk similarity index 98% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/platform.mk rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/platform.mk index 5b4766d51..f96e18bb0 100644 --- a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/platform.mk +++ b/atf-20240117-bacca82a8/plat/rockchip/rk3328/platform.mk @@ -65,6 +65,7 @@ include lib/libfdt/libfdt.mk # Enable workarounds for selected Cortex-A53 errata ERRATA_A53_855873 := 1 +ERRATA_A53_1530924 := 1 $(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT)) $(eval $(call add_define,PLAT_SKIP_OPTEE_S_EL1_INT_REGISTER)) diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3328/rk3328_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3328/rk3328_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3328/rk3328_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3328/rk3328_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.c b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.h b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/ddr/ddr_rk3368.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/ddr/rk3368_ddr_reg_resume_V1.05.bin diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/pmu/plat_pmu_macros.S b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/pmu/plat_pmu_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/pmu/plat_pmu_macros.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/pmu/plat_pmu_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/pmu/pmu.c b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/pmu/pmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/pmu/pmu.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/pmu/pmu.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/pmu/pmu.h b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/pmu/pmu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/pmu/pmu.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/pmu/pmu.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/soc/soc.c b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/soc/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/soc/soc.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/soc/soc.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/soc/soc.h b/atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/soc/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/drivers/soc/soc.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/drivers/soc/soc.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/include/plat.ld.S b/atf-20240117-bacca82a8/plat/rockchip/rk3368/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/rockchip/rk3368/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/include/platform_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3368/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/include/platform_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/rockchip/rk3368/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/platform.mk b/atf-20240117-bacca82a8/plat/rockchip/rk3368/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/platform.mk rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3368/rk3368_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3368/rk3368_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3368/rk3368_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3368/rk3368_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dp/cdn_dp.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dp/cdn_dp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dp/cdn_dp.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dp/cdn_dp.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dp/cdn_dp.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dp/cdn_dp.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dp/cdn_dp.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dp/cdn_dp.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dp/hdcp.bin b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dp/hdcp.bin similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dp/hdcp.bin rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dp/hdcp.bin diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dfs.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dfs.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dfs.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dfs.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dfs.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dfs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dfs.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dfs.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/dram_spec_timing.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/suspend.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/suspend.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/suspend.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/suspend.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/suspend.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/dram/suspend.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/dram/suspend.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/gpio/rk3399_gpio.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/gpio/rk3399_gpio.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/gpio/rk3399_gpio.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/gpio/rk3399_gpio.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/Makefile b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/Makefile rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/Makefile diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/include/addressmap.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/include/addressmap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/include/addressmap.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/include/addressmap.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/include/rk3399_mcu.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/dram.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/dram.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/dram.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/dram.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/rk3399m0.ld.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/startup.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/startup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/startup.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/startup.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/stopwatch.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/stopwatch.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/stopwatch.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/stopwatch.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/suspend.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/suspend.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/m0/src/suspend.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/m0/src/suspend.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/m0_ctl.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/m0_ctl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/m0_ctl.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/m0_ctl.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/m0_ctl.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/m0_ctl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/m0_ctl.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/m0_ctl.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/plat_pmu_macros.S b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/plat_pmu_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/plat_pmu_macros.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/plat_pmu_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/pmu.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/pmu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/pmu.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/pmu.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/pmu.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/pmu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/pmu.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/pmu.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/pmu_fw.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/pmu_fw.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pmu/pmu_fw.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pmu/pmu_fw.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pwm/pwm.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pwm/pwm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pwm/pwm.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pwm/pwm.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pwm/pwm.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pwm/pwm.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/pwm/pwm.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/pwm/pwm.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/secure/secure.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/secure/secure.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/secure/secure.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/secure/secure.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/secure/secure.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/secure/secure.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/secure/secure.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/secure/secure.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/soc/soc.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/soc/soc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/soc/soc.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/soc/soc.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/soc/soc.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/soc/soc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/drivers/soc/soc.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/drivers/soc/soc.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/addressmap.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/addressmap.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/addressmap.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/addressmap.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/plat.ld.S b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/plat_sip_calls.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/plat_sip_calls.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/plat_sip_calls.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/plat_sip_calls.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/platform_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/platform_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/addressmap_shared.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/addressmap_shared.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/addressmap_shared.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/addressmap_shared.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/bl31_param.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/bl31_param.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/bl31_param.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/bl31_param.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/dram_regs.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/dram_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/dram_regs.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/dram_regs.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/m0_param.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/m0_param.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/m0_param.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/m0_param.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/misc_regs.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/misc_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/misc_regs.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/misc_regs.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/pmu_bits.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/pmu_bits.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/pmu_bits.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/pmu_bits.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/pmu_regs.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/pmu_regs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/include/shared/pmu_regs.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/include/shared/pmu_regs.h diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/plat_sip_calls.c b/atf-20240117-bacca82a8/plat/rockchip/rk3399/plat_sip_calls.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/plat_sip_calls.c rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/plat_sip_calls.c diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/platform.mk b/atf-20240117-bacca82a8/plat/rockchip/rk3399/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/platform.mk rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/rockchip/rk3399/rk3399_def.h b/atf-20240117-bacca82a8/plat/rockchip/rk3399/rk3399_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rockchip/rk3399/rk3399_def.h rename to atf-20240117-bacca82a8/plat/rockchip/rk3399/rk3399_def.h diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/aarch64/plat_helpers.S b/atf-20240117-bacca82a8/plat/rpi/common/aarch64/plat_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/aarch64/plat_helpers.S rename to atf-20240117-bacca82a8/plat/rpi/common/aarch64/plat_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/include/rpi_shared.h b/atf-20240117-bacca82a8/plat/rpi/common/include/rpi_shared.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/include/rpi_shared.h rename to atf-20240117-bacca82a8/plat/rpi/common/include/rpi_shared.h diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_common.c b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_common.c rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_common.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_image_load.c b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_image_load.c rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_io_storage.c b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_io_storage.c rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_pm.c b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_pm.c rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_pm.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_rotpk.S b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_rotpk.S rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_stack_protector.c b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_stack_protector.c rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_topology.c b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_topology.c rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_topology.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/common/rpi3_trusted_boot.c b/atf-20240117-bacca82a8/plat/rpi/common/rpi3_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/common/rpi3_trusted_boot.c rename to atf-20240117-bacca82a8/plat/rpi/common/rpi3_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/aarch64/rpi3_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/rpi/rpi3/aarch64/rpi3_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/aarch64/rpi3_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/rpi/rpi3/aarch64/rpi3_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/include/plat_macros.S b/atf-20240117-bacca82a8/plat/rpi/rpi3/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/rpi/rpi3/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/include/platform_def.h b/atf-20240117-bacca82a8/plat/rpi/rpi3/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/include/platform_def.h rename to atf-20240117-bacca82a8/plat/rpi/rpi3/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/include/rpi_hw.h b/atf-20240117-bacca82a8/plat/rpi/rpi3/include/rpi_hw.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/include/rpi_hw.h rename to atf-20240117-bacca82a8/plat/rpi/rpi3/include/rpi_hw.h diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/platform.mk b/atf-20240117-bacca82a8/plat/rpi/rpi3/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/platform.mk rename to atf-20240117-bacca82a8/plat/rpi/rpi3/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi3_bl1_setup.c b/atf-20240117-bacca82a8/plat/rpi/rpi3/rpi3_bl1_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi3_bl1_setup.c rename to atf-20240117-bacca82a8/plat/rpi/rpi3/rpi3_bl1_setup.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi3_bl2_setup.c b/atf-20240117-bacca82a8/plat/rpi/rpi3/rpi3_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi3_bl2_setup.c rename to atf-20240117-bacca82a8/plat/rpi/rpi3/rpi3_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi3_bl31_setup.c b/atf-20240117-bacca82a8/plat/rpi/rpi3/rpi3_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi3_bl31_setup.c rename to atf-20240117-bacca82a8/plat/rpi/rpi3/rpi3_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi_mbox_board.c b/atf-20240117-bacca82a8/plat/rpi/rpi3/rpi_mbox_board.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi3/rpi_mbox_board.c rename to atf-20240117-bacca82a8/plat/rpi/rpi3/rpi_mbox_board.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/aarch64/armstub8_header.S b/atf-20240117-bacca82a8/plat/rpi/rpi4/aarch64/armstub8_header.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/aarch64/armstub8_header.S rename to atf-20240117-bacca82a8/plat/rpi/rpi4/aarch64/armstub8_header.S diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/include/plat.ld.S b/atf-20240117-bacca82a8/plat/rpi/rpi4/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/rpi/rpi4/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/include/plat_macros.S b/atf-20240117-bacca82a8/plat/rpi/rpi4/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/rpi/rpi4/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/include/platform_def.h b/atf-20240117-bacca82a8/plat/rpi/rpi4/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/include/platform_def.h rename to atf-20240117-bacca82a8/plat/rpi/rpi4/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/include/rpi_hw.h b/atf-20240117-bacca82a8/plat/rpi/rpi4/include/rpi_hw.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/include/rpi_hw.h rename to atf-20240117-bacca82a8/plat/rpi/rpi4/include/rpi_hw.h diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/platform.mk b/atf-20240117-bacca82a8/plat/rpi/rpi4/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/platform.mk rename to atf-20240117-bacca82a8/plat/rpi/rpi4/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/rpi4_bl31_setup.c b/atf-20240117-bacca82a8/plat/rpi/rpi4/rpi4_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/rpi4_bl31_setup.c rename to atf-20240117-bacca82a8/plat/rpi/rpi4/rpi4_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/rpi/rpi4/rpi4_pci_svc.c b/atf-20240117-bacca82a8/plat/rpi/rpi4/rpi4_pci_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/rpi/rpi4/rpi4_pci_svc.c rename to atf-20240117-bacca82a8/plat/rpi/rpi4/rpi4_pci_svc.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/mhu/sq_mhu.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/mhu/sq_mhu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/mhu/sq_mhu.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/mhu/sq_mhu.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/mhu/sq_mhu.h b/atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/mhu/sq_mhu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/mhu/sq_mhu.h rename to atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/mhu/sq_mhu.h diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scp/sq_scmi.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scp/sq_scmi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scp/sq_scmi.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scp/sq_scmi.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scp/sq_scp.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scp/sq_scp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scp/sq_scp.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scp/sq_scp.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scpi/sq_scpi.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scpi/sq_scpi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scpi/sq_scpi.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scpi/sq_scpi.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scpi/sq_scpi.h b/atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scpi/sq_scpi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/drivers/scpi/sq_scpi.h rename to atf-20240117-bacca82a8/plat/socionext/synquacer/drivers/scpi/sq_scpi.h diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/include/plat.ld.S b/atf-20240117-bacca82a8/plat/socionext/synquacer/include/plat.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/include/plat.ld.S rename to atf-20240117-bacca82a8/plat/socionext/synquacer/include/plat.ld.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/include/plat_macros.S b/atf-20240117-bacca82a8/plat/socionext/synquacer/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/socionext/synquacer/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/include/platform_def.h b/atf-20240117-bacca82a8/plat/socionext/synquacer/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/include/platform_def.h rename to atf-20240117-bacca82a8/plat/socionext/synquacer/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/include/sq_common.h b/atf-20240117-bacca82a8/plat/socionext/synquacer/include/sq_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/include/sq_common.h rename to atf-20240117-bacca82a8/plat/socionext/synquacer/include/sq_common.h diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/platform.mk b/atf-20240117-bacca82a8/plat/socionext/synquacer/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/platform.mk rename to atf-20240117-bacca82a8/plat/socionext/synquacer/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_bl2_setup.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_bl2_setup.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_bl31_setup.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_bl31_setup.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_ccn.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_ccn.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_ccn.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_ccn.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_gicv3.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_gicv3.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_helpers.S b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_helpers.S rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_image_desc.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_image_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_image_desc.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_image_desc.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_io_storage.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_io_storage.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_psci.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_psci.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_psci.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_rotpk.S b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_rotpk.S rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_spm.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_spm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_spm.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_spm.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_tbbr.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_tbbr.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_topology.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_topology.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_topology.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_xlat_setup.c b/atf-20240117-bacca82a8/plat/socionext/synquacer/sq_xlat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/synquacer/sq_xlat_setup.c rename to atf-20240117-bacca82a8/plat/socionext/synquacer/sq_xlat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/include/plat_macros.S b/atf-20240117-bacca82a8/plat/socionext/uniphier/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/socionext/uniphier/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/include/platform_def.h b/atf-20240117-bacca82a8/plat/socionext/uniphier/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/include/platform_def.h rename to atf-20240117-bacca82a8/plat/socionext/uniphier/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/platform.mk b/atf-20240117-bacca82a8/plat/socionext/uniphier/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/platform.mk rename to atf-20240117-bacca82a8/plat/socionext/uniphier/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/tsp/tsp-uniphier.mk b/atf-20240117-bacca82a8/plat/socionext/uniphier/tsp/tsp-uniphier.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/tsp/tsp-uniphier.mk rename to atf-20240117-bacca82a8/plat/socionext/uniphier/tsp/tsp-uniphier.mk diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/tsp/uniphier_tsp_setup.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/tsp/uniphier_tsp_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/tsp/uniphier_tsp_setup.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/tsp/uniphier_tsp_setup.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier.h b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier.h rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier.h diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_bl2_setup.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_bl2_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_bl2_setup.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_bl2_setup.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_bl31_setup.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_bl31_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_bl31_setup.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_bl31_setup.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_boot_device.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_boot_device.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_boot_device.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_boot_device.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_cci.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_cci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_cci.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_cci.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_console.S b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_console.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_console.S rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_console.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_console.h b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_console.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_console.h rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_console.h diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_console_setup.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_console_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_console_setup.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_console_setup.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_emmc.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_emmc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_emmc.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_emmc.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_gicv3.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_gicv3.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_helpers.S b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_helpers.S rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_image_desc.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_image_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_image_desc.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_image_desc.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_io_storage.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_io_storage.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_nand.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_nand.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_nand.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_nand.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_psci.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_psci.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_psci.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_rotpk.S b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_rotpk.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_rotpk.S rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_rotpk.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_scp.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_scp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_scp.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_scp.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_smp.S b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_smp.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_smp.S rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_smp.S diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_soc_info.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_soc_info.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_soc_info.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_soc_info.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_syscnt.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_syscnt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_syscnt.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_syscnt.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_tbbr.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_tbbr.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_tbbr.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_tbbr.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_topology.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_topology.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_topology.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_usb.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_usb.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_usb.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_usb.c diff --git a/atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_xlat_setup.c b/atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_xlat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/socionext/uniphier/uniphier_xlat_setup.c rename to atf-20240117-bacca82a8/plat/socionext/uniphier/uniphier_xlat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/bl2_io_storage.c b/atf-20240117-bacca82a8/plat/st/common/bl2_io_storage.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/bl2_io_storage.c rename to atf-20240117-bacca82a8/plat/st/common/bl2_io_storage.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/common.mk b/atf-20240117-bacca82a8/plat/st/common/common.mk similarity index 99% rename from atf-20231013-0ea67d76a/plat/st/common/common.mk rename to atf-20240117-bacca82a8/plat/st/common/common.mk index d10f185e8..7f93961d8 100644 --- a/atf-20231013-0ea67d76a/plat/st/common/common.mk +++ b/atf-20240117-bacca82a8/plat/st/common/common.mk @@ -165,7 +165,6 @@ AUTH_SOURCES := drivers/auth/auth_mod.c \ ifeq (${GENERATE_COT},1) TFW_NVCTR_VAL := 0 NTFW_NVCTR_VAL := 0 -KEY_SIZE := KEY_ALG := ecdsa HASH_ALG := sha256 @@ -178,6 +177,7 @@ endif endif TF_MBEDTLS_KEY_ALG := ecdsa +KEY_SIZE := 256 ifneq (${MBEDTLS_DIR},) MBEDTLS_MAJOR=$(shell grep -hP "define MBEDTLS_VERSION_MAJOR" \ diff --git a/atf-20231013-0ea67d76a/plat/st/common/common_rules.mk b/atf-20240117-bacca82a8/plat/st/common/common_rules.mk similarity index 88% rename from atf-20231013-0ea67d76a/plat/st/common/common_rules.mk rename to atf-20240117-bacca82a8/plat/st/common/common_rules.mk index fa48dfcff..f39caab82 100644 --- a/atf-20231013-0ea67d76a/plat/st/common/common_rules.mk +++ b/atf-20240117-bacca82a8/plat/st/common/common_rules.mk @@ -57,7 +57,11 @@ $(eval $(call MAKE_LD,${STM32_TF_LINKERFILE},$(STM32_LD_FILE),bl2)) tf-a-%.elf: $(PLAT)-%.o ${STM32_TF_LINKERFILE} @echo " LDS $<" +ifneq ($(findstring gcc,$(notdir $(LD))),) + ${Q}${LD} -o $@ $(subst --,-Wl$(comma)--,${STM32_TF_ELF_LDFLAGS}) -nostartfiles -Wl,-Map=$(@:.elf=.map) -Wl,-dT ${STM32_TF_LINKERFILE} $< +else ${Q}${LD} -o $@ ${STM32_TF_ELF_LDFLAGS} -Map=$(@:.elf=.map) --script ${STM32_TF_LINKERFILE} $< +endif tf-a-%.bin: tf-a-%.elf ${Q}${OC} -O binary $< $@ @@ -68,7 +72,7 @@ tf-a-%.bin: tf-a-%.elf tf-a-%.stm32: tf-a-%.bin ${STM32_DEPS} @echo @echo "Generate $@" - $(eval LOADADDR = $(shell cat $(@:.stm32=.map) | grep RAM | awk '{print $$2}')) + $(eval LOADADDR = $(shell cat $(@:.stm32=.map) | grep '^RAM' | awk '{print $$2}')) $(eval ENTRY = $(shell cat $(@:.stm32=.map) | grep "__BL2_IMAGE_START" | awk '{print $$1}')) ${Q}${STM32IMAGE} -s $< -d $@ \ -l $(LOADADDR) -e ${ENTRY} \ diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32cubeprogrammer.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32cubeprogrammer.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32cubeprogrammer.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32cubeprogrammer.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_common.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_common.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_common.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_dt.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_dt.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_dt.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_dt.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_efi.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_efi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_efi.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_efi.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_fconf_getter.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_fconf_getter.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_fconf_getter.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_fconf_getter.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_io_storage.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_io_storage.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_io_storage.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_io_storage.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_mbedtls_config-2.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_mbedtls_config-2.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_mbedtls_config-2.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_mbedtls_config-2.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_mbedtls_config-3.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_mbedtls_config-3.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_mbedtls_config-3.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_mbedtls_config-3.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_shared_resources.h b/atf-20240117-bacca82a8/plat/st/common/include/stm32mp_shared_resources.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/stm32mp_shared_resources.h rename to atf-20240117-bacca82a8/plat/st/common/include/stm32mp_shared_resources.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/include/usb_dfu.h b/atf-20240117-bacca82a8/plat/st/common/include/usb_dfu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/include/usb_dfu.h rename to atf-20240117-bacca82a8/plat/st/common/include/usb_dfu.h diff --git a/atf-20231013-0ea67d76a/plat/st/common/plat_image_load.c b/atf-20240117-bacca82a8/plat/st/common/plat_image_load.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/plat_image_load.c rename to atf-20240117-bacca82a8/plat/st/common/plat_image_load.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32cubeprogrammer_uart.c b/atf-20240117-bacca82a8/plat/st/common/stm32cubeprogrammer_uart.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32cubeprogrammer_uart.c rename to atf-20240117-bacca82a8/plat/st/common/stm32cubeprogrammer_uart.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32cubeprogrammer_usb.c b/atf-20240117-bacca82a8/plat/st/common/stm32cubeprogrammer_usb.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32cubeprogrammer_usb.c rename to atf-20240117-bacca82a8/plat/st/common/stm32cubeprogrammer_usb.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32mp_common.c b/atf-20240117-bacca82a8/plat/st/common/stm32mp_common.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32mp_common.c rename to atf-20240117-bacca82a8/plat/st/common/stm32mp_common.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32mp_crypto_lib.c b/atf-20240117-bacca82a8/plat/st/common/stm32mp_crypto_lib.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32mp_crypto_lib.c rename to atf-20240117-bacca82a8/plat/st/common/stm32mp_crypto_lib.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32mp_dt.c b/atf-20240117-bacca82a8/plat/st/common/stm32mp_dt.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32mp_dt.c rename to atf-20240117-bacca82a8/plat/st/common/stm32mp_dt.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32mp_fconf_io.c b/atf-20240117-bacca82a8/plat/st/common/stm32mp_fconf_io.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32mp_fconf_io.c rename to atf-20240117-bacca82a8/plat/st/common/stm32mp_fconf_io.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32mp_gic.c b/atf-20240117-bacca82a8/plat/st/common/stm32mp_gic.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32mp_gic.c rename to atf-20240117-bacca82a8/plat/st/common/stm32mp_gic.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/stm32mp_trusted_boot.c b/atf-20240117-bacca82a8/plat/st/common/stm32mp_trusted_boot.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/stm32mp_trusted_boot.c rename to atf-20240117-bacca82a8/plat/st/common/stm32mp_trusted_boot.c diff --git a/atf-20231013-0ea67d76a/plat/st/common/usb_dfu.c b/atf-20240117-bacca82a8/plat/st/common/usb_dfu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/common/usb_dfu.c rename to atf-20240117-bacca82a8/plat/st/common/usb_dfu.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/bl2_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/bl2_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/cert_create_tbbr.mk b/atf-20240117-bacca82a8/plat/st/stm32mp1/cert_create_tbbr.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/cert_create_tbbr.mk rename to atf-20240117-bacca82a8/plat/st/stm32mp1/cert_create_tbbr.mk diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/boot_api.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/boot_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/boot_api.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/boot_api.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/plat_def_fip_uuid.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/plat_def_fip_uuid.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/plat_def_fip_uuid.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/plat_def_fip_uuid.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/plat_tbbr_img_def.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/plat_tbbr_img_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/plat_tbbr_img_def.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/plat_tbbr_img_def.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/platform_def.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/platform_def.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_dbgmcu.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_dbgmcu.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_dbgmcu.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_dbgmcu.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_private.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_private.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_private.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_private.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_shared_resources.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_shared_resources.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_shared_resources.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_shared_resources.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_smc.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_smc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/stm32mp1_smc.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/stm32mp1_smc.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/include/tbbr/stm32mp1_tbb_cert.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/include/tbbr/stm32mp1_tbb_cert.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/include/tbbr/stm32mp1_tbb_cert.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/include/tbbr/stm32mp1_tbb_cert.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/plat_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/plat_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/plat_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/plat_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/platform.mk b/atf-20240117-bacca82a8/plat/st/stm32mp1/platform.mk similarity index 99% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/platform.mk rename to atf-20240117-bacca82a8/plat/st/stm32mp1/platform.mk index 194672ee5..ddc528925 100644 --- a/atf-20231013-0ea67d76a/plat/st/stm32mp1/platform.mk +++ b/atf-20240117-bacca82a8/plat/st/stm32mp1/platform.mk @@ -62,7 +62,7 @@ STM32_HEADER_VERSION_MAJOR:= 1 STM32_HEADER_VERSION_MINOR:= 0 # Add OP-TEE reserved shared memory area in mapping -STM32MP15_OPTEE_RSV_SHM := 1 +STM32MP15_OPTEE_RSV_SHM := 0 $(eval $(call add_defines,STM32MP15_OPTEE_RSV_SHM)) STM32MP_CRYPTO_ROM_LIB := 1 diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/services/bsec_svc.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/services/bsec_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/services/bsec_svc.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/services/bsec_svc.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/services/bsec_svc.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/services/bsec_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/services/bsec_svc.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/services/bsec_svc.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/services/stm32mp1_svc_setup.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/services/stm32mp1_svc_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/services/stm32mp1_svc_setup.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/services/stm32mp1_svc_setup.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk b/atf-20240117-bacca82a8/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk rename to atf-20240117-bacca82a8/plat/st/stm32mp1/sp_min/sp_min-stm32mp1.mk diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/sp_min/sp_min_setup.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/sp_min/sp_min_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/sp_min/sp_min_setup.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/sp_min/sp_min_setup.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1.S b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1.S rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1.S diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1.ld.S b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1.ld.S rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1.ld.S diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_boot_device.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_boot_device.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_boot_device.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_boot_device.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_dbgmcu.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_dbgmcu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_dbgmcu.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_dbgmcu.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_def.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_def.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_def.h index 0fa6c73c9..6530957c3 100644 --- a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_def.h +++ b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_def.h @@ -427,7 +427,7 @@ enum ddr_type { /* OTP labels */ #define CFG0_OTP "cfg0_otp" -#define PART_NUMBER_OTP "part_number_otp" +#define PART_NUMBER_OTP "part-number-otp" #if STM32MP15 #define PACKAGE_OTP "package_otp" #endif diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_fconf_firewall.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_fconf_firewall.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_fconf_firewall.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_fconf_firewall.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_fip_def.h b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_fip_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_fip_def.h rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_fip_def.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_helper.S b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_helper.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_helper.S rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_helper.S diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_pm.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_pm.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_pm.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_private.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_private.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_private.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_private.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_scmi.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_scmi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_scmi.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_scmi.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_shared_resources.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_shared_resources.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_shared_resources.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_shared_resources.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_stack_protector.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_stack_protector.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_stack_protector.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_stack_protector.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_syscfg.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_syscfg.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_syscfg.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_syscfg.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_tbb_cert.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_tbb_cert.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_tbb_cert.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_tbb_cert.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_topology.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_topology.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_topology.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_usb_dfu.c b/atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_usb_dfu.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp1/stm32mp1_usb_dfu.c rename to atf-20240117-bacca82a8/plat/st/stm32mp1/stm32mp1_usb_dfu.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/aarch64/stm32mp2.S b/atf-20240117-bacca82a8/plat/st/stm32mp2/aarch64/stm32mp2.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/aarch64/stm32mp2.S rename to atf-20240117-bacca82a8/plat/st/stm32mp2/aarch64/stm32mp2.S diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/aarch64/stm32mp2.ld.S b/atf-20240117-bacca82a8/plat/st/stm32mp2/aarch64/stm32mp2.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/aarch64/stm32mp2.ld.S rename to atf-20240117-bacca82a8/plat/st/stm32mp2/aarch64/stm32mp2.ld.S diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/aarch64/stm32mp2_helper.S b/atf-20240117-bacca82a8/plat/st/stm32mp2/aarch64/stm32mp2_helper.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/aarch64/stm32mp2_helper.S rename to atf-20240117-bacca82a8/plat/st/stm32mp2/aarch64/stm32mp2_helper.S diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/bl2_plat_setup.c b/atf-20240117-bacca82a8/plat/st/stm32mp2/bl2_plat_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/bl2_plat_setup.c rename to atf-20240117-bacca82a8/plat/st/stm32mp2/bl2_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/include/boot_api.h b/atf-20240117-bacca82a8/plat/st/stm32mp2/include/boot_api.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/include/boot_api.h rename to atf-20240117-bacca82a8/plat/st/stm32mp2/include/boot_api.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/include/plat_macros.S b/atf-20240117-bacca82a8/plat/st/stm32mp2/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/st/stm32mp2/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/include/platform_def.h b/atf-20240117-bacca82a8/plat/st/stm32mp2/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/include/platform_def.h rename to atf-20240117-bacca82a8/plat/st/stm32mp2/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/plat_bl2_mem_params_desc.c b/atf-20240117-bacca82a8/plat/st/stm32mp2/plat_bl2_mem_params_desc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/plat_bl2_mem_params_desc.c rename to atf-20240117-bacca82a8/plat/st/stm32mp2/plat_bl2_mem_params_desc.c diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/platform.mk b/atf-20240117-bacca82a8/plat/st/stm32mp2/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/platform.mk rename to atf-20240117-bacca82a8/plat/st/stm32mp2/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/st/stm32mp2/stm32mp2_def.h b/atf-20240117-bacca82a8/plat/st/stm32mp2/stm32mp2_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/st/stm32mp2/stm32mp2_def.h rename to atf-20240117-bacca82a8/plat/st/stm32mp2/stm32mp2_def.h diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/board/generic/board.mk b/atf-20240117-bacca82a8/plat/ti/k3/board/generic/board.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/board/generic/board.mk rename to atf-20240117-bacca82a8/plat/ti/k3/board/generic/board.mk diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/board/generic/include/board_def.h b/atf-20240117-bacca82a8/plat/ti/k3/board/generic/include/board_def.h similarity index 87% rename from atf-20231013-0ea67d76a/plat/ti/k3/board/generic/include/board_def.h rename to atf-20240117-bacca82a8/plat/ti/k3/board/generic/include/board_def.h index edfa73fda..ade6d7a72 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/board/generic/include/board_def.h +++ b/atf-20240117-bacca82a8/plat/ti/k3/board/generic/include/board_def.h @@ -12,8 +12,8 @@ /* The ports must be in order and contiguous */ #define K3_CLUSTER0_CORE_COUNT U(2) #define K3_CLUSTER1_CORE_COUNT U(2) -#define K3_CLUSTER2_CORE_COUNT U(2) -#define K3_CLUSTER3_CORE_COUNT U(2) +#define K3_CLUSTER2_CORE_COUNT U(0) +#define K3_CLUSTER3_CORE_COUNT U(0) #define PLAT_PROC_START_ID U(32) #define PLAT_PROC_DEVICE_START_ID U(202) diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/board/j784s4/board.mk b/atf-20240117-bacca82a8/plat/ti/k3/board/j784s4/board.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/board/j784s4/board.mk rename to atf-20240117-bacca82a8/plat/ti/k3/board/j784s4/board.mk diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/board/j784s4/include/board_def.h b/atf-20240117-bacca82a8/plat/ti/k3/board/j784s4/include/board_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/board/j784s4/include/board_def.h rename to atf-20240117-bacca82a8/plat/ti/k3/board/j784s4/include/board_def.h diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/board/lite/board.mk b/atf-20240117-bacca82a8/plat/ti/k3/board/lite/board.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/board/lite/board.mk rename to atf-20240117-bacca82a8/plat/ti/k3/board/lite/board.mk diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/board/lite/include/board_def.h b/atf-20240117-bacca82a8/plat/ti/k3/board/lite/include/board_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/board/lite/include/board_def.h rename to atf-20240117-bacca82a8/plat/ti/k3/board/lite/include/board_def.h diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.c b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.c rename to atf-20240117-bacca82a8/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.c diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.h b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.h rename to atf-20240117-bacca82a8/plat/ti/k3/common/drivers/sec_proxy/sec_proxy.h diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci.c b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci.c rename to atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci.c index 495f0c7e4..d04d80596 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci.c +++ b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci.c @@ -155,14 +155,14 @@ static int ti_sci_do_xfer(struct ti_sci_xfer *xfer) ret = k3_sec_proxy_clear_rx_thread(SP_RESPONSE); if (ret) { ERROR("Could not clear response queue (%d)\n", ret); - return ret; + goto unlock; } /* Send the message */ ret = k3_sec_proxy_send(SP_HIGH_PRIORITY, tx_msg); if (ret) { ERROR("Message sending failed (%d)\n", ret); - return ret; + goto unlock; } /* Get the response if requested */ @@ -170,13 +170,14 @@ static int ti_sci_do_xfer(struct ti_sci_xfer *xfer) ret = ti_sci_get_response(rx_msg, SP_RESPONSE); if (ret != 0U) { ERROR("Failed to get response (%d)\n", ret); - return ret; + goto unlock; } } +unlock: bakery_lock_release(&ti_sci_xfer_lock); - return 0; + return ret; } /** @@ -210,6 +211,42 @@ int ti_sci_get_revision(struct ti_sci_msg_resp_version *rev_info) return 0; } +/** + * ti_sci_query_fw_caps() - Get the FW/SoC capabilities + * @handle: Pointer to TI SCI handle + * @fw_caps: Each bit in fw_caps indicating one FW/SOC capability + * + * Return: 0 if all went well, else returns appropriate error value. + */ +int ti_sci_query_fw_caps(uint64_t *fw_caps) +{ + struct ti_sci_msg_hdr req; + struct ti_sci_msg_resp_query_fw_caps resp; + + struct ti_sci_xfer xfer; + int ret; + + ret = ti_sci_setup_one_xfer(TI_SCI_MSG_QUERY_FW_CAPS, 0, + &req, sizeof(req), + &resp, sizeof(resp), + &xfer); + if (ret != 0U) { + ERROR("Message alloc failed (%d)\n", ret); + return ret; + } + + ret = ti_sci_do_xfer(&xfer); + if (ret != 0U) { + ERROR("Transfer send failed (%d)\n", ret); + return ret; + } + + if (fw_caps) + *fw_caps = resp.fw_caps; + + return 0; +} + /** * ti_sci_device_set_state() - Set device state * diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci.h b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci.h similarity index 98% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci.h rename to atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci.h index 06944a74b..c702a711f 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci.h +++ b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci.h @@ -141,10 +141,13 @@ int ti_sci_clock_get_freq(uint32_t dev_id, uint8_t clk_id, uint64_t *freq); * Core control operations * * - ti_sci_core_reboot() - Command to request system reset + * - ti_sci_query_fw_caps() - Get the FW/SoC capabilities + * @fw_caps: Each bit in fw_caps indicating one FW/SOC capability * * Return: 0 if all went well, else returns appropriate error value. */ int ti_sci_core_reboot(void); +int ti_sci_query_fw_caps(uint64_t *fw_caps); /** * Processor control operations diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h similarity index 96% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h rename to atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h index 36909f57d..7f1c3683a 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h +++ b/atf-20240117-bacca82a8/plat/ti/k3/common/drivers/ti_sci/ti_sci_protocol.h @@ -22,6 +22,7 @@ #define TI_SCI_MSG_WAKE_REASON 0x0003 #define TI_SCI_MSG_GOODBYE 0x0004 #define TI_SCI_MSG_SYS_RESET 0x0005 +#define TI_SCI_MSG_QUERY_FW_CAPS 0x0022 /* Device requests */ #define TI_SCI_MSG_SET_DEVICE_STATE 0x0200 @@ -123,6 +124,30 @@ struct ti_sci_msg_req_reboot { uint8_t domain; } __packed; +/** + * struct ti_sci_msg_resp_query_fw_caps - Response for query firmware caps + * @hdr: Generic header + * @fw_caps: Each bit in fw_caps indicating one FW/SOC capability + * MSG_FLAG_CAPS_GENERIC: Generic capability (LPM not supported) + * MSG_FLAG_CAPS_LPM_DEEP_SLEEP: Deep Sleep LPM + * MSG_FLAG_CAPS_LPM_MCU_ONLY: MCU only LPM + * MSG_FLAG_CAPS_LPM_STANDBY: Standby LPM + * MSG_FLAG_CAPS_LPM_PARTIAL_IO: Partial IO in LPM + * + * Response to a generic message with message type TI_SCI_MSG_QUERY_FW_CAPS + * providing currently available SOC/firmware capabilities. SoC that don't + * support low power modes return only MSG_FLAG_CAPS_GENERIC capability. + */ +struct ti_sci_msg_resp_query_fw_caps { + struct ti_sci_msg_hdr hdr; +#define MSG_FLAG_CAPS_GENERIC TI_SCI_MSG_FLAG(0) +#define MSG_FLAG_CAPS_LPM_DEEP_SLEEP TI_SCI_MSG_FLAG(1) +#define MSG_FLAG_CAPS_LPM_MCU_ONLY TI_SCI_MSG_FLAG(2) +#define MSG_FLAG_CAPS_LPM_STANDBY TI_SCI_MSG_FLAG(3) +#define MSG_FLAG_CAPS_LPM_PARTIAL_IO TI_SCI_MSG_FLAG(4) + uint64_t fw_caps; +} __packed; + /** * struct ti_sci_msg_req_set_device_state - Set the desired state of the device * @hdr: Generic header diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_bl31_setup.c b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_bl31_setup.c similarity index 87% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/k3_bl31_setup.c rename to atf-20240117-bacca82a8/plat/ti/k3/common/k3_bl31_setup.c index bbfb5bbfc..c5f60feea 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_bl31_setup.c +++ b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_bl31_setup.c @@ -20,14 +20,20 @@ #include #include +#define ADDR_DOWN(_adr) (_adr & XLAT_ADDR_MASK(2U)) +#define SIZE_UP(_adr, _sz) (round_up((_adr + _sz), XLAT_BLOCK_SIZE(2U)) - ADDR_DOWN(_adr)) + +#define K3_MAP_REGION_FLAT(_adr, _sz, _attr) \ + MAP_REGION_FLAT(ADDR_DOWN(_adr), SIZE_UP(_adr, _sz), _attr) + /* Table of regions to map using the MMU */ const mmap_region_t plat_k3_mmap[] = { - MAP_REGION_FLAT(K3_USART_BASE, K3_USART_SIZE, MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(K3_GIC_BASE, K3_GIC_SIZE, MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(K3_GTC_BASE, K3_GTC_SIZE, MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(SEC_PROXY_RT_BASE, SEC_PROXY_RT_SIZE, MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(SEC_PROXY_SCFG_BASE, SEC_PROXY_SCFG_SIZE, MT_DEVICE | MT_RW | MT_SECURE), - MAP_REGION_FLAT(SEC_PROXY_DATA_BASE, SEC_PROXY_DATA_SIZE, MT_DEVICE | MT_RW | MT_SECURE), + K3_MAP_REGION_FLAT(K3_USART_BASE, K3_USART_SIZE, MT_DEVICE | MT_RW | MT_SECURE), + K3_MAP_REGION_FLAT(K3_GIC_BASE, K3_GIC_SIZE, MT_DEVICE | MT_RW | MT_SECURE), + K3_MAP_REGION_FLAT(K3_GTC_BASE, K3_GTC_SIZE, MT_DEVICE | MT_RW | MT_SECURE), + K3_MAP_REGION_FLAT(SEC_PROXY_RT_BASE, SEC_PROXY_RT_SIZE, MT_DEVICE | MT_RW | MT_SECURE), + K3_MAP_REGION_FLAT(SEC_PROXY_SCFG_BASE, SEC_PROXY_SCFG_SIZE, MT_DEVICE | MT_RW | MT_SECURE), + K3_MAP_REGION_FLAT(SEC_PROXY_DATA_BASE, SEC_PROXY_DATA_SIZE, MT_DEVICE | MT_RW | MT_SECURE), { /* sentinel */ } }; diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_console.c b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_console.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/k3_console.c rename to atf-20240117-bacca82a8/plat/ti/k3/common/k3_console.c diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_gicv3.c b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_gicv3.c similarity index 97% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/k3_gicv3.c rename to atf-20240117-bacca82a8/plat/ti/k3/common/k3_gicv3.c index 019982261..eda943033 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_gicv3.c +++ b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_gicv3.c @@ -19,10 +19,8 @@ /* The GICv3 driver only needs to be initialized in EL3 */ uintptr_t rdistif_base_addrs[PLATFORM_CORE_COUNT]; -#if K3_PM_SYSTEM_SUSPEND static gicv3_redist_ctx_t rdist_ctx[PLATFORM_CORE_COUNT]; static gicv3_dist_ctx_t dist_ctx; -#endif static const interrupt_prop_t k3_interrupt_props[] = { PLAT_ARM_G1S_IRQ_PROPS(INTR_GROUP1S), @@ -94,7 +92,6 @@ void k3_gic_pcpu_init(void) gicv3_rdistif_init(plat_my_core_pos()); } -#if K3_PM_SYSTEM_SUSPEND void k3_gic_save_context(void) { for (unsigned int i = 0U; i < PLATFORM_CORE_COUNT; i++) { @@ -110,4 +107,3 @@ void k3_gic_restore_context(void) gicv3_rdistif_init_restore(i, &rdist_ctx[i]); } } -#endif diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_helpers.S b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/k3_helpers.S rename to atf-20240117-bacca82a8/plat/ti/k3/common/k3_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_psci.c b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_psci.c similarity index 92% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/k3_psci.c rename to atf-20240117-bacca82a8/plat/ti/k3/common/k3_psci.c index d84649567..e8d73dbd5 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_psci.c +++ b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_psci.c @@ -234,7 +234,6 @@ static int k3_validate_power_state(unsigned int power_state, return PSCI_E_SUCCESS; } -#if K3_PM_SYSTEM_SUSPEND static void k3_pwr_domain_suspend(const psci_power_state_t *target_state) { unsigned int core, proc_id; @@ -266,18 +265,15 @@ static void k3_get_sys_suspend_power_state(psci_power_state_t *req_state) req_state->pwr_domain_state[i] = PLAT_MAX_OFF_STATE; } } -#endif -static const plat_psci_ops_t k3_plat_psci_ops = { +static plat_psci_ops_t k3_plat_psci_ops = { .cpu_standby = k3_cpu_standby, .pwr_domain_on = k3_pwr_domain_on, .pwr_domain_off = k3_pwr_domain_off, .pwr_domain_on_finish = k3_pwr_domain_on_finish, -#if K3_PM_SYSTEM_SUSPEND .pwr_domain_suspend = k3_pwr_domain_suspend, .pwr_domain_suspend_finish = k3_pwr_domain_suspend_finish, .get_sys_suspend_power_state = k3_get_sys_suspend_power_state, -#endif .system_off = k3_system_off, .system_reset = k3_system_reset, .validate_power_state = k3_validate_power_state, @@ -286,8 +282,27 @@ static const plat_psci_ops_t k3_plat_psci_ops = { int plat_setup_psci_ops(uintptr_t sec_entrypoint, const plat_psci_ops_t **psci_ops) { + uint64_t fw_caps = 0; + int ret; + k3_sec_entrypoint = sec_entrypoint; + ret = ti_sci_query_fw_caps(&fw_caps); + if (ret) { + ERROR("Unable to query firmware capabilities (%d)\n", ret); + } + + /* If firmware does not support any known suspend mode */ + if (!(fw_caps & (MSG_FLAG_CAPS_LPM_DEEP_SLEEP | + MSG_FLAG_CAPS_LPM_MCU_ONLY | + MSG_FLAG_CAPS_LPM_STANDBY | + MSG_FLAG_CAPS_LPM_PARTIAL_IO))) { + /* Disable PSCI suspend support */ + k3_plat_psci_ops.pwr_domain_suspend = NULL; + k3_plat_psci_ops.pwr_domain_suspend_finish = NULL; + k3_plat_psci_ops.get_sys_suspend_power_state = NULL; + } + *psci_ops = &k3_plat_psci_ops; return 0; diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/k3_topology.c b/atf-20240117-bacca82a8/plat/ti/k3/common/k3_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/k3_topology.c rename to atf-20240117-bacca82a8/plat/ti/k3/common/k3_topology.c diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/common/plat_common.mk b/atf-20240117-bacca82a8/plat/ti/k3/common/plat_common.mk similarity index 95% rename from atf-20231013-0ea67d76a/plat/ti/k3/common/plat_common.mk rename to atf-20240117-bacca82a8/plat/ti/k3/common/plat_common.mk index fb633a832..23efa3194 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/common/plat_common.mk +++ b/atf-20240117-bacca82a8/plat/ti/k3/common/plat_common.mk @@ -44,10 +44,6 @@ $(eval $(call add_define,K3_USART)) K3_USART_BAUD := 115200 $(eval $(call add_define,K3_USART_BAUD)) -# Enable system suspend modes -K3_PM_SYSTEM_SUSPEND := 0 -$(eval $(call add_define,K3_PM_SYSTEM_SUSPEND)) - # Libraries include lib/xlat_tables_v2/xlat_tables.mk diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/include/k3_console.h b/atf-20240117-bacca82a8/plat/ti/k3/include/k3_console.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/include/k3_console.h rename to atf-20240117-bacca82a8/plat/ti/k3/include/k3_console.h diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/include/k3_gicv3.h b/atf-20240117-bacca82a8/plat/ti/k3/include/k3_gicv3.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/include/k3_gicv3.h rename to atf-20240117-bacca82a8/plat/ti/k3/include/k3_gicv3.h diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/include/plat_macros.S b/atf-20240117-bacca82a8/plat/ti/k3/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/ti/k3/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/include/platform_def.h b/atf-20240117-bacca82a8/plat/ti/k3/include/platform_def.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/ti/k3/include/platform_def.h rename to atf-20240117-bacca82a8/plat/ti/k3/include/platform_def.h index ae3775a27..a2cc62d34 100644 --- a/atf-20231013-0ea67d76a/plat/ti/k3/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/ti/k3/include/platform_def.h @@ -70,11 +70,7 @@ * used, choose the smallest value needed to map the required virtual addresses * for each BL stage. */ -#if USE_COHERENT_MEM -#define MAX_XLAT_TABLES 10 -#else -#define MAX_XLAT_TABLES 9 -#endif +#define MAX_XLAT_TABLES 4 /* * Defines the maximum number of regions that are allocated by the translation @@ -86,7 +82,11 @@ * runtime memory used, choose the smallest value needed to register the * required regions for each BL stage. */ +#if USE_COHERENT_MEM #define MAX_MMAP_REGIONS 11 +#else +#define MAX_MMAP_REGIONS 10 +#endif /* * Defines the total size of the address space in bytes. For example, for a 32 diff --git a/atf-20231013-0ea67d76a/plat/ti/k3/platform.mk b/atf-20240117-bacca82a8/plat/ti/k3/platform.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/ti/k3/platform.mk rename to atf-20240117-bacca82a8/plat/ti/k3/platform.mk diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/ipi.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/ipi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/ipi.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/ipi.h diff --git a/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_clkfunc.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_clkfunc.h new file mode 100644 index 000000000..a182f9152 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_clkfunc.h @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2023-2024, Advanced Micro Devices, Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + */ + +#ifndef PLAT_CLKFUNC_H +#define PLAT_CLKFUNC_H + +void set_cnt_freq(void); + +#endif /* PLAT_CLKFUNC_H */ diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/plat_common.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/plat_common.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/plat_common.h diff --git a/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_console.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_console.h new file mode 100644 index 000000000..0f8320e05 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_console.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef PLAT_DT_UART_H +#define PLAT_DT_UART_H + +#define DT_UART_DCC_COMPAT "arm,dcc" + +#if defined(PLAT_zynqmp) +#define DT_UART_COMPAT "xlnx,zynqmp-uart" +#else +#define DT_UART_COMPAT "arm,pl011" +#endif + +typedef struct dt_uart_info_s { + char compatible[30]; + uintptr_t base; + uint32_t baud_rate; + int32_t status; +} dt_uart_info_t; + +void setup_console(void); + +#endif /* PLAT_DT_UART_H */ diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/plat_fdt.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_fdt.h similarity index 73% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/plat_fdt.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/plat_fdt.h index a1ee1e190..47a678c75 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/common/include/plat_fdt.h +++ b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_fdt.h @@ -9,4 +9,8 @@ void prepare_dtb(void); +#if defined(XILINX_OF_BOARD_DTB_ADDR) +int32_t is_valid_dtb(void *fdt); +#endif + #endif /* PLAT_FDT_H */ diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/plat_startup.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/plat_startup.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/plat_startup.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/plat_startup.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_api_sys.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_api_sys.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_api_sys.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/pm_api_sys.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_client.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_client.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_client.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/pm_client.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_common.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_common.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/pm_common.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_defs.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_defs.h similarity index 99% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_defs.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/pm_defs.h index 72ba10708..9cdb0ba07 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_defs.h +++ b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_defs.h @@ -68,7 +68,6 @@ enum { IOCTL_RPU_BOOT_ADDR_CONFIG = 2, IOCTL_TCM_COMB_CONFIG = 3, IOCTL_SET_TAPDELAY_BYPASS = 4, - IOCTL_SET_SGMII_MODE = 5, IOCTL_SD_DLL_RESET = 6, IOCTL_SET_SD_TAPDELAY = 7, /* Ioctl for clock driver */ diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_ipi.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_ipi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_ipi.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/pm_ipi.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_node.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_node.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_node.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/pm_node.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_svc_main.h b/atf-20240117-bacca82a8/plat/xilinx/common/include/pm_svc_main.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/include/pm_svc_main.h rename to atf-20240117-bacca82a8/plat/xilinx/common/include/pm_svc_main.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/ipi.c b/atf-20240117-bacca82a8/plat/xilinx/common/ipi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/ipi.c rename to atf-20240117-bacca82a8/plat/xilinx/common/ipi.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c b/atf-20240117-bacca82a8/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c rename to atf-20240117-bacca82a8/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.h b/atf-20240117-bacca82a8/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.h rename to atf-20240117-bacca82a8/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.h diff --git a/atf-20240117-bacca82a8/plat/xilinx/common/plat_clkfunc.c b/atf-20240117-bacca82a8/plat/xilinx/common/plat_clkfunc.c new file mode 100644 index 000000000..8a8ea7e8e --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/common/plat_clkfunc.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2023-2024, Advanced Micro Devices, Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +#include +#include +#include + +#include +#include + +uint32_t plat_get_syscnt_freq2(void) +{ + uint32_t counter_freq = 0; + uint32_t ret = 0; + + counter_freq = mmio_read_32(IOU_SCNTRS_BASE + + IOU_SCNTRS_BASE_FREQ_OFFSET); + if (counter_freq != 0U) { + ret = counter_freq; + } else { + INFO("Indicates counter frequency %dHz setting to %dHz\n", + counter_freq, cpu_clock); + ret = cpu_clock; + } + + return ret; +} + +void set_cnt_freq(void) +{ + uint64_t counter_freq; + + /* Configure counter frequency */ + counter_freq = read_cntfrq_el0(); + if (counter_freq == 0U) { + write_cntfrq_el0(plat_get_syscnt_freq2()); + } +} diff --git a/atf-20240117-bacca82a8/plat/xilinx/common/plat_console.c b/atf-20240117-bacca82a8/plat/xilinx/common/plat_console.c new file mode 100644 index 000000000..b84912abd --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/common/plat_console.c @@ -0,0 +1,343 @@ +/* + * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static console_t console; + +#if (defined(XILINX_OF_BOARD_DTB_ADDR) && !IS_TFA_IN_OCM(BL31_BASE)) +/** + * get_baudrate() - Get the baudrate form DTB. + * @dtb: Address of the Device Tree Blob (DTB). + * + * Return: On success returns the baudrate; on failure returns an error. + */ +static int32_t get_baudrate(void *dtb) +{ + int node; + int32_t ret = 0; + const char *prop, *path; + char *end; + int32_t baud_rate = 0; + + node = fdt_path_offset(dtb, "/secure-chosen"); + if (node < 0) { + node = fdt_path_offset(dtb, "/chosen"); + if (node < 0) { + ret = -FDT_ERR_NOTFOUND; + goto error; + } + } + + prop = fdt_getprop(dtb, node, "stdout-path", NULL); + if (prop == NULL) { + ret = -FDT_ERR_NOTFOUND; + goto error; + } + + /* Parse string serial0:115200n8 */ + path = strchr(prop, ':'); + if (!path) { + ret = -FDT_ERR_NOTFOUND; + goto error; + } else { + + baud_rate = strtoul(path + 1, &end, 10); + if (baud_rate == 0 && end == path) { + ERROR("Conversion error occurred: %d\n", baud_rate); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + ret = baud_rate; + } + +error: + return ret; +} + +/** + * get_node_status() - Get the DTB node status. + * @dtb: Address of the Device Tree Blob (DTB). + * @node: Node address in the device tree. + * + * Return: On success, it returns 1; on failure, it returns an 0. + */ +static uint32_t get_node_status(void *dtb, int node) +{ + const char *status_cell; + uint32_t status = 0; + + status_cell = fdt_getprop(dtb, node, "status", NULL); + if (!status_cell || strcmp(status_cell, "okay") == 0) { + status = 1; + } else { + status = 0; + } + + return status; +} + +/** + * fdt_add_uart_info() - Add DTB information to a UART structure. + * @info: Pointer to the UART information structure. + * @node: Node address in the device tree. + * @dtb: Address of the Device Tree Blob(DTB). + * + * Return: On success, it returns 1; on failure, it returns an 0. + */ +static uint32_t fdt_add_uart_info(dt_uart_info_t *info, int node, void *dtb) +{ + uintptr_t base_addr; + const char *com; + int32_t ret = 0; + + com = fdt_getprop(dtb, node, "compatible", NULL); + if (com != NULL) { + strlcpy(info->compatible, com, sizeof(info->compatible)); + } else { + ERROR("Compatible property not found in DTB node\n"); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + + ret = fdt_get_reg_props_by_index(dtb, node, 0, &base_addr, NULL); + if (ret >= 0) { + info->base = base_addr; + } else { + ERROR("Failed to retrieve base address. Error code: %d\n", ret); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + + info->status = get_node_status(dtb, node); + info->baud_rate = get_baudrate(dtb); + +error: + return ret; +} + +/** + * fdt_get_uart_info() - Get the uart information form DTB. + * @info: Pointer to the UART information structure. + * + * Return: On success, it returns 0; on failure, it returns an error+reason. + */ +static int fdt_get_uart_info(dt_uart_info_t *info) +{ + int node = 0, ret = 0; + void *dtb = (void *)XILINX_OF_BOARD_DTB_ADDR; + + ret = is_valid_dtb(dtb); + if (ret < 0) { + ERROR("Invalid Device Tree at %p: error %d\n", dtb, ret); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + + node = fdt_get_stdout_node_offset(dtb); + if (node < 0) { + ERROR("DT get stdout node failed : %d\n", node); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + + ret = fdt_add_uart_info(info, node, dtb); + if (ret < 0) { + ERROR("Failed to add DT UART info: %d\n", ret); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + +error: + return ret; +} + +/** + * check_fdt_uart_info() - Check early uart info with DTB uart info. + * @info: Pointer to the UART information structure. + * + * Return: On success, it returns 0; on failure, it returns an error+reason. + */ +static int32_t check_fdt_uart_info(dt_uart_info_t *info) +{ + int32_t ret = 0; + + if (info->status == 0) { + ret = -ENODEV; + goto error; + } + + if ((info->base == console.base) && + (info->baud_rate == UART_BAUDRATE) && !CONSOLE_IS(dcc)) { + ret = -ENODEV; + goto error; + } + +error: + return ret; +} + +/** + * console_boot_end() - Unregister the console_t instance form the console list. + * @boot_console: Pointer to the console information structure. + */ +static void console_boot_end(console_t *boot_console) +{ + if (CONSOLE_IS(dcc)) { + console_dcc_unregister(); + } else { + console_flush(); + (void)console_unregister(boot_console); + } +} + +/** + * setup_runtime_console() - Registers the runtime uart with console list. + * @clock: UART clock. + * @info: Pointer to the UART information structure. + */ +static void setup_runtime_console(uint32_t clock, dt_uart_info_t *info) +{ + static console_t bl31_runtime_console; + int32_t rc; + +#if defined(PLAT_zynqmp) + rc = console_cdns_register(info->base, + clock, + info->baud_rate, + &bl31_runtime_console); +#else + rc = console_pl011_register(info->base, + clock, + info->baud_rate, + &bl31_runtime_console); +#endif + if (rc == 0) { + panic(); + } + + console_set_scope(&bl31_runtime_console, + CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME | + CONSOLE_FLAG_CRASH); +} + + +/** + * runtime_console_init() - Initializes the run time console information. + * @uart_info: Pointer to the UART information structure. + * @bl31_boot_console: Pointer to the console information structure. + * @clock: UART clock. + * + * Return: On success, it returns 0; on failure, it returns an error+reason; + */ +static int32_t runtime_console_init(dt_uart_info_t *uart_info, + console_t *bl31_boot_console, + uint32_t clock) +{ + int32_t rc = 0; + + /* Parse UART information from Device Tree Blob (DTB) */ + rc = fdt_get_uart_info(uart_info); + if (rc < 0) { + rc = -FDT_ERR_NOTFOUND; + goto error; + } + + if (strncmp(uart_info->compatible, DT_UART_COMPAT, + strlen(DT_UART_COMPAT)) == 0) { + + if (check_fdt_uart_info(uart_info) == 0) { + setup_runtime_console(clock, uart_info); + console_boot_end(bl31_boot_console); + INFO("Runtime console setup\n"); + } else { + INFO("Early console and DTB console are same\n"); + } + } else if (strncmp(uart_info->compatible, DT_UART_DCC_COMPAT, + strlen(DT_UART_DCC_COMPAT)) == 0) { + rc = console_dcc_register(); + if (rc == 0) { + panic(); + } + console_boot_end(bl31_boot_console); + } else { + WARN("BL31: No console device found in DT.\n"); + } + +error: + return rc; +} +#endif + +void setup_console(void) +{ + int32_t rc; + uint32_t uart_clk = get_uart_clk(); + +#if defined(PLAT_zynqmp) + if (CONSOLE_IS(cadence) || (CONSOLE_IS(cadence1))) { + rc = console_cdns_register(UART_BASE, + uart_clk, + UART_BAUDRATE, + &console); + if (rc == 0) { + panic(); + } + + console_set_scope(&console, CONSOLE_FLAG_BOOT | + CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); + } +#else + if (CONSOLE_IS(pl011) || (CONSOLE_IS(pl011_1))) { + /* Initialize the console to provide early debug support */ + rc = console_pl011_register((uint32_t)UART_BASE, + uart_clk, + (uint32_t)UART_BAUDRATE, + &console); + if (rc == 0) { + panic(); + } + + console_set_scope(&console, CONSOLE_FLAG_BOOT | + CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); + } +#endif + if (CONSOLE_IS(dcc)) { + /* Initialize the dcc console for debug */ + rc = console_dcc_register(); + if (rc == 0) { + panic(); + } + } + INFO("BL31: Early console setup\n"); + +#if (defined(XILINX_OF_BOARD_DTB_ADDR) && !IS_TFA_IN_OCM(BL31_BASE)) + static dt_uart_info_t uart_info = {0}; + + /* Initialize the runtime console using UART information from the DTB */ + rc = runtime_console_init(&uart_info, &console, uart_clk); + if (rc < 0) { + ERROR("Failed to initialize runtime console: %d\n", rc); + } +#endif +} diff --git a/atf-20240117-bacca82a8/plat/xilinx/common/plat_fdt.c b/atf-20240117-bacca82a8/plat/xilinx/common/plat_fdt.c new file mode 100644 index 000000000..ebcc31b11 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/common/plat_fdt.c @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + */ +#include +#include +#include +#include +#include + +#include +#include + +#if defined(XILINX_OF_BOARD_DTB_ADDR) + +#define FIT_CONFS_PATH "/configurations" + +static uint8_t is_fit_image(void *dtb) +{ + int64_t confs_noffset; + uint8_t status = 0; + + confs_noffset = fdt_path_offset(dtb, FIT_CONFS_PATH); + /*confs_noffset is only present on FIT image */ + if (confs_noffset < 0) { + status = 0; + } else { + status = 1; + } + + return status; +} + +int32_t is_valid_dtb(void *fdt) +{ + int32_t ret = 0; + + if (fdt_check_header(fdt) != 0) { + ERROR("Can't read DT at %p\n", fdt); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + + ret = fdt_open_into(fdt, fdt, XILINX_OF_BOARD_DTB_MAX_SIZE); + if (ret < 0) { + ERROR("Invalid Device Tree at %p: error %d\n", fdt, ret); + ret = -FDT_ERR_NOTFOUND; + goto error; + } + + if (is_fit_image(fdt) != 0U) { + WARN("FIT image detected, TF-A will not update DTB for DDR address space\n"); + ret = -FDT_ERR_NOTFOUND; + } +error: + return ret; +} + +static int add_mmap_dynamic_region(unsigned long long base_pa, uintptr_t base_va, + size_t size, unsigned int attr) +{ + int ret = 0; +#if defined(PLAT_XLAT_TABLES_DYNAMIC) + ret = mmap_add_dynamic_region(base_pa, base_va, size, attr); + if (ret != 0) { + WARN("Failed to add dynamic region for dtb: error %d\n", + ret); + } +#endif + return ret; +} + +static int remove_mmap_dynamic_region(uintptr_t base_va, size_t size) +{ + int ret = 0; +#if defined(PLAT_XLAT_TABLES_DYNAMIC) + ret = mmap_remove_dynamic_region(base_va, size); + if (ret != 0) { + WARN("Failed to remove dynamic region for dtb:error %d\n", + ret); + } +#endif + return ret; +} +#endif + +void prepare_dtb(void) +{ +#if defined(XILINX_OF_BOARD_DTB_ADDR) + void *dtb; + int map_ret = 0; + int ret = 0; + + dtb = (void *)XILINX_OF_BOARD_DTB_ADDR; + + if (!IS_TFA_IN_OCM(BL31_BASE)) { + + map_ret = add_mmap_dynamic_region((unsigned long long)dtb, + (uintptr_t)dtb, + XILINX_OF_BOARD_DTB_MAX_SIZE, + MT_MEMORY | MT_RW | MT_NS); + if (map_ret == 0) { + /* Return if no device tree is detected */ + if (is_valid_dtb(dtb) == 0) { + if (dt_add_psci_node(dtb)) { + WARN("Failed to add PSCI Device Tree node\n"); + } + + if (dt_add_psci_cpu_enable_methods(dtb)) { + WARN("Failed to add PSCI cpu enable methods in DT\n"); + } + + /* Reserve memory used by Trusted Firmware. */ + ret = fdt_add_reserved_memory(dtb, "tf-a", + BL31_BASE, + BL31_LIMIT - BL31_BASE); + if (ret < 0) { + WARN("Failed to add reserved memory nodes for BL31 to DT.\n"); + } + + ret = fdt_pack(dtb); + if (ret < 0) { + WARN("Failed to pack dtb at %p: error %d\n", dtb, ret); + } + flush_dcache_range((uintptr_t)dtb, fdt_blob_size(dtb)); + + INFO("Changed device tree to advertise PSCI and reserved memories.\n"); + } + + ret = remove_mmap_dynamic_region((uintptr_t)dtb, + XILINX_OF_BOARD_DTB_MAX_SIZE); + if (ret != 0) { + WARN("Failed to remove mmap dynamic regions.\n"); + } + } + } +#endif +} diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/plat_startup.c b/atf-20240117-bacca82a8/plat/xilinx/common/plat_startup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/plat_startup.c rename to atf-20240117-bacca82a8/plat/xilinx/common/plat_startup.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/pm_service/pm_api_sys.c b/atf-20240117-bacca82a8/plat/xilinx/common/pm_service/pm_api_sys.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/pm_service/pm_api_sys.c rename to atf-20240117-bacca82a8/plat/xilinx/common/pm_service/pm_api_sys.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/pm_service/pm_ipi.c b/atf-20240117-bacca82a8/plat/xilinx/common/pm_service/pm_ipi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/pm_service/pm_ipi.c rename to atf-20240117-bacca82a8/plat/xilinx/common/pm_service/pm_ipi.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/pm_service/pm_svc_main.c b/atf-20240117-bacca82a8/plat/xilinx/common/pm_service/pm_svc_main.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/pm_service/pm_svc_main.c rename to atf-20240117-bacca82a8/plat/xilinx/common/pm_service/pm_svc_main.c diff --git a/atf-20240117-bacca82a8/plat/xilinx/common/tsp/tsp.mk b/atf-20240117-bacca82a8/plat/xilinx/common/tsp/tsp.mk new file mode 100644 index 000000000..b80f53115 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/common/tsp/tsp.mk @@ -0,0 +1,8 @@ +# +# Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +# TSP source files for AMD-Xilinx platforms +BL32_SOURCES += plat/common/aarch64/platform_mp_stack.S \ + plat/xilinx/common/tsp/tsp_plat_setup.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c b/atf-20240117-bacca82a8/plat/xilinx/common/tsp/tsp_plat_setup.c similarity index 67% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c rename to atf-20240117-bacca82a8/plat/xilinx/common/tsp/tsp_plat_setup.c index a9f2dbd73..21c29c391 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/tsp/tsp_plat_setup.c +++ b/atf-20240117-bacca82a8/plat/xilinx/common/tsp/tsp_plat_setup.c @@ -1,11 +1,13 @@ /* * Copyright (c) 2014-2019, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2023, Advanced Micro Devices. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include #include +#include #include #include #include @@ -22,10 +24,24 @@ void tsp_early_platform_setup(void) * messages from TSP */ static console_t tsp_boot_console; - (void)console_cdns_register(UART_BASE, - get_uart_clk(), - UART_BAUDRATE, - &tsp_boot_console); + int32_t rc; + +#if defined(PLAT_zynqmp) + rc = console_cdns_register((uintptr_t)UART_BASE, + (uint32_t)get_uart_clk(), + (uint32_t)UART_BAUDRATE, + &tsp_boot_console); +#else + rc = console_pl011_register((uintptr_t)UART_BASE, + (uint32_t)get_uart_clk(), + (uint32_t)UART_BAUDRATE, + &tsp_boot_console); +#endif + + if (rc == 0) { + panic(); + } + console_set_scope(&tsp_boot_console, CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT); } @@ -35,8 +51,16 @@ void tsp_early_platform_setup(void) ******************************************************************************/ void tsp_platform_setup(void) { +/* + * For ZynqMP, the GICv2 driver needs to be initialized in S-EL1, + * and for other platforms, the GICv3 driver is initialized in EL3. + * This is because S-EL1 can use GIC system registers to manage + * interrupts and does not need to be initialized again in SEL1. + */ +#if defined(PLAT_zynqmp) plat_arm_gic_driver_init(); plat_arm_gic_init(); +#endif } /******************************************************************************* @@ -52,12 +76,14 @@ void tsp_plat_arch_setup(void) MT_CODE | MT_SECURE), MAP_REGION_FLAT(BL_RO_DATA_BASE, BL_RO_DATA_END - BL_RO_DATA_BASE, MT_RO_DATA | MT_SECURE), +#if defined(PLAT_zynqmp) || defined(PLAT_versal) MAP_REGION_FLAT(BL_COHERENT_RAM_BASE, BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE, MT_DEVICE | MT_RW | MT_SECURE), +#endif {0} }; - setup_page_tables(bl_regions, plat_arm_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu_el1(0); } diff --git a/atf-20231013-0ea67d76a/plat/xilinx/common/versal.c b/atf-20240117-bacca82a8/plat/xilinx/common/versal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/common/versal.c rename to atf-20240117-bacca82a8/plat/xilinx/common/versal.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/aarch64/versal_common.c b/atf-20240117-bacca82a8/plat/xilinx/versal/aarch64/versal_common.c similarity index 93% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/aarch64/versal_common.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/aarch64/versal_common.c index 93deedc63..772477fec 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal/aarch64/versal_common.c +++ b/atf-20240117-bacca82a8/plat/xilinx/versal/aarch64/versal_common.c @@ -18,6 +18,7 @@ #include uint32_t platform_id, platform_version; +uint32_t cpu_clock = VERSAL_CPU_CLOCK; /* * Table of regions to map using the MMU. @@ -33,7 +34,7 @@ const mmap_region_t plat_versal_mmap[] = { { 0 } }; -const mmap_region_t *plat_versal_get_mmap(void) +const mmap_region_t *plat_get_mmap(void) { return plat_versal_mmap; } @@ -53,11 +54,6 @@ void versal_config_setup(void) generic_delay_timer_init(); } -uint32_t plat_get_syscnt_freq2(void) -{ - return VERSAL_CPU_CLOCK; -} - void board_detection(void) { uint32_t plat_info[2]; @@ -73,3 +69,8 @@ void board_detection(void) platform_id = FIELD_GET(PLATFORM_MASK, plat_info[1]); platform_version = FIELD_GET(PLATFORM_VERSION_MASK, plat_info[1]); } + +uint32_t get_uart_clk(void) +{ + return UART_CLOCK; +} diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/aarch64/versal_helpers.S b/atf-20240117-bacca82a8/plat/xilinx/versal/aarch64/versal_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/aarch64/versal_helpers.S rename to atf-20240117-bacca82a8/plat/xilinx/versal/aarch64/versal_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/bl31_versal_setup.c b/atf-20240117-bacca82a8/plat/xilinx/versal/bl31_versal_setup.c similarity index 88% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/bl31_versal_setup.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/bl31_versal_setup.c index 566415f16..d19a263b8 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal/bl31_versal_setup.c +++ b/atf-20240117-bacca82a8/plat/xilinx/versal/bl31_versal_setup.c @@ -12,13 +12,12 @@ #include #include #include -#include -#include -#include #include #include #include #include +#include +#include #include #include @@ -74,28 +73,9 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, enum pm_ret_status ret_status; uint64_t addr[HANDOFF_PARAMS_MAX_SIZE]; - if (CONSOLE_IS(pl011) || (CONSOLE_IS(pl011_1))) { - static console_t versal_runtime_console; - /* Initialize the console to provide early debug support */ - int32_t rc = console_pl011_register((uintptr_t)UART_BASE, - (uint32_t)UART_CLOCK, - (uint32_t)UART_BAUDRATE, - &versal_runtime_console); - if (rc == 0) { - panic(); - } + set_cnt_freq(); - console_set_scope(&versal_runtime_console, (uint32_t)(CONSOLE_FLAG_BOOT | - CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH)); - } else if (CONSOLE_IS(dcc)) { - /* Initialize the dcc console for debug */ - int32_t rc = console_dcc_register(); - if (rc == 0) { - panic(); - } - } else { - /* No console device found. */ - } + setup_console(); /* Initialize the platform config for future decision making */ versal_config_setup(); @@ -138,6 +118,19 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, panic(); } else { INFO("BL31: PLM to TF-A handover success %u\n", ret); + + /* + * The BL32 load address is indicated as 0x0 in the handoff + * parameters, which is different from the default/user-provided + * load address of 0x60000000 but the flags are correctly + * configured. Consequently, in this scenario, set the PC + * to the requested BL32_BASE address. + */ + + /* TODO: Remove the following check once this is fixed from PLM */ + if (bl32_image_ep_info.pc == 0 && bl32_image_ep_info.spsr != 0) { + bl32_image_ep_info.pc = (uintptr_t)BL32_BASE; + } } NOTICE("BL31: Secure code at 0x%lx\n", bl32_image_ep_info.pc); @@ -213,6 +206,8 @@ void bl31_plat_runtime_setup(void) if (rc != 0) { panic(); } + + console_switch_state(CONSOLE_FLAG_RUNTIME); } /* @@ -241,6 +236,6 @@ void bl31_plat_arch_setup(void) {0} }; - setup_page_tables(bl_regions, plat_versal_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu(0); } diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_ipi.h b/atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_ipi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_ipi.h rename to atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_ipi.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_macros.S b/atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_pm_common.h b/atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_pm_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_pm_common.h rename to atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_pm_common.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_private.h b/atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_private.h similarity index 89% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_private.h rename to atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_private.h index 48f64eaf9..932c6de9d 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/plat_private.h +++ b/atf-20240117-bacca82a8/plat/xilinx/versal/include/plat_private.h @@ -17,11 +17,12 @@ typedef struct versal_intr_info_type_el3 { interrupt_type_handler_t handler; } versal_intr_info_type_el3_t; +uint32_t get_uart_clk(void); void versal_config_setup(void); -const mmap_region_t *plat_versal_get_mmap(void); +const mmap_region_t *plat_get_mmap(void); -extern uint32_t platform_id, platform_version; +extern uint32_t cpu_clock, platform_id, platform_version; void board_detection(void); void plat_versal_gic_driver_init(void); diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/platform_def.h b/atf-20240117-bacca82a8/plat/xilinx/versal/include/platform_def.h similarity index 91% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/include/platform_def.h rename to atf-20240117-bacca82a8/plat/xilinx/versal/include/platform_def.h index 4c02402f7..286a706c4 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/platform_def.h +++ b/atf-20240117-bacca82a8/plat/xilinx/versal/include/platform_def.h @@ -35,10 +35,10 @@ # define BL31_BASE U(0xfffe0000) # define BL31_LIMIT U(0x100000000) #else -# define BL31_BASE (VERSAL_ATF_MEM_BASE) -# define BL31_LIMIT (VERSAL_ATF_MEM_BASE + VERSAL_ATF_MEM_SIZE) +# define BL31_BASE U(VERSAL_ATF_MEM_BASE) +# define BL31_LIMIT U(VERSAL_ATF_MEM_BASE + VERSAL_ATF_MEM_SIZE) # ifdef VERSAL_ATF_MEM_PROGBITS_SIZE -# define BL31_PROGBITS_LIMIT (VERSAL_ATF_MEM_BASE + VERSAL_ATF_MEM_PROGBITS_SIZE) +# define BL31_PROGBITS_LIMIT U(VERSAL_ATF_MEM_BASE + VERSAL_ATF_MEM_PROGBITS_SIZE) # endif #endif @@ -49,8 +49,8 @@ # define BL32_BASE U(0x60000000) # define BL32_LIMIT U(0x80000000) #else -# define BL32_BASE (VERSAL_BL32_MEM_BASE) -# define BL32_LIMIT (VERSAL_BL32_MEM_BASE + VERSAL_BL32_MEM_SIZE) +# define BL32_BASE U(VERSAL_BL32_MEM_BASE) +# define BL32_LIMIT U(VERSAL_BL32_MEM_BASE + VERSAL_BL32_MEM_SIZE) #endif /******************************************************************************* @@ -59,7 +59,7 @@ #ifndef PRELOADED_BL33_BASE # define PLAT_ARM_NS_IMAGE_BASE U(0x8000000) #else -# define PLAT_ARM_NS_IMAGE_BASE PRELOADED_BL33_BASE +# define PLAT_ARM_NS_IMAGE_BASE U(PRELOADED_BL33_BASE) #endif /******************************************************************************* diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/versal_def.h b/atf-20240117-bacca82a8/plat/xilinx/versal/include/versal_def.h similarity index 97% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/include/versal_def.h rename to atf-20240117-bacca82a8/plat/xilinx/versal/include/versal_def.h index 0ac76b523..f21d40996 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal/include/versal_def.h +++ b/atf-20240117-bacca82a8/plat/xilinx/versal/include/versal_def.h @@ -48,6 +48,7 @@ * IRQ constants ******************************************************************************/ #define VERSAL_IRQ_SEC_PHY_TIMER U(29) +#define ARM_IRQ_SEC_PHY_TIMER 29 /******************************************************************************* * CCI-400 related constants @@ -110,6 +111,10 @@ #define CRF_RST_APU_ACPU_RESET (1 << 0) #define CRF_RST_APU_ACPU_PWRON_RESET (1 << 10) +/* IOU SCNTRS */ +#define IOU_SCNTRS_BASE U(0xFF140000) +#define IOU_SCNTRS_BASE_FREQ_OFFSET U(0x20) + /* APU registers and bitfields */ #define FPD_APU_BASE 0xFD5C0000U #define FPD_APU_CONFIG_0 (FPD_APU_BASE + 0x20U) diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/plat_psci.c b/atf-20240117-bacca82a8/plat/xilinx/versal/plat_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/plat_psci.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/plat_psci.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/plat_topology.c b/atf-20240117-bacca82a8/plat/xilinx/versal/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/plat_topology.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/plat_versal.c b/atf-20240117-bacca82a8/plat/xilinx/versal/plat_versal.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/plat_versal.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/plat_versal.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/platform.mk b/atf-20240117-bacca82a8/plat/xilinx/versal/platform.mk similarity index 90% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/platform.mk rename to atf-20240117-bacca82a8/plat/xilinx/versal/platform.mk index a0527134f..35d6bc7e7 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal/platform.mk +++ b/atf-20240117-bacca82a8/plat/xilinx/versal/platform.mk @@ -54,6 +54,9 @@ ifeq (${PLAT_XLAT_TABLES_DYNAMIC},1) $(eval $(call add_define,PLAT_XLAT_TABLES_DYNAMIC)) endif +# enable assert() for release/debug builds +ENABLE_ASSERTIONS := 1 + PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ -Iplat/xilinx/common/include/ \ -Iplat/xilinx/common/ipi_mailbox_service/ \ @@ -88,9 +91,12 @@ $(eval $(call add_define_val,VERSAL_CONSOLE,VERSAL_CONSOLE_ID_${VERSAL_CONSOLE}) BL31_SOURCES += drivers/arm/cci/cci.c \ lib/cpus/aarch64/cortex_a72.S \ + common/fdt_wrappers.c \ plat/common/plat_psci_common.c \ plat/xilinx/common/ipi.c \ plat/xilinx/common/plat_fdt.c \ + plat/xilinx/common/plat_console.c \ + plat/xilinx/common/plat_clkfunc.c \ plat/xilinx/common/plat_startup.c \ plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \ plat/xilinx/common/pm_service/pm_ipi.c \ @@ -111,3 +117,9 @@ BL31_SOURCES += drivers/arm/cci/cci.c \ ifeq ($(HARDEN_SLS_ALL), 1) TF_CFLAGS_aarch64 += -mharden-sls=all endif + +ifeq (${ERRATA_ABI_SUPPORT}, 1) +# enable the cpu macros for errata abi interface +CORTEX_A72_H_INC := 1 +$(eval $(call add_define, CORTEX_A72_H_INC)) +endif diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/pm_service/pm_client.c b/atf-20240117-bacca82a8/plat/xilinx/versal/pm_service/pm_client.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/pm_service/pm_client.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/pm_service/pm_client.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/sip_svc_setup.c b/atf-20240117-bacca82a8/plat/xilinx/versal/sip_svc_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/sip_svc_setup.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/sip_svc_setup.c diff --git a/atf-20240117-bacca82a8/plat/xilinx/versal/tsp/tsp-versal.mk b/atf-20240117-bacca82a8/plat/xilinx/versal/tsp/tsp-versal.mk new file mode 100644 index 000000000..bf32de3f5 --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/versal/tsp/tsp-versal.mk @@ -0,0 +1,10 @@ +# +# Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +# TSP source files specific to Versal platform + +PLAT_XILINX_COMMON := plat/xilinx/common/ + +include ${PLAT_XILINX_COMMON}/tsp/tsp.mk diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/versal_gicv3.c b/atf-20240117-bacca82a8/plat/xilinx/versal/versal_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/versal_gicv3.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/versal_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal/versal_ipi.c b/atf-20240117-bacca82a8/plat/xilinx/versal/versal_ipi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal/versal_ipi.c rename to atf-20240117-bacca82a8/plat/xilinx/versal/versal_ipi.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/aarch64/versal_net_common.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/aarch64/versal_net_common.c similarity index 83% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/aarch64/versal_net_common.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/aarch64/versal_net_common.c index b2de411fe..55c419831 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/aarch64/versal_net_common.c +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/aarch64/versal_net_common.c @@ -34,7 +34,7 @@ const mmap_region_t plat_versal_net_mmap[] = { { 0 } }; -const mmap_region_t *plat_versal_net_get_mmap(void) +const mmap_region_t *plat_get_mmap(void) { return plat_versal_net_mmap; } @@ -88,13 +88,47 @@ void board_detection(void) platform_version / 10U, platform_version % 10U); } +uint32_t get_uart_clk(void) +{ + uint32_t uart_clock; + + switch (platform_id) { + case VERSAL_NET_SPP: + uart_clock = 1000000; + break; + case VERSAL_NET_EMU: + uart_clock = 25000000; + break; + case VERSAL_NET_QEMU: + uart_clock = 25000000; + break; + case VERSAL_NET_SILICON: + uart_clock = 100000000; + break; + default: + panic(); + } + + return uart_clock; +} + void versal_net_config_setup(void) +{ + generic_delay_timer_init(); + +#if (TFA_NO_PM == 0) + /* Configure IPI data for versal_net */ + versal_net_ipi_config_table_init(); +#endif +} + +void syscnt_freq_config_setup(void) { uint32_t val; uintptr_t crl_base, iou_scntrs_base, psx_base; crl_base = VERSAL_NET_CRL; - iou_scntrs_base = VERSAL_NET_IOU_SCNTRS; + iou_scntrs_base = IOU_SCNTRS_BASE; psx_base = PSX_CRF; /* Reset for system timestamp generator in FPX */ @@ -109,20 +143,9 @@ void versal_net_config_setup(void) mmio_write_32(crl_base + VERSAL_NET_CRL_RST_TIMESTAMP_OFFSET, 0); /* Program freq register in System counter and enable system counter. */ - mmio_write_32(iou_scntrs_base + VERSAL_NET_IOU_SCNTRS_BASE_FREQ_OFFSET, + mmio_write_32(iou_scntrs_base + IOU_SCNTRS_BASE_FREQ_OFFSET, cpu_clock); - mmio_write_32(iou_scntrs_base + VERSAL_NET_IOU_SCNTRS_COUNTER_CONTROL_REG_OFFSET, - VERSAL_NET_IOU_SCNTRS_CONTROL_EN); - - generic_delay_timer_init(); - -#if (TFA_NO_PM == 0) - /* Configure IPI data for versal_net */ - versal_net_ipi_config_table_init(); -#endif + mmio_write_32(iou_scntrs_base + IOU_SCNTRS_COUNTER_CONTROL_REG_OFFSET, + IOU_SCNTRS_CONTROL_EN); } -uint32_t plat_get_syscnt_freq2(void) -{ - return cpu_clock; -} diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/aarch64/versal_net_helpers.S b/atf-20240117-bacca82a8/plat/xilinx/versal_net/aarch64/versal_net_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/aarch64/versal_net_helpers.S rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/aarch64/versal_net_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/bl31_versal_net_setup.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/bl31_versal_net_setup.c similarity index 86% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/bl31_versal_net_setup.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/bl31_versal_net_setup.c index a70095d40..283fee31c 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/bl31_versal_net_setup.c +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/bl31_versal_net_setup.c @@ -12,13 +12,12 @@ #include #include #include -#include -#include -#include #include #include #include #include +#include +#include #include #include @@ -69,8 +68,6 @@ static inline void bl31_set_default_config(void) void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3) { - uint32_t uart_clock; - int32_t rc; #if !(TFA_NO_PM) uint64_t tfa_handoff_addr, buff[HANDOFF_PARAMS_MAX_SIZE] = {0}; uint32_t payload[PAYLOAD_ARG_CNT], max_size = HANDOFF_PARAMS_MAX_SIZE; @@ -82,49 +79,26 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, switch (platform_id) { case VERSAL_NET_SPP: cpu_clock = 1000000; - uart_clock = 1000000; break; case VERSAL_NET_EMU: cpu_clock = 3660000; - uart_clock = 25000000; break; case VERSAL_NET_QEMU: /* Random values now */ cpu_clock = 100000000; - uart_clock = 25000000; break; case VERSAL_NET_SILICON: cpu_clock = 100000000; - uart_clock = 100000000; break; default: panic(); } - if (CONSOLE_IS(pl011_0) || CONSOLE_IS(pl011_1)) { - static console_t versal_net_runtime_console; + syscnt_freq_config_setup(); - /* Initialize the console to provide early debug support */ - rc = console_pl011_register(UART_BASE, uart_clock, - UART_BAUDRATE, - &versal_net_runtime_console); - if (rc == 0) { - panic(); - } + set_cnt_freq(); - console_set_scope(&versal_net_runtime_console, CONSOLE_FLAG_BOOT | - CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_CRASH); - } else if (CONSOLE_IS(dcc)) { - /* Initialize the dcc console for debug. - * dcc is over jtag and does not configures uart0 or uart1. - */ - rc = console_dcc_register(); - if (rc == 0) { - panic(); - } - } else { - /* No console device found. */ - } + setup_console(); NOTICE("TF-A running on %s %d.%d\n", board_name_decode(), platform_version / 10U, platform_version % 10U); @@ -162,6 +136,19 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, } INFO("BL31: PLM to TF-A handover success\n"); + + /* + * The BL32 load address is indicated as 0x0 in the handoff + * parameters, which is different from the default/user-provided + * load address of 0x60000000 but the flags are correctly + * configured. Consequently, in this scenario, set the PC + * to the requested BL32_BASE address. + */ + + /* TODO: Remove the following check once this is fixed from PLM */ + if (bl32_image_ep_info.pc == 0 && bl32_image_ep_info.spsr != 0) { + bl32_image_ep_info.pc = (uintptr_t)BL32_BASE; + } } else { INFO("BL31: setting up default configs\n"); @@ -244,6 +231,8 @@ void bl31_plat_runtime_setup(void) if (rc != 0) { panic(); } + + console_switch_state(CONSOLE_FLAG_RUNTIME); } /* @@ -265,6 +254,6 @@ void bl31_plat_arch_setup(void) {0} }; - setup_page_tables(bl_regions, plat_versal_net_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu(0); } diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_ipi.h b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_ipi.h similarity index 71% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_ipi.h rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_ipi.h index 9f9947e32..e0fe723b0 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_ipi.h +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_ipi.h @@ -24,7 +24,15 @@ #define IPI_ID_3 5U #define IPI_ID_4 6U #define IPI_ID_5 7U -#define IPI_ID_MAX 8U +#define IPI_ID_PMC_NOBUF 8U +#define IPI_ID_6_NOBUF_95 9U +#define IPI_ID_1_NOBUF 10U +#define IPI_ID_2_NOBUF 11U +#define IPI_ID_3_NOBUF 12U +#define IPI_ID_4_NOBUF 13U +#define IPI_ID_5_NOBUF 14U +#define IPI_ID_6_NOBUF_101 15U +#define IPI_ID_MAX 16U /********************************************************************* * IPI message buffers @@ -68,5 +76,21 @@ void versal_net_ipi_config_table_init(void); #define IPI4_TRIG_BIT (1 << 6) #define IPI5_REG_BASE (0xEB380000U) #define IPI5_TRIG_BIT (1 << 7) +#define PMC_NOBUF_REG_BASE (0xEB390000U) +#define PMC_NOBUF_TRIG_BIT (1 << 8) +#define IPI6_NOBUF_95_REG_BASE (0xEB3A0000U) +#define IPI6_NOBUF_95_TRIG_BIT (1 << 9) +#define IPI1_NOBUF_REG_BASE (0xEB3B0000U) +#define IPI1_NOBUF_TRIG_BIT (1 << 10) +#define IPI2_NOBUF_REG_BASE (0xEB3B1000U) +#define IPI2_NOBUF_TRIG_BIT (1 << 11) +#define IPI3_NOBUF_REG_BASE (0xEB3B2000U) +#define IPI3_NOBUF_TRIG_BIT (1 << 12) +#define IPI4_NOBUF_REG_BASE (0xEB3B3000U) +#define IPI4_NOBUF_TRIG_BIT (1 << 13) +#define IPI5_NOBUF_REG_BASE (0xEB3B4000U) +#define IPI5_NOBUF_TRIG_BIT (1 << 14) +#define IPI6_NOBUF_101_REG_BASE (0xEB3B5000U) +#define IPI6_NOBUF_101_TRIG_BIT (1 << 15) #endif /* PLAT_IPI_H */ diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_macros.S b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_pm_common.h b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_pm_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_pm_common.h rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_pm_common.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_private.h b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_private.h similarity index 92% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_private.h rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_private.h index be75bfdfa..0b82ca730 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/plat_private.h +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/plat_private.h @@ -18,8 +18,10 @@ typedef struct versal_intr_info_type_el3 { } versal_intr_info_type_el3_t; void versal_net_config_setup(void); +void syscnt_freq_config_setup(void); +uint32_t get_uart_clk(void); -const mmap_region_t *plat_versal_net_get_mmap(void); +const mmap_region_t *plat_get_mmap(void); void plat_versal_net_gic_driver_init(void); void plat_versal_net_gic_init(void); diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/platform_def.h b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/platform_def.h rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/versal_net_def.h b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/versal_net_def.h similarity index 96% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/versal_net_def.h rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/include/versal_net_def.h index a53cad955..e7d234bb6 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/include/versal_net_def.h +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/include/versal_net_def.h @@ -111,11 +111,11 @@ #define VERSAL_NET_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT_BIT (1U << 25U) /* IOU SCNTRS */ -#define VERSAL_NET_IOU_SCNTRS U(0xEC920000) -#define VERSAL_NET_IOU_SCNTRS_COUNTER_CONTROL_REG_OFFSET U(0) -#define VERSAL_NET_IOU_SCNTRS_BASE_FREQ_OFFSET U(0x20) +#define IOU_SCNTRS_BASE U(0xEC920000) +#define IOU_SCNTRS_COUNTER_CONTROL_REG_OFFSET U(0) +#define IOU_SCNTRS_BASE_FREQ_OFFSET U(0x20) -#define VERSAL_NET_IOU_SCNTRS_CONTROL_EN U(1) +#define IOU_SCNTRS_CONTROL_EN U(1) #define APU_CLUSTER0 U(0xECC00000) #define APU_RVBAR_L_0 U(0x40) @@ -128,6 +128,7 @@ * IRQ constants ******************************************************************************/ #define VERSAL_NET_IRQ_SEC_PHY_TIMER U(29) +#define ARM_IRQ_SEC_PHY_TIMER 29 /******************************************************************************* * UART related constants diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/plat_psci.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/plat_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/plat_psci.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/plat_psci.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/plat_psci_pm.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/plat_psci_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/plat_psci_pm.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/plat_psci_pm.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/plat_topology.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/plat_topology.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/platform.mk b/atf-20240117-bacca82a8/plat/xilinx/versal_net/platform.mk similarity index 91% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/platform.mk rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/platform.mk index 9fa16fdee..ad1ee2b04 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/platform.mk +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/platform.mk @@ -69,6 +69,9 @@ ifdef XILINX_OF_BOARD_DTB_ADDR $(eval $(call add_define,XILINX_OF_BOARD_DTB_ADDR)) endif +# enable assert() for release/debug builds +ENABLE_ASSERTIONS := 1 + PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ -Iplat/xilinx/common/include/ \ -Iplat/xilinx/common/ipi_mailbox_service/ \ @@ -90,7 +93,9 @@ PLAT_BL_COMMON_SOURCES := \ plat/arm/common/arm_common.c \ plat/common/plat_gicv3.c \ ${PLAT_PATH}/aarch64/versal_net_helpers.S \ - ${PLAT_PATH}/aarch64/versal_net_common.c + ${PLAT_PATH}/aarch64/versal_net_common.c \ + ${PLAT_PATH}/plat_topology.c \ + ${XLAT_TABLES_LIB_SRCS} BL31_SOURCES += drivers/arm/cci/cci.c \ lib/cpus/aarch64/cortex_a78_ae.S \ @@ -108,13 +113,14 @@ BL31_SOURCES += ${PLAT_PATH}/plat_psci.c endif BL31_SOURCES += plat/xilinx/common/plat_fdt.c \ plat/xilinx/common/plat_startup.c \ + plat/xilinx/common/plat_console.c \ + plat/xilinx/common/plat_clkfunc.c \ plat/xilinx/common/ipi.c \ plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \ plat/xilinx/common/versal.c \ ${PLAT_PATH}/bl31_versal_net_setup.c \ - ${PLAT_PATH}/plat_topology.c \ common/fdt_fixup.c \ + common/fdt_wrappers.c \ ${LIBFDT_SRCS} \ ${PLAT_PATH}/sip_svc_setup.c \ - ${PLAT_PATH}/versal_net_gicv3.c \ - ${XLAT_TABLES_LIB_SRCS} + ${PLAT_PATH}/versal_net_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/pm_service/pm_client.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/pm_service/pm_client.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/pm_service/pm_client.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/pm_service/pm_client.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/sip_svc_setup.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/sip_svc_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/sip_svc_setup.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/sip_svc_setup.c diff --git a/atf-20240117-bacca82a8/plat/xilinx/versal_net/tsp/tsp-versal_net.mk b/atf-20240117-bacca82a8/plat/xilinx/versal_net/tsp/tsp-versal_net.mk new file mode 100644 index 000000000..ab7871c0e --- /dev/null +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/tsp/tsp-versal_net.mk @@ -0,0 +1,10 @@ +# +# Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause + +# TSP source files specific to Versal NET platform + +PLAT_XILINX_COMMON := plat/xilinx/common/ + +include ${PLAT_XILINX_COMMON}/tsp/tsp.mk diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/versal_net_gicv3.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/versal_net_gicv3.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/versal_net_gicv3.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/versal_net_gicv3.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/versal_net_ipi.c b/atf-20240117-bacca82a8/plat/xilinx/versal_net/versal_net_ipi.c similarity index 57% rename from atf-20231013-0ea67d76a/plat/xilinx/versal_net/versal_net_ipi.c rename to atf-20240117-bacca82a8/plat/xilinx/versal_net/versal_net_ipi.c index e8d8fb769..7c38921c5 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/versal_net/versal_net_ipi.c +++ b/atf-20240117-bacca82a8/plat/xilinx/versal_net/versal_net_ipi.c @@ -63,6 +63,62 @@ static const struct ipi_config versal_net_ipi_table[IPI_ID_MAX] = { .ipi_reg_base = IPI5_REG_BASE, .secure_only = 0, }, + + /* PMC_NOBUF IPI */ + [IPI_ID_PMC_NOBUF] = { + .ipi_bit_mask = PMC_NOBUF_TRIG_BIT, + .ipi_reg_base = PMC_NOBUF_REG_BASE, + .secure_only = IPI_SECURE_MASK, + }, + + /* IPI6 IPI */ + [IPI_ID_6_NOBUF_95] = { + .ipi_bit_mask = IPI6_NOBUF_95_TRIG_BIT, + .ipi_reg_base = IPI6_NOBUF_95_REG_BASE, + .secure_only = 0, + }, + + /* IPI1 NO BUF IPI */ + [IPI_ID_1_NOBUF] = { + .ipi_bit_mask = IPI1_NOBUF_TRIG_BIT, + .ipi_reg_base = IPI1_NOBUF_REG_BASE, + .secure_only = 0, + }, + + /* IPI2 NO BUF IPI */ + [IPI_ID_2_NOBUF] = { + .ipi_bit_mask = IPI2_NOBUF_TRIG_BIT, + .ipi_reg_base = IPI2_NOBUF_REG_BASE, + .secure_only = 0, + }, + + /* IPI3 NO BUF IPI */ + [IPI_ID_3_NOBUF] = { + .ipi_bit_mask = IPI3_NOBUF_TRIG_BIT, + .ipi_reg_base = IPI3_NOBUF_REG_BASE, + .secure_only = 0, + }, + + /* IPI4 NO BUF IPI */ + [IPI_ID_4_NOBUF] = { + .ipi_bit_mask = IPI4_NOBUF_TRIG_BIT, + .ipi_reg_base = IPI4_NOBUF_REG_BASE, + .secure_only = 0, + }, + + /* IPI5 NO BUF IPI */ + [IPI_ID_5_NOBUF] = { + .ipi_bit_mask = IPI5_NOBUF_TRIG_BIT, + .ipi_reg_base = IPI5_NOBUF_REG_BASE, + .secure_only = 0, + }, + + /* IPI6 NO BUF IPI */ + [IPI_ID_6_NOBUF_101] = { + .ipi_bit_mask = IPI6_NOBUF_101_TRIG_BIT, + .ipi_reg_base = IPI6_NOBUF_101_REG_BASE, + .secure_only = 0, + }, }; /* versal_net_ipi_config_table_init() - Initialize versal_net IPI configuration diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/aarch64/zynqmp_common.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/aarch64/zynqmp_common.c similarity index 98% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/aarch64/zynqmp_common.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/aarch64/zynqmp_common.c index e1c8ee8a3..dba1734c0 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/aarch64/zynqmp_common.c +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/aarch64/zynqmp_common.c @@ -27,13 +27,18 @@ * This doesn't include TZRAM as the 'mem_layout' argument passed to * configure_mmu_elx() will give the available subset of that, */ -const mmap_region_t plat_arm_mmap[] = { +const mmap_region_t plat_zynqmp_mmap[] = { { DEVICE0_BASE, DEVICE0_BASE, DEVICE0_SIZE, MT_DEVICE | MT_RW | MT_SECURE }, { DEVICE1_BASE, DEVICE1_BASE, DEVICE1_SIZE, MT_DEVICE | MT_RW | MT_SECURE }, { CRF_APB_BASE, CRF_APB_BASE, CRF_APB_SIZE, MT_DEVICE | MT_RW | MT_SECURE }, {0} }; +const mmap_region_t *plat_get_mmap(void) +{ + return plat_zynqmp_mmap; +} + static uint32_t zynqmp_get_silicon_ver(void) { static unsigned int ver; diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/bl31_zynqmp_setup.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/bl31_zynqmp_setup.c similarity index 89% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/bl31_zynqmp_setup.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/bl31_zynqmp_setup.c index 32bb9820d..baf67170a 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/bl31_zynqmp_setup.c +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/bl31_zynqmp_setup.c @@ -13,12 +13,11 @@ #include #include #include -#include -#include #include #include #include #include +#include #include #include @@ -74,25 +73,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, { uint64_t tfa_handoff_addr; - if (CONSOLE_IS(cadence) || (CONSOLE_IS(cadence1))) { - /* Register the console to provide early debug support */ - static console_t bl31_boot_console; - (void)console_cdns_register(UART_BASE, - get_uart_clk(), - UART_BAUDRATE, - &bl31_boot_console); - console_set_scope(&bl31_boot_console, - CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT | - CONSOLE_FLAG_CRASH); - } else if (CONSOLE_IS(dcc)) { - /* Initialize the dcc console for debug */ - int32_t rc = console_dcc_register(); - if (rc == 0) { - panic(); - } - } else { - /* No console device found. */ - } + setup_console(); + /* Initialize the platform config for future decision making */ zynqmp_config_setup(); @@ -208,6 +190,8 @@ void bl31_plat_runtime_setup(void) #endif custom_runtime_setup(); + + console_switch_state(CONSOLE_FLAG_RUNTIME); } /* @@ -237,6 +221,6 @@ void bl31_plat_arch_setup(void) custom_mmap_add(); - setup_page_tables(bl_regions, plat_arm_get_mmap()); + setup_page_tables(bl_regions, plat_get_mmap()); enable_mmu_el3(0); } diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/custom_sip_svc.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/custom_sip_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/custom_sip_svc.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/custom_sip_svc.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/custom_svc.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/custom_svc.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/custom_svc.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/custom_svc.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_ipi.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_ipi.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_ipi.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_ipi.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_macros.S b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_macros.S similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_macros.S rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_macros.S diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_pm_common.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_pm_common.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_pm_common.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_pm_common.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_private.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_private.h similarity index 91% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_private.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_private.h index dda005a45..afa102d87 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/plat_private.h +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/plat_private.h @@ -13,9 +13,12 @@ #include #include #include +#include void zynqmp_config_setup(void); +const mmap_region_t *plat_get_mmap(void); + uint32_t zynqmp_calc_core_pos(u_register_t mpidr); /* ZynqMP specific functions */ diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/platform_def.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/platform_def.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/platform_def.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/platform_def.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/zynqmp_def.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/zynqmp_def.h similarity index 96% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/zynqmp_def.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/zynqmp_def.h index 38f2d9b3b..d715ce2f4 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/include/zynqmp_def.h +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/include/zynqmp_def.h @@ -221,20 +221,6 @@ #define IOU_TAPDLY_BYPASS U(0XFF180390) #define TAP_DELAY_MASK U(0x7) -/* SGMII mode */ -#define IOU_GEM_CTRL U(0xFF180360) -#define IOU_GEM_CLK_CTRL U(0xFF180308) -#define SGMII_SD_MASK U(0x3) -#define SGMII_SD_OFFSET U(2) -#define SGMII_PCS_SD_0 U(0x0) -#define SGMII_PCS_SD_1 U(0x1) -#define SGMII_PCS_SD_PHY U(0x2) -#define GEM_SGMII_MASK U(0x4) -#define GEM_CLK_CTRL_MASK U(0xF) -#define GEM_CLK_CTRL_OFFSET U(5) -#define GEM_RX_SRC_SEL_GTR U(0x1) -#define GEM_SGMII_MODE U(0x4) - /* SD DLL reset */ #define ZYNQMP_SD_DLL_CTRL U(0xFF180358) #define ZYNQMP_SD0_DLL_RST_MASK U(0x00000004) diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/libpm.mk b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/libpm.mk similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/libpm.mk rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/libpm.mk diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/plat_psci.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/plat_psci.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/plat_psci.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/plat_psci.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/plat_topology.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/plat_topology.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/plat_topology.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/plat_topology.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/plat_zynqmp.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/plat_zynqmp.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/plat_zynqmp.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/plat_zynqmp.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/platform.mk b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/platform.mk similarity index 96% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/platform.mk rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/platform.mk index e20cb2246..e266615fb 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/platform.mk +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/platform.mk @@ -49,6 +49,10 @@ ifdef ZYNQMP_ATF_MEM_BASE ifdef ZYNQMP_ATF_MEM_PROGBITS_SIZE $(eval $(call add_define,ZYNQMP_ATF_MEM_PROGBITS_SIZE)) endif + + # enable assert() when TF-A runs from DDR memory. + ENABLE_ASSERTIONS := 1 + endif ifdef ZYNQMP_BL32_MEM_BASE @@ -124,9 +128,11 @@ BL31_SOURCES += drivers/arm/cci/cci.c \ lib/cpus/aarch64/cortex_a53.S \ plat/common/plat_psci_common.c \ common/fdt_fixup.c \ + common/fdt_wrappers.c \ ${LIBFDT_SRCS} \ plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \ plat/xilinx/common/plat_startup.c \ + plat/xilinx/common/plat_console.c \ plat/xilinx/common/plat_fdt.c \ plat/xilinx/zynqmp/bl31_zynqmp_setup.c \ plat/xilinx/zynqmp/plat_psci.c \ diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_clock.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_clock.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_clock.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_clock.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_clock.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_clock.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_clock.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_clock.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c similarity index 91% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c index e812ad69d..dd2149969 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c @@ -173,67 +173,6 @@ static enum pm_ret_status pm_ioctl_set_tapdelay_bypass(uint32_t type, return pm_mmio_write(IOU_TAPDLY_BYPASS, TAP_DELAY_MASK, value << type); } -/** - * pm_ioctl_set_sgmii_mode() - Set SGMII mode for the GEM device. - * @nid: Node ID of the device. - * @value: Enable/Disable. - * - * This function enable/disable SGMII mode for the GEM device. - * While enabling SGMII mode, it also ties the GEM PCS Signal - * Detect to 1 and selects EMIO for RX clock generation. - * - * Return: Returns status, either success or error+reason. - * - */ -static enum pm_ret_status pm_ioctl_set_sgmii_mode(enum pm_node_id nid, - uint32_t value) -{ - uint32_t val, mask, shift; - enum pm_ret_status ret; - - if (value != PM_SGMII_DISABLE && value != PM_SGMII_ENABLE) { - return PM_RET_ERROR_ARGS; - } - - switch (nid) { - case NODE_ETH_0: - shift = 0; - break; - case NODE_ETH_1: - shift = 1; - break; - case NODE_ETH_2: - shift = 2; - break; - case NODE_ETH_3: - shift = 3; - break; - default: - return PM_RET_ERROR_ARGS; - } - - if (value == PM_SGMII_DISABLE) { - mask = GEM_SGMII_MASK << GEM_CLK_CTRL_OFFSET * shift; - ret = pm_mmio_write(IOU_GEM_CLK_CTRL, mask, 0U); - } else { - /* Tie the GEM PCS Signal Detect to 1 */ - mask = SGMII_SD_MASK << SGMII_SD_OFFSET * shift; - val = SGMII_PCS_SD_1 << SGMII_SD_OFFSET * shift; - ret = pm_mmio_write(IOU_GEM_CTRL, mask, val); - if (ret != PM_RET_SUCCESS) { - return ret; - } - - /* Set the GEM to SGMII mode */ - mask = GEM_CLK_CTRL_MASK << GEM_CLK_CTRL_OFFSET * shift; - val = GEM_RX_SRC_SEL_GTR | GEM_SGMII_MODE; - val <<= GEM_CLK_CTRL_OFFSET * shift; - ret = pm_mmio_write(IOU_GEM_CLK_CTRL, mask, val); - } - - return ret; -} - /** * pm_ioctl_sd_dll_reset() - Reset DLL logic. * @nid: Node ID of the device. @@ -684,9 +623,6 @@ enum pm_ret_status pm_api_ioctl(enum pm_node_id nid, case IOCTL_SET_TAPDELAY_BYPASS: ret = pm_ioctl_set_tapdelay_bypass(arg1, arg2); break; - case IOCTL_SET_SGMII_MODE: - ret = pm_ioctl_set_sgmii_mode(nid, arg1); - break; case IOCTL_SD_DLL_RESET: ret = pm_ioctl_sd_dll_reset(nid, arg1); break; @@ -752,7 +688,6 @@ enum pm_ret_status tfa_ioctl_bitmask(uint32_t *bit_mask) IOCTL_RPU_BOOT_ADDR_CONFIG, IOCTL_TCM_COMB_CONFIG, IOCTL_SET_TAPDELAY_BYPASS, - IOCTL_SET_SGMII_MODE, IOCTL_SD_DLL_RESET, IOCTL_SET_SD_TAPDELAY, IOCTL_SET_PLL_FRAC_MODE, diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.h similarity index 94% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.h index 6b094db11..bf94b7c13 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.h +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.h @@ -36,10 +36,6 @@ #define PM_TAPDELAY_BYPASS_DISABLE 0U #define PM_TAPDELAY_BYPASS_ENABLE 1U -//sgmii mode -#define PM_SGMII_DISABLE 0U -#define PM_SGMII_ENABLE 1U - enum tap_delay_type { PM_TAPDELAY_INPUT, PM_TAPDELAY_OUTPUT, diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_client.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_client.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/pm_client.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/pm_client.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c similarity index 99% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c index 0199597ee..6b42055d6 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c @@ -162,10 +162,6 @@ static const eemi_api_dependency api_dep_table[] = { .id = IOCTL_SET_TAPDELAY_BYPASS, .api_id = PM_MMIO_WRITE, }, - { - .id = IOCTL_SET_SGMII_MODE, - .api_id = PM_MMIO_WRITE, - }, { .id = IOCTL_SD_DLL_RESET, .api_id = PM_MMIO_WRITE, diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_defs.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_defs.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_defs.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_defs.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.h b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.h similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.h rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.h diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/sip_svc_setup.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/sip_svc_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/sip_svc_setup.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/sip_svc_setup.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk similarity index 61% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk index f91a04c5f..1d6366f46 100644 --- a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk +++ b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/tsp/tsp-zynqmp.mk @@ -4,5 +4,7 @@ # SPDX-License-Identifier: BSD-3-Clause # TSP source files specific to ZynqMP platform -BL32_SOURCES += plat/common/aarch64/platform_mp_stack.S \ - plat/xilinx/zynqmp/tsp/tsp_plat_setup.c + +PLAT_XILINX_COMMON := plat/xilinx/common/ + +include ${PLAT_XILINX_COMMON}/tsp/tsp.mk diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/zynqmp_ehf.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/zynqmp_ehf.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/zynqmp_ehf.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/zynqmp_ehf.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/zynqmp_ipi.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/zynqmp_ipi.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/zynqmp_ipi.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/zynqmp_ipi.c diff --git a/atf-20231013-0ea67d76a/plat/xilinx/zynqmp/zynqmp_sdei.c b/atf-20240117-bacca82a8/plat/xilinx/zynqmp/zynqmp_sdei.c similarity index 100% rename from atf-20231013-0ea67d76a/plat/xilinx/zynqmp/zynqmp_sdei.c rename to atf-20240117-bacca82a8/plat/xilinx/zynqmp/zynqmp_sdei.c diff --git a/atf-20231013-0ea67d76a/poetry.lock b/atf-20240117-bacca82a8/poetry.lock similarity index 100% rename from atf-20231013-0ea67d76a/poetry.lock rename to atf-20240117-bacca82a8/poetry.lock diff --git a/atf-20231013-0ea67d76a/pyproject.toml b/atf-20240117-bacca82a8/pyproject.toml similarity index 97% rename from atf-20231013-0ea67d76a/pyproject.toml rename to atf-20240117-bacca82a8/pyproject.toml index 19ba4d84d..0fe238386 100644 --- a/atf-20231013-0ea67d76a/pyproject.toml +++ b/atf-20240117-bacca82a8/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "trusted-firmware-a" -version = "2.9.0" +version = "2.10.0" description = "Trusted Firmware-A (TF-A) Python dependencies." authors = ["Arm Ltd."] license = "BSD-3-Clause" diff --git a/atf-20231013-0ea67d76a/readme.rst b/atf-20240117-bacca82a8/readme.rst similarity index 100% rename from atf-20231013-0ea67d76a/readme.rst rename to atf-20240117-bacca82a8/readme.rst diff --git a/atf-20231013-0ea67d76a/services/arm_arch_svc/arm_arch_svc_setup.c b/atf-20240117-bacca82a8/services/arm_arch_svc/arm_arch_svc_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/services/arm_arch_svc/arm_arch_svc_setup.c rename to atf-20240117-bacca82a8/services/arm_arch_svc/arm_arch_svc_setup.c diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/opteed.mk b/atf-20240117-bacca82a8/services/spd/opteed/opteed.mk similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/opteed.mk rename to atf-20240117-bacca82a8/services/spd/opteed/opteed.mk diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/opteed_common.c b/atf-20240117-bacca82a8/services/spd/opteed/opteed_common.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/opteed_common.c rename to atf-20240117-bacca82a8/services/spd/opteed/opteed_common.c diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/opteed_helpers.S b/atf-20240117-bacca82a8/services/spd/opteed/opteed_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/opteed_helpers.S rename to atf-20240117-bacca82a8/services/spd/opteed/opteed_helpers.S diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/opteed_main.c b/atf-20240117-bacca82a8/services/spd/opteed/opteed_main.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/opteed_main.c rename to atf-20240117-bacca82a8/services/spd/opteed/opteed_main.c diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/opteed_pm.c b/atf-20240117-bacca82a8/services/spd/opteed/opteed_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/opteed_pm.c rename to atf-20240117-bacca82a8/services/spd/opteed/opteed_pm.c diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/opteed_private.h b/atf-20240117-bacca82a8/services/spd/opteed/opteed_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/opteed_private.h rename to atf-20240117-bacca82a8/services/spd/opteed/opteed_private.h diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/teesmc_opteed.h b/atf-20240117-bacca82a8/services/spd/opteed/teesmc_opteed.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/teesmc_opteed.h rename to atf-20240117-bacca82a8/services/spd/opteed/teesmc_opteed.h diff --git a/atf-20231013-0ea67d76a/services/spd/opteed/teesmc_opteed_macros.h b/atf-20240117-bacca82a8/services/spd/opteed/teesmc_opteed_macros.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/opteed/teesmc_opteed_macros.h rename to atf-20240117-bacca82a8/services/spd/opteed/teesmc_opteed_macros.h diff --git a/atf-20231013-0ea67d76a/services/spd/pncd/pncd.mk b/atf-20240117-bacca82a8/services/spd/pncd/pncd.mk similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/pncd/pncd.mk rename to atf-20240117-bacca82a8/services/spd/pncd/pncd.mk diff --git a/atf-20231013-0ea67d76a/services/spd/pncd/pncd_common.c b/atf-20240117-bacca82a8/services/spd/pncd/pncd_common.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/pncd/pncd_common.c rename to atf-20240117-bacca82a8/services/spd/pncd/pncd_common.c diff --git a/atf-20231013-0ea67d76a/services/spd/pncd/pncd_helpers.S b/atf-20240117-bacca82a8/services/spd/pncd/pncd_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/pncd/pncd_helpers.S rename to atf-20240117-bacca82a8/services/spd/pncd/pncd_helpers.S diff --git a/atf-20231013-0ea67d76a/services/spd/pncd/pncd_main.c b/atf-20240117-bacca82a8/services/spd/pncd/pncd_main.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/pncd/pncd_main.c rename to atf-20240117-bacca82a8/services/spd/pncd/pncd_main.c diff --git a/atf-20231013-0ea67d76a/services/spd/pncd/pncd_private.h b/atf-20240117-bacca82a8/services/spd/pncd/pncd_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/pncd/pncd_private.h rename to atf-20240117-bacca82a8/services/spd/pncd/pncd_private.h diff --git a/atf-20231013-0ea67d76a/services/spd/tlkd/tlkd.mk b/atf-20240117-bacca82a8/services/spd/tlkd/tlkd.mk similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tlkd/tlkd.mk rename to atf-20240117-bacca82a8/services/spd/tlkd/tlkd.mk diff --git a/atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_common.c b/atf-20240117-bacca82a8/services/spd/tlkd/tlkd_common.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_common.c rename to atf-20240117-bacca82a8/services/spd/tlkd/tlkd_common.c diff --git a/atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_helpers.S b/atf-20240117-bacca82a8/services/spd/tlkd/tlkd_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_helpers.S rename to atf-20240117-bacca82a8/services/spd/tlkd/tlkd_helpers.S diff --git a/atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_main.c b/atf-20240117-bacca82a8/services/spd/tlkd/tlkd_main.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_main.c rename to atf-20240117-bacca82a8/services/spd/tlkd/tlkd_main.c diff --git a/atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_pm.c b/atf-20240117-bacca82a8/services/spd/tlkd/tlkd_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_pm.c rename to atf-20240117-bacca82a8/services/spd/tlkd/tlkd_pm.c diff --git a/atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_private.h b/atf-20240117-bacca82a8/services/spd/tlkd/tlkd_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tlkd/tlkd_private.h rename to atf-20240117-bacca82a8/services/spd/tlkd/tlkd_private.h diff --git a/atf-20231013-0ea67d76a/services/spd/trusty/generic-arm64-smcall.c b/atf-20240117-bacca82a8/services/spd/trusty/generic-arm64-smcall.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/trusty/generic-arm64-smcall.c rename to atf-20240117-bacca82a8/services/spd/trusty/generic-arm64-smcall.c diff --git a/atf-20231013-0ea67d76a/services/spd/trusty/generic-arm64-smcall.h b/atf-20240117-bacca82a8/services/spd/trusty/generic-arm64-smcall.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/trusty/generic-arm64-smcall.h rename to atf-20240117-bacca82a8/services/spd/trusty/generic-arm64-smcall.h diff --git a/atf-20231013-0ea67d76a/services/spd/trusty/sm_err.h b/atf-20240117-bacca82a8/services/spd/trusty/sm_err.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/trusty/sm_err.h rename to atf-20240117-bacca82a8/services/spd/trusty/sm_err.h diff --git a/atf-20231013-0ea67d76a/services/spd/trusty/smcall.h b/atf-20240117-bacca82a8/services/spd/trusty/smcall.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/trusty/smcall.h rename to atf-20240117-bacca82a8/services/spd/trusty/smcall.h diff --git a/atf-20231013-0ea67d76a/services/spd/trusty/trusty.c b/atf-20240117-bacca82a8/services/spd/trusty/trusty.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/trusty/trusty.c rename to atf-20240117-bacca82a8/services/spd/trusty/trusty.c diff --git a/atf-20231013-0ea67d76a/services/spd/trusty/trusty.mk b/atf-20240117-bacca82a8/services/spd/trusty/trusty.mk similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/trusty/trusty.mk rename to atf-20240117-bacca82a8/services/spd/trusty/trusty.mk diff --git a/atf-20231013-0ea67d76a/services/spd/trusty/trusty_helpers.S b/atf-20240117-bacca82a8/services/spd/trusty/trusty_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/trusty/trusty_helpers.S rename to atf-20240117-bacca82a8/services/spd/trusty/trusty_helpers.S diff --git a/atf-20231013-0ea67d76a/services/spd/tspd/tspd.mk b/atf-20240117-bacca82a8/services/spd/tspd/tspd.mk similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tspd/tspd.mk rename to atf-20240117-bacca82a8/services/spd/tspd/tspd.mk diff --git a/atf-20231013-0ea67d76a/services/spd/tspd/tspd_common.c b/atf-20240117-bacca82a8/services/spd/tspd/tspd_common.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tspd/tspd_common.c rename to atf-20240117-bacca82a8/services/spd/tspd/tspd_common.c diff --git a/atf-20231013-0ea67d76a/services/spd/tspd/tspd_helpers.S b/atf-20240117-bacca82a8/services/spd/tspd/tspd_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tspd/tspd_helpers.S rename to atf-20240117-bacca82a8/services/spd/tspd/tspd_helpers.S diff --git a/atf-20231013-0ea67d76a/services/spd/tspd/tspd_main.c b/atf-20240117-bacca82a8/services/spd/tspd/tspd_main.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tspd/tspd_main.c rename to atf-20240117-bacca82a8/services/spd/tspd/tspd_main.c diff --git a/atf-20231013-0ea67d76a/services/spd/tspd/tspd_pm.c b/atf-20240117-bacca82a8/services/spd/tspd/tspd_pm.c similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tspd/tspd_pm.c rename to atf-20240117-bacca82a8/services/spd/tspd/tspd_pm.c diff --git a/atf-20231013-0ea67d76a/services/spd/tspd/tspd_private.h b/atf-20240117-bacca82a8/services/spd/tspd/tspd_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/spd/tspd/tspd_private.h rename to atf-20240117-bacca82a8/services/spd/tspd/tspd_private.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_dma_prot.c b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_dma_prot.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_dma_prot.c rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_dma_prot.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_dma_prot.h b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_dma_prot.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_dma_prot.h rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_dma_prot.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_main.c b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_main.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_main.c rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_main.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_main.h b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_main.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_main.h rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_main.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_measurements.c b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_measurements.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_measurements.c rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_measurements.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_measurements.h b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_measurements.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_measurements.h rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_measurements.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_remediation.c b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_remediation.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_remediation.c rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_remediation.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_remediation.h b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_remediation.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_remediation.h rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_remediation.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_res_address_map.c b/atf-20240117-bacca82a8/services/std_svc/drtm/drtm_res_address_map.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/drtm/drtm_res_address_map.c rename to atf-20240117-bacca82a8/services/std_svc/drtm/drtm_res_address_map.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/errata_abi/cpu_errata_info.h b/atf-20240117-bacca82a8/services/std_svc/errata_abi/cpu_errata_info.h similarity index 98% rename from atf-20231013-0ea67d76a/services/std_svc/errata_abi/cpu_errata_info.h rename to atf-20240117-bacca82a8/services/std_svc/errata_abi/cpu_errata_info.h index e24a6217e..02dd3a872 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/errata_abi/cpu_errata_info.h +++ b/atf-20240117-bacca82a8/services/std_svc/errata_abi/cpu_errata_info.h @@ -13,6 +13,7 @@ #if __aarch64__ #include #include +#include #include #include #include diff --git a/atf-20231013-0ea67d76a/services/std_svc/errata_abi/errata_abi_main.c b/atf-20240117-bacca82a8/services/std_svc/errata_abi/errata_abi_main.c similarity index 76% rename from atf-20231013-0ea67d76a/services/std_svc/errata_abi/errata_abi_main.c rename to atf-20240117-bacca82a8/services/std_svc/errata_abi/errata_abi_main.c index c0a089b14..537cb5cfc 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/errata_abi/errata_abi_main.c +++ b/atf-20240117-bacca82a8/services/std_svc/errata_abi/errata_abi_main.c @@ -163,10 +163,12 @@ struct em_cpu_list cpu_list[] = { [5] = {1262606, 0x00, 0x30, ERRATA_A76_1262606}, [6] = {1262888, 0x00, 0x30, ERRATA_A76_1262888}, [7] = {1275112, 0x00, 0x30, ERRATA_A76_1275112}, - [8] = {1791580, 0x00, 0x40, ERRATA_A76_1791580}, - [9] = {1868343, 0x00, 0x40, ERRATA_A76_1868343}, - [10] = {1946160, 0x30, 0x41, ERRATA_A76_1946160}, - [11 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [8] = {1286807, 0x00, 0x30, ERRATA_A76_1286807}, + [9] = {1791580, 0x00, 0x40, ERRATA_A76_1791580}, + [10] = {1868343, 0x00, 0x40, ERRATA_A76_1868343}, + [11] = {1946160, 0x30, 0x41, ERRATA_A76_1946160}, + [12] = {2743102, 0x00, 0x41, ERRATA_A76_2743102}, + [13 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* CORTEX_A76_H_INC */ @@ -216,7 +218,7 @@ struct em_cpu_list cpu_list[] = { .cpu_errata_list = { [0] = {1941500, 0x00, 0x01, ERRATA_A78_AE_1941500}, [1] = {1951502, 0x00, 0x01, ERRATA_A78_AE_1951502}, - [2] = {2376748, 0x00, 0x01, ERRATA_A78_AE_2376748}, + [2] = {2376748, 0x00, 0x02, ERRATA_A78_AE_2376748}, [3] = {2395408, 0x00, 0x01, ERRATA_A78_AE_2395408}, [4] = {2712574, 0x00, 0x02, ERRATA_A78_AE_2712574, \ ERRATA_NON_ARM_INTERCONNECT}, @@ -229,15 +231,18 @@ struct em_cpu_list cpu_list[] = { { .cpu_partnumber = CORTEX_A78C_MIDR, .cpu_errata_list = { - [0] = {2132064, 0x01, 0x02, ERRATA_A78C_2132064}, - [1] = {2242638, 0x01, 0x02, ERRATA_A78C_2242638}, - [2] = {2376749, 0x01, 0x02, ERRATA_A78C_2376749}, - [3] = {2395411, 0x01, 0x02, ERRATA_A78C_2395411}, - [4] = {2712575, 0x01, 0x02, ERRATA_A78C_2712575, \ + [0] = {1827430, 0x00, 0x00, ERRATA_A78C_1827430}, + [1] = {1827440, 0x00, 0x00, ERRATA_A78C_1827440}, + [2] = {2132064, 0x01, 0x02, ERRATA_A78C_2132064}, + [3] = {2242638, 0x01, 0x02, ERRATA_A78C_2242638}, + [4] = {2376749, 0x01, 0x02, ERRATA_A78C_2376749}, + [5] = {2395411, 0x01, 0x02, ERRATA_A78C_2395411}, + [6] = {2712575, 0x01, 0x02, ERRATA_A78C_2712575, \ ERRATA_NON_ARM_INTERCONNECT}, - [5] = {2772121, 0x00, 0x02, ERRATA_A78C_2772121}, - [6] = {2779484, 0x01, 0x02, ERRATA_A78C_2779484}, - [7 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [7] = {2743232, 0x01, 0x02, ERRATA_A78C_2743232}, + [8] = {2772121, 0x00, 0x02, ERRATA_A78C_2772121}, + [9] = {2779484, 0x01, 0x02, ERRATA_A78C_2779484}, + [10 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* CORTEX_A78C_H_INC */ @@ -258,21 +263,22 @@ struct em_cpu_list cpu_list[] = { { .cpu_partnumber = NEOVERSE_N1_MIDR, .cpu_errata_list = { - [0] = {1073348, 0x00, 0x10, ERRATA_N1_1073348}, - [1] = {1130799, 0x00, 0x20, ERRATA_N1_1130799}, - [2] = {1165347, 0x00, 0x20, ERRATA_N1_1165347}, - [3] = {1207823, 0x00, 0x20, ERRATA_N1_1207823}, - [4] = {1220197, 0x00, 0x20, ERRATA_N1_1220197}, - [5] = {1257314, 0x00, 0x30, ERRATA_N1_1257314}, - [6] = {1262606, 0x00, 0x30, ERRATA_N1_1262606}, - [7] = {1262888, 0x00, 0x30, ERRATA_N1_1262888}, - [8] = {1275112, 0x00, 0x30, ERRATA_N1_1275112}, - [9] = {1315703, 0x00, 0x30, ERRATA_N1_1315703}, - [10] = {1542419, 0x30, 0x40, ERRATA_N1_1542419}, - [11] = {1868343, 0x00, 0x40, ERRATA_N1_1868343}, - [12] = {1946160, 0x30, 0x41, ERRATA_N1_1946160}, - [13] = {2743102, 0x00, 0x41, ERRATA_N1_2743102}, - [14 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [0] = {1043202, 0x00, 0x10, ERRATA_N1_1043202}, + [1] = {1073348, 0x00, 0x10, ERRATA_N1_1073348}, + [2] = {1130799, 0x00, 0x20, ERRATA_N1_1130799}, + [3] = {1165347, 0x00, 0x20, ERRATA_N1_1165347}, + [4] = {1207823, 0x00, 0x20, ERRATA_N1_1207823}, + [5] = {1220197, 0x00, 0x20, ERRATA_N1_1220197}, + [6] = {1257314, 0x00, 0x30, ERRATA_N1_1257314}, + [7] = {1262606, 0x00, 0x30, ERRATA_N1_1262606}, + [8] = {1262888, 0x00, 0x30, ERRATA_N1_1262888}, + [9] = {1275112, 0x00, 0x30, ERRATA_N1_1275112}, + [10] = {1315703, 0x00, 0x30, ERRATA_N1_1315703}, + [11] = {1542419, 0x30, 0x40, ERRATA_N1_1542419}, + [12] = {1868343, 0x00, 0x40, ERRATA_N1_1868343}, + [13] = {1946160, 0x30, 0x41, ERRATA_N1_1946160}, + [14] = {2743102, 0x00, 0x41, ERRATA_N1_2743102}, + [15 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* NEOVERSE_N1_H_INC */ @@ -281,23 +287,25 @@ struct em_cpu_list cpu_list[] = { { .cpu_partnumber = NEOVERSE_V1_MIDR, .cpu_errata_list = { - [0] = {1618635, 0x00, 0x0F, ERRATA_V1_1618635}, + [0] = {1618635, 0x00, 0x00, ERRATA_V1_1618635}, [1] = {1774420, 0x00, 0x10, ERRATA_V1_1774420}, [2] = {1791573, 0x00, 0x10, ERRATA_V1_1791573}, [3] = {1852267, 0x00, 0x10, ERRATA_V1_1852267}, [4] = {1925756, 0x00, 0x11, ERRATA_V1_1925756}, [5] = {1940577, 0x10, 0x11, ERRATA_V1_1940577}, [6] = {1966096, 0x10, 0x11, ERRATA_V1_1966096}, - [7] = {2108267, 0x00, 0x11, ERRATA_V1_2108267}, + [7] = {2108267, 0x00, 0x12, ERRATA_V1_2108267}, [8] = {2139242, 0x00, 0x11, ERRATA_V1_2139242}, [9] = {2216392, 0x10, 0x11, ERRATA_V1_2216392}, - [10] = {2294912, 0x00, 0x11, ERRATA_V1_2294912}, - [11] = {2372203, 0x00, 0x11, ERRATA_V1_2372203}, - [12] = {2701953, 0x00, 0x11, ERRATA_V1_2701953, \ + [10] = {2294912, 0x00, 0x12, ERRATA_V1_2294912}, + [11] = {2348377, 0x00, 0x11, ERRATA_V1_2348377}, + [12] = {2372203, 0x00, 0x11, ERRATA_V1_2372203}, + [13] = {2701953, 0x00, 0x11, ERRATA_V1_2701953, \ ERRATA_NON_ARM_INTERCONNECT}, - [13] = {2743093, 0x00, 0x12, ERRATA_V1_2743093}, - [14] = {2779461, 0x00, 0x12, ERRATA_V1_2779461}, - [15 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [14] = {2743093, 0x00, 0x12, ERRATA_V1_2743093}, + [15] = {2743233, 0x00, 0x12, ERRATA_V1_2743233}, + [16] = {2779461, 0x00, 0x12, ERRATA_V1_2779461}, + [17 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* NEOVERSE_V1_H_INC */ @@ -310,7 +318,7 @@ struct em_cpu_list cpu_list[] = { [1] = {2008768, 0x00, 0x20, ERRATA_A710_2008768}, [2] = {2017096, 0x00, 0x20, ERRATA_A710_2017096}, [3] = {2055002, 0x10, 0x20, ERRATA_A710_2055002}, - [4] = {2058056, 0x00, 0x20, ERRATA_A710_2058056}, + [4] = {2058056, 0x00, 0x21, ERRATA_A710_2058056}, [5] = {2081180, 0x00, 0x20, ERRATA_A710_2081180}, [6] = {2083908, 0x20, 0x20, ERRATA_A710_2083908}, [7] = {2136059, 0x00, 0x20, ERRATA_A710_2136059}, @@ -322,8 +330,10 @@ struct em_cpu_list cpu_list[] = { [13] = {2371105, 0x00, 0x20, ERRATA_A710_2371105}, [14] = {2701952, 0x00, 0x21, ERRATA_A710_2701952, \ ERRATA_NON_ARM_INTERCONNECT}, - [15] = {2768515, 0x00, 0x21, ERRATA_A710_2768515}, - [16 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [15] = {2742423, 0x00, 0x21, ERRATA_A710_2742423}, + [16] = {2768515, 0x00, 0x21, ERRATA_A710_2768515}, + [17] = {2778471, 0x00, 0x21, ERRATA_A710_2778471}, + [18 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* CORTEX_A710_H_INC */ @@ -336,7 +346,7 @@ struct em_cpu_list cpu_list[] = { [1] = {2009478, 0x00, 0x00, ERRATA_N2_2009478}, [2] = {2025414, 0x00, 0x00, ERRATA_N2_2025414}, [3] = {2067956, 0x00, 0x00, ERRATA_N2_2067956}, - [4] = {2138953, 0x00, 0x00, ERRATA_N2_2138953}, + [4] = {2138953, 0x00, 0x03, ERRATA_N2_2138953}, [5] = {2138956, 0x00, 0x00, ERRATA_N2_2138956}, [6] = {2138958, 0x00, 0x00, ERRATA_N2_2138958}, [7] = {2189731, 0x00, 0x00, ERRATA_N2_2189731}, @@ -344,14 +354,16 @@ struct em_cpu_list cpu_list[] = { [9] = {2242415, 0x00, 0x00, ERRATA_N2_2242415}, [10] = {2280757, 0x00, 0x00, ERRATA_N2_2280757}, [11] = {2326639, 0x00, 0x00, ERRATA_N2_2326639}, - [12] = {2376738, 0x00, 0x00, ERRATA_N2_2376738}, - [13] = {2388450, 0x00, 0x00, ERRATA_N2_2388450}, - [14] = {2728475, 0x00, 0x02, ERRATA_N2_2728475, \ + [12] = {2340933, 0x00, 0x00, ERRATA_N2_2340933}, + [13] = {2346952, 0x00, 0x02, ERRATA_N2_2346952}, + [14] = {2376738, 0x00, 0x00, ERRATA_N2_2376738}, + [15] = {2388450, 0x00, 0x00, ERRATA_N2_2388450}, + [16] = {2728475, 0x00, 0x02, ERRATA_N2_2728475, \ ERRATA_NON_ARM_INTERCONNECT}, - [15] = {2743014, 0x00, 0x02, ERRATA_N2_2743014}, - [16] = {2743089, 0x00, 0x02, ERRATA_N2_2743089}, - [17] = {2779511, 0x00, 0x02, ERRATA_N2_2779511}, - [18 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [17] = {2743014, 0x00, 0x02, ERRATA_N2_2743014}, + [18] = {2743089, 0x00, 0x02, ERRATA_N2_2743089}, + [19] = {2779511, 0x00, 0x02, ERRATA_N2_2779511}, + [20 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* NEOVERSE_N2_H_INC */ @@ -362,17 +374,19 @@ struct em_cpu_list cpu_list[] = { .cpu_errata_list = { [0] = {2002765, 0x00, 0x20, ERRATA_X2_2002765}, [1] = {2017096, 0x00, 0x20, ERRATA_X2_2017096}, - [2] = {2058056, 0x00, 0x20, ERRATA_X2_2058056}, + [2] = {2058056, 0x00, 0x21, ERRATA_X2_2058056}, [3] = {2081180, 0x00, 0x20, ERRATA_X2_2081180}, - [4] = {2083908, 0x00, 0x20, ERRATA_X2_2083908}, + [4] = {2083908, 0x20, 0x20, ERRATA_X2_2083908}, [5] = {2147715, 0x20, 0x20, ERRATA_X2_2147715}, [6] = {2216384, 0x00, 0x20, ERRATA_X2_2216384}, [7] = {2282622, 0x00, 0x21, ERRATA_X2_2282622}, - [8] = {2371105, 0x00, 0x21, ERRATA_X2_2371105}, + [8] = {2371105, 0x00, 0x20, ERRATA_X2_2371105}, [9] = {2701952, 0x00, 0x21, ERRATA_X2_2701952, \ ERRATA_NON_ARM_INTERCONNECT}, - [10] = {2768515, 0x00, 0x21, ERRATA_X2_2768515}, - [11 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [10] = {2742423, 0x00, 0x21, ERRATA_X2_2742423}, + [11] = {2768515, 0x00, 0x21, ERRATA_X2_2768515}, + [12] = {2778471, 0x00, 0x21, ERRATA_X2_2778471}, + [13 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* CORTEX_X2_H_INC */ @@ -384,15 +398,16 @@ struct em_cpu_list cpu_list[] = { [0] = {1922240, 0x00, 0x00, ERRATA_A510_1922240}, [1] = {2041909, 0x02, 0x02, ERRATA_A510_2041909}, [2] = {2042739, 0x00, 0x02, ERRATA_A510_2042739}, - [3] = {2172148, 0x00, 0x10, ERRATA_A510_2172148}, - [4] = {2218950, 0x00, 0x10, ERRATA_A510_2218950}, - [5] = {2250311, 0x00, 0x10, ERRATA_A510_2250311}, - [6] = {2288014, 0x00, 0x10, ERRATA_A510_2288014}, - [7] = {2347730, 0x00, 0x11, ERRATA_A510_2347730}, - [8] = {2371937, 0x00, 0x11, ERRATA_A510_2371937}, - [9] = {2666669, 0x00, 0x11, ERRATA_A510_2666669}, - [10] = {2684597, 0x00, 0x12, ERRATA_A510_2684597}, - [11 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [3] = {2080326, 0x02, 0x02, ERRATA_A510_2080326}, + [4] = {2172148, 0x00, 0x10, ERRATA_A510_2172148}, + [5] = {2218950, 0x00, 0x10, ERRATA_A510_2218950}, + [6] = {2250311, 0x00, 0x10, ERRATA_A510_2250311}, + [7] = {2288014, 0x00, 0x10, ERRATA_A510_2288014}, + [8] = {2347730, 0x00, 0x11, ERRATA_A510_2347730}, + [9] = {2371937, 0x00, 0x11, ERRATA_A510_2371937}, + [10] = {2666669, 0x00, 0x11, ERRATA_A510_2666669}, + [11] = {2684597, 0x00, 0x12, ERRATA_A510_2684597}, + [12 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* CORTEX_A510_H_INC */ @@ -402,13 +417,15 @@ struct em_cpu_list cpu_list[] = { .cpu_partnumber = NEOVERSE_V2_MIDR, .cpu_errata_list = { [0] = {2331132, 0x00, 0x02, ERRATA_V2_2331132}, - [1] = {2719103, 0x00, 0x01, ERRATA_V2_2719103, \ + [1] = {2618597, 0x00, 0x01, ERRATA_V2_2618597}, + [2] = {2662553, 0x00, 0x01, ERRATA_V2_2662553}, + [3] = {2719103, 0x00, 0x01, ERRATA_V2_2719103, \ ERRATA_NON_ARM_INTERCONNECT}, - [2] = {2719105, 0x00, 0x01, ERRATA_V2_2719105}, - [3] = {2743011, 0x00, 0x01, ERRATA_V2_2743011}, - [4] = {2779510, 0x00, 0x01, ERRATA_V2_2779510}, - [5] = {2801372, 0x00, 0x01, ERRATA_V2_2801372}, - [6 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [4] = {2719105, 0x00, 0x01, ERRATA_V2_2719105}, + [5] = {2743011, 0x00, 0x01, ERRATA_V2_2743011}, + [6] = {2779510, 0x00, 0x01, ERRATA_V2_2779510}, + [7] = {2801372, 0x00, 0x01, ERRATA_V2_2801372}, + [8 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* NEOVERSE_V2_H_INC */ @@ -432,10 +449,24 @@ struct em_cpu_list cpu_list[] = { [1] = {2313909, 0x00, 0x10, ERRATA_X3_2313909}, [2] = {2615812, 0x00, 0x11, ERRATA_X3_2615812}, [3] = {2742421, 0x00, 0x11, ERRATA_X3_2742421}, - [4 ... ERRATA_LIST_END] = UNDEF_ERRATA, + [4] = {2743088, 0x00, 0x11, ERRATA_X3_2743088}, + [5] = {2779509, 0x00, 0x11, ERRATA_X3_2779509}, + [6 ... ERRATA_LIST_END] = UNDEF_ERRATA, } }, #endif /* CORTEX_X3_H_INC */ + +#if CORTEX_A520_H_INC +{ + .cpu_partnumber = CORTEX_A520_MIDR, + .cpu_errata_list = { + [0] = {2630792, 0x00, 0x01, ERRATA_A520_2630792}, + [1] = {2858100, 0x00, 0x01, ERRATA_A520_2858100}, + [2 ... ERRATA_LIST_END] = UNDEF_ERRATA, + } +}, +#endif /* CORTEX_A520_H_INC */ + }; /* diff --git a/atf-20231013-0ea67d76a/services/std_svc/pci_svc.c b/atf-20240117-bacca82a8/services/std_svc/pci_svc.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/pci_svc.c rename to atf-20240117-bacca82a8/services/std_svc/pci_svc.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/aarch64/rmmd_helpers.S b/atf-20240117-bacca82a8/services/std_svc/rmmd/aarch64/rmmd_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/aarch64/rmmd_helpers.S rename to atf-20240117-bacca82a8/services/std_svc/rmmd/aarch64/rmmd_helpers.S diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd.mk b/atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd.mk similarity index 66% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd.mk rename to atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd.mk index bcf54e1b7..eae5031f4 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd.mk +++ b/atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2021-2022, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2021-2024, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -8,7 +8,10 @@ ifneq (${ARCH},aarch64) $(error "Error: RMMD is only supported on aarch64.") endif -include services/std_svc/rmmd/trp/trp.mk +# Include TRP makefile only if RMM is not defined. +ifeq ($(RMM),) + include services/std_svc/rmmd/trp/trp.mk +endif RMMD_SOURCES += $(addprefix services/std_svc/rmmd/, \ ${ARCH}/rmmd_helpers.S \ diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_attest.c b/atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_attest.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_attest.c rename to atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_attest.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_initial_context.h b/atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_initial_context.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_initial_context.h rename to atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_initial_context.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_main.c b/atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_main.c similarity index 94% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_main.c rename to atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_main.c index fa24a91ee..4ea074fd6 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_main.c +++ b/atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_main.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -118,32 +119,44 @@ static void rmm_el2_context_init(el2_sysregs_t *regs) /******************************************************************************* * Enable architecture extensions on first entry to Realm world. ******************************************************************************/ + static void manage_extensions_realm(cpu_context_t *ctx) { + pmuv3_enable(ctx); + + /* + * Enable access to TPIDR2_EL0 if SME/SME2 is enabled for Non Secure world. + */ + if (is_feat_sme_supported()) { + sme_enable(ctx); + } +} + +static void manage_extensions_realm_per_world(void) +{ + cm_el3_arch_init_per_world(&per_world_context[CPU_CONTEXT_REALM]); + if (is_feat_sve_supported()) { /* * Enable SVE and FPU in realm context when it is enabled for NS. * Realm manager must ensure that the SVE and FPU register * contexts are properly managed. */ - sve_enable(ctx); + sve_enable_per_world(&per_world_context[CPU_CONTEXT_REALM]); } /* NS can access this but Realm shouldn't */ if (is_feat_sys_reg_trace_supported()) { - sys_reg_trace_disable(ctx); + sys_reg_trace_disable_per_world(&per_world_context[CPU_CONTEXT_REALM]); } - pmuv3_enable(ctx); - /* - * If SME/SME2 is supported and enabled for NS world, then enables SME - * for Realm world. RMM will save/restore required registers that are - * shared with SVE/FPU so that Realm can use FPU or SVE. + * If SME/SME2 is supported and enabled for NS world, then disable trapping + * of SME instructions for Realm world. RMM will save/restore required + * registers that are shared with SVE/FPU so that Realm can use FPU or SVE. */ if (is_feat_sme_supported()) { - /* sme_enable() also enables SME2 if supported by hardware */ - sme_enable(ctx); + sme_enable_per_world(&per_world_context[CPU_CONTEXT_REALM]); } } @@ -160,6 +173,8 @@ static int32_t rmm_init(void) /* Enable architecture extensions */ manage_extensions_realm(&ctx->cpu_ctx); + manage_extensions_realm_per_world(); + /* Initialize RMM EL2 context. */ rmm_el2_context_init(&ctx->cpu_ctx.el2_sysregs_ctx); diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_private.h b/atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/rmmd_private.h rename to atf-20240117-bacca82a8/services/std_svc/rmmd/rmmd_private.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/linker.ld.S b/atf-20240117-bacca82a8/services/std_svc/rmmd/trp/linker.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/linker.ld.S rename to atf-20240117-bacca82a8/services/std_svc/rmmd/trp/linker.ld.S diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp.mk b/atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp.mk similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp.mk rename to atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp.mk diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_entry.S b/atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_entry.S similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_entry.S rename to atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_entry.S diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_helpers.c b/atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_helpers.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_helpers.c rename to atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_helpers.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_main.c b/atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_main.c similarity index 94% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_main.c rename to atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_main.c index 4eb3e1266..33f2fb088 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_main.c +++ b/atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_main.c @@ -106,11 +106,18 @@ void trp_main(void) /******************************************************************************* * Returning RMI version back to Normal World ******************************************************************************/ -static void trp_ret_rmi_version(struct trp_smc_result *smc_ret) +static void trp_ret_rmi_version(unsigned long long rmi_version, + struct trp_smc_result *smc_ret) { + if (rmi_version != RMI_ABI_VERSION) { + smc_ret->x[0] = RMI_ERROR_INPUT; + } else { + smc_ret->x[0] = RMI_SUCCESS; + } VERBOSE("RMM version is %u.%u\n", RMI_ABI_VERSION_MAJOR, RMI_ABI_VERSION_MINOR); - smc_ret->x[0] = RMI_ABI_VERSION; + smc_ret->x[1] = RMI_ABI_VERSION; + smc_ret->x[2] = RMI_ABI_VERSION; } /******************************************************************************* @@ -163,7 +170,7 @@ void trp_rmi_handler(unsigned long fid, switch (fid) { case RMI_RMM_REQ_VERSION: - trp_ret_rmi_version(smc_ret); + trp_ret_rmi_version(x1, smc_ret); break; case RMI_RMM_GRANULE_DELEGATE: trp_asc_mark_realm(x1, smc_ret); diff --git a/atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_private.h b/atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/rmmd/trp/trp_private.h rename to atf-20240117-bacca82a8/services/std_svc/rmmd/trp/trp_private.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_dispatch.S b/atf-20240117-bacca82a8/services/std_svc/sdei/sdei_dispatch.S similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_dispatch.S rename to atf-20240117-bacca82a8/services/std_svc/sdei/sdei_dispatch.S diff --git a/atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_event.c b/atf-20240117-bacca82a8/services/std_svc/sdei/sdei_event.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_event.c rename to atf-20240117-bacca82a8/services/std_svc/sdei/sdei_event.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_intr_mgmt.c b/atf-20240117-bacca82a8/services/std_svc/sdei/sdei_intr_mgmt.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_intr_mgmt.c rename to atf-20240117-bacca82a8/services/std_svc/sdei/sdei_intr_mgmt.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_main.c b/atf-20240117-bacca82a8/services/std_svc/sdei/sdei_main.c similarity index 99% rename from atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_main.c rename to atf-20240117-bacca82a8/services/std_svc/sdei/sdei_main.c index 44178eddd..59a1673df 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_main.c +++ b/atf-20240117-bacca82a8/services/std_svc/sdei/sdei_main.c @@ -35,8 +35,6 @@ #define LOWEST_INTR_PRIORITY 0xff -#define is_valid_affinity(_mpidr) (plat_core_pos_by_mpidr(_mpidr) >= 0) - CASSERT(PLAT_SDEI_CRITICAL_PRI < PLAT_SDEI_NORMAL_PRI, sdei_critical_must_have_higher_priority); @@ -262,7 +260,7 @@ static int validate_flags(uint64_t flags, uint64_t mpidr) /* Validate flags */ switch (flags) { case SDEI_REGF_RM_PE: - if (!is_valid_affinity(mpidr)) + if (!is_valid_mpidr(mpidr)) return SDEI_EINVAL; break; case SDEI_REGF_RM_ANY: @@ -710,8 +708,8 @@ static int sdei_interrupt_bind(unsigned int intr_num) sdei_ev_map_t *map; bool retry = true, shared_mapping; - /* SGIs are not allowed to be bound */ - if (plat_ic_is_sgi(intr_num) != 0) + /* Interrupt must be either PPI or SPI */ + if (!(plat_ic_is_ppi(intr_num) || plat_ic_is_spi(intr_num))) return SDEI_EINVAL; shared_mapping = (plat_ic_is_spi(intr_num) != 0); @@ -926,7 +924,7 @@ static int sdei_signal(int ev_num, uint64_t target_pe) return SDEI_EINVAL; /* Validate target */ - if (plat_core_pos_by_mpidr(target_pe) < 0) + if (!is_valid_mpidr(target_pe)) return SDEI_EINVAL; /* Raise SGI. Platform will validate target_pe */ diff --git a/atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_private.h b/atf-20240117-bacca82a8/services/std_svc/sdei/sdei_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_private.h rename to atf-20240117-bacca82a8/services/std_svc/sdei/sdei_private.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_state.c b/atf-20240117-bacca82a8/services/std_svc/sdei/sdei_state.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/sdei/sdei_state.c rename to atf-20240117-bacca82a8/services/std_svc/sdei/sdei_state.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/common/aarch64/spm_helpers.S b/atf-20240117-bacca82a8/services/std_svc/spm/common/aarch64/spm_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spm/common/aarch64/spm_helpers.S rename to atf-20240117-bacca82a8/services/std_svc/spm/common/aarch64/spm_helpers.S diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/aarch64/spm_mm_shim_exceptions.S b/atf-20240117-bacca82a8/services/std_svc/spm/common/aarch64/spm_shim_exceptions.S similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/aarch64/spm_mm_shim_exceptions.S rename to atf-20240117-bacca82a8/services/std_svc/spm/common/aarch64/spm_shim_exceptions.S diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/common/include/spm_common.h b/atf-20240117-bacca82a8/services/std_svc/spm/common/include/spm_common.h similarity index 83% rename from atf-20231013-0ea67d76a/services/std_svc/spm/common/include/spm_common.h rename to atf-20240117-bacca82a8/services/std_svc/spm/common/include/spm_common.h index 68805fc4d..c73691953 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/common/include/spm_common.h +++ b/atf-20240117-bacca82a8/services/std_svc/spm/common/include/spm_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -32,11 +32,15 @@ #ifndef __ASSEMBLER__ #include +#include /* Assembly helpers */ uint64_t spm_secure_partition_enter(uint64_t *c_rt_ctx); void __dead2 spm_secure_partition_exit(uint64_t c_rt_ctx, uint64_t ret); +/* Helper to obtain a reference to the SP's translation table context */ +xlat_ctx_t *spm_get_sp_xlat_context(void); + #endif /* __ASSEMBLER__ */ #endif /* SPM_COMMON_H */ diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_shim_private.h b/atf-20240117-bacca82a8/services/std_svc/spm/common/include/spm_shim_private.h similarity index 76% rename from atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_shim_private.h rename to atf-20240117-bacca82a8/services/std_svc/spm/common/include/spm_shim_private.h index f69c748ad..bcb11476e 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_shim_private.h +++ b/atf-20240117-bacca82a8/services/std_svc/spm/common/include/spm_shim_private.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef SPM_MM_SHIM_PRIVATE_H -#define SPM_MM_SHIM_PRIVATE_H +#ifndef SPM_SHIM_PRIVATE_H +#define SPM_SHIM_PRIVATE_H #include @@ -23,4 +23,4 @@ IMPORT_SYM(uintptr_t, __SPM_SHIM_EXCEPTIONS_END__, SPM_SHIM_EXCEPTIONS_END); #define SPM_SHIM_EXCEPTIONS_SIZE \ (SPM_SHIM_EXCEPTIONS_END - SPM_SHIM_EXCEPTIONS_START) -#endif /* SPM_MM_SHIM_PRIVATE_H */ +#endif /* SPM_SHIM_PRIVATE_H */ diff --git a/atf-20240117-bacca82a8/services/std_svc/spm/common/spm.mk b/atf-20240117-bacca82a8/services/std_svc/spm/common/spm.mk new file mode 100644 index 000000000..65fd72aa4 --- /dev/null +++ b/atf-20240117-bacca82a8/services/std_svc/spm/common/spm.mk @@ -0,0 +1,23 @@ +# +# Copyright (c) 2022-2023, ARM Limited and Contributors. All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +ifneq (${ARCH},aarch64) + $(error "Error: SPM is only supported on aarch64.") +endif + +INCLUDES += -Iservices/std_svc/spm/common/include + +SPM_SOURCES := $(addprefix services/std_svc/spm/common/, \ + ${ARCH}/spm_helpers.S \ + ${ARCH}/spm_shim_exceptions.S) + +ifeq (1, $(filter 1, ${SPM_MM} ${SPMC_AT_EL3_SEL0_SP})) +SPM_SOURCES += $(addprefix services/std_svc/spm/common/, \ + spm_xlat_common.c) +endif + +# Let the top-level Makefile know that we intend to include a BL32 image +NEED_BL32 := yes diff --git a/atf-20240117-bacca82a8/services/std_svc/spm/common/spm_xlat_common.c b/atf-20240117-bacca82a8/services/std_svc/spm/common/spm_xlat_common.c new file mode 100644 index 000000000..a463c8b49 --- /dev/null +++ b/atf-20240117-bacca82a8/services/std_svc/spm/common/spm_xlat_common.c @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include + +/* Place translation tables by default along with the ones used by BL31. */ +#ifndef PLAT_SP_IMAGE_XLAT_SECTION_NAME +#define PLAT_SP_IMAGE_XLAT_SECTION_NAME ".xlat_table" +#endif +#ifndef PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME +#define PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME ".bss" +#endif + +/* Allocate and initialise the translation context for the secure partitions. */ +REGISTER_XLAT_CONTEXT2(sp, + PLAT_SP_IMAGE_MMAP_REGIONS, + PLAT_SP_IMAGE_MAX_XLAT_TABLES, + PLAT_VIRT_ADDR_SPACE_SIZE, PLAT_PHY_ADDR_SPACE_SIZE, + EL1_EL0_REGIME, PLAT_SP_IMAGE_XLAT_SECTION_NAME, + PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME); + +/* Get handle of Secure Partition translation context */ +xlat_ctx_t *spm_get_sp_xlat_context(void) +{ + return &sp_xlat_ctx; +}; diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/logical_sp.c b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/logical_sp.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/logical_sp.c rename to atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/logical_sp.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc.h b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc.h similarity index 93% rename from atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc.h rename to atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc.h index 48644ac7f..e093a82b2 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc.h +++ b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2022-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -168,6 +168,12 @@ struct secure_partition_desc { /* Mailbox tracking. */ struct mailbox mailbox; + /* Lock to protect the runtime state of a S-EL0 SP execution context. */ + spinlock_t rt_state_lock; + + /* Pointer to translation table context of a S-EL0 SP. */ + xlat_ctx_t *xlat_ctx_handle; + /* Secondary entrypoint. Only valid for a S-EL1 SP. */ uintptr_t secondary_ep; @@ -224,6 +230,10 @@ void spmc_el1_sp_setup(struct secure_partition_desc *sp, entry_point_info_t *ep_info); void spmc_sp_common_ep_commit(struct secure_partition_desc *sp, entry_point_info_t *ep_info); +void spmc_el0_sp_spsr_setup(entry_point_info_t *ep_info); +void spmc_el0_sp_setup(struct secure_partition_desc *sp, + int32_t boot_info_reg, + void *sp_manifest); /* * Helper function to perform a synchronous entry into a SP. diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc.mk b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc.mk similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc.mk rename to atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc.mk diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_main.c b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_main.c similarity index 86% rename from atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_main.c rename to atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_main.c index ada6f455d..7978f0882 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_main.c +++ b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2022-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -30,6 +30,17 @@ #include +/* FFA_MEM_PERM_* helpers */ +#define FFA_MEM_PERM_MASK U(7) +#define FFA_MEM_PERM_DATA_MASK U(3) +#define FFA_MEM_PERM_DATA_SHIFT U(0) +#define FFA_MEM_PERM_DATA_NA U(0) +#define FFA_MEM_PERM_DATA_RW U(1) +#define FFA_MEM_PERM_DATA_RES U(2) +#define FFA_MEM_PERM_DATA_RO U(3) +#define FFA_MEM_PERM_INST_EXEC (U(0) << 2) +#define FFA_MEM_PERM_INST_NON_EXEC (U(1) << 2) + /* Declare the maximum number of SPs and El3 LPs. */ #define MAX_SP_LP_PARTITIONS SECURE_PARTITION_COUNT + MAX_EL3_LP_DESCS_COUNT @@ -390,6 +401,11 @@ static uint64_t direct_req_smc_handler(uint32_t smc_fid, FFA_ERROR_INVALID_PARAMETER); } + /* Protect the runtime state of a UP S-EL0 SP with a lock. */ + if (sp->runtime_el == S_EL0) { + spin_lock(&sp->rt_state_lock); + } + /* * Check that the target execution context is in a waiting state before * forwarding the direct request to it. @@ -398,6 +414,11 @@ static uint64_t direct_req_smc_handler(uint32_t smc_fid, if (sp->ec[idx].rt_state != RT_STATE_WAITING) { VERBOSE("SP context on core%u is not waiting (%u).\n", idx, sp->ec[idx].rt_model); + + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } + return spmc_ffa_error_return(handle, FFA_ERROR_BUSY); } @@ -408,6 +429,11 @@ static uint64_t direct_req_smc_handler(uint32_t smc_fid, sp->ec[idx].rt_state = RT_STATE_RUNNING; sp->ec[idx].rt_model = RT_MODEL_DIR_REQ; sp->ec[idx].dir_req_origin_id = src_id; + + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } + return spmc_smc_return(smc_fid, secure_origin, x1, x2, x3, x4, handle, cookie, flags, dst_id); } @@ -462,6 +488,10 @@ static uint64_t direct_resp_smc_handler(uint32_t smc_fid, FFA_ERROR_INVALID_PARAMETER); } + if (sp->runtime_el == S_EL0) { + spin_lock(&sp->rt_state_lock); + } + /* Sanity check state is being tracked correctly in the SPMC. */ idx = get_ec_index(sp); assert(sp->ec[idx].rt_state == RT_STATE_RUNNING); @@ -470,12 +500,18 @@ static uint64_t direct_resp_smc_handler(uint32_t smc_fid, if (sp->ec[idx].rt_model != RT_MODEL_DIR_REQ) { VERBOSE("SP context on core%u not handling direct req (%u).\n", idx, sp->ec[idx].rt_model); + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } return spmc_ffa_error_return(handle, FFA_ERROR_DENIED); } if (sp->ec[idx].dir_req_origin_id != dst_id) { WARN("Invalid direct resp partition ID 0x%x != 0x%x on core%u.\n", dst_id, sp->ec[idx].dir_req_origin_id, idx); + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } return spmc_ffa_error_return(handle, FFA_ERROR_DENIED); } @@ -485,6 +521,10 @@ static uint64_t direct_resp_smc_handler(uint32_t smc_fid, /* Clear the ongoing direct request ID. */ sp->ec[idx].dir_req_origin_id = INV_SP_ID; + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } + /* * If the receiver is not the SPMC then forward the response to the * Normal world. @@ -536,9 +576,15 @@ static uint64_t msg_wait_handler(uint32_t smc_fid, * Get the execution context of the SP that invoked FFA_MSG_WAIT. */ idx = get_ec_index(sp); + if (sp->runtime_el == S_EL0) { + spin_lock(&sp->rt_state_lock); + } /* Ensure SP execution context was in the right runtime model. */ if (sp->ec[idx].rt_model == RT_MODEL_DIR_REQ) { + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } return spmc_ffa_error_return(handle, FFA_ERROR_DENIED); } @@ -550,6 +596,9 @@ static uint64_t msg_wait_handler(uint32_t smc_fid, * state is updated after the exit. */ if (sp->ec[idx].rt_model == RT_MODEL_INIT) { + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } spmc_sp_synchronous_exit(&sp->ec[idx], x4); /* Should not get here */ panic(); @@ -567,9 +616,19 @@ static uint64_t msg_wait_handler(uint32_t smc_fid, cm_el1_sysregs_context_save(secure_state_in); cm_el1_sysregs_context_restore(secure_state_out); cm_set_next_eret_context(secure_state_out); + + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } + SMC_RET0(cm_get_context(secure_state_out)); } + /* Protect the runtime state of a S-EL0 SP with a lock. */ + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } + /* Forward the response to the Normal world. */ return spmc_smc_return(smc_fid, secure_origin, x1, x2, x3, x4, handle, cookie, flags, FFA_NWD_ID); @@ -1343,14 +1402,21 @@ static uint64_t ffa_run_handler(uint32_t smc_fid, } idx = get_ec_index(sp); + if (idx != vcpu_id) { ERROR("Cannot run vcpu %d != %d.\n", idx, vcpu_id); return spmc_ffa_error_return(handle, FFA_ERROR_INVALID_PARAMETER); } + if (sp->runtime_el == S_EL0) { + spin_lock(&sp->rt_state_lock); + } rt_state = &((sp->ec[idx]).rt_state); rt_model = &((sp->ec[idx]).rt_model); if (*rt_state == RT_STATE_RUNNING) { + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } ERROR("Partition (0x%x) is already running.\n", target_id); return spmc_ffa_error_return(handle, FFA_ERROR_BUSY); } @@ -1377,6 +1443,10 @@ static uint64_t ffa_run_handler(uint32_t smc_fid, */ *rt_state = RT_STATE_RUNNING; + if (sp->runtime_el == S_EL0) { + spin_unlock(&sp->rt_state_lock); + } + return spmc_smc_return(smc_fid, secure_origin, x1, 0, 0, 0, handle, cookie, flags, target_id); } @@ -1504,6 +1574,223 @@ static uint64_t ffa_sec_ep_register_handler(uint32_t smc_fid, SMC_RET1(handle, FFA_SUCCESS_SMC32); } +/******************************************************************************* + * Permissions are encoded using a different format in the FFA_MEM_PERM_* ABIs + * than in the Trusted Firmware, where the mmap_attr_t enum type is used. This + * function converts a permission value from the FF-A format to the mmap_attr_t + * format by setting MT_RW/MT_RO, MT_USER/MT_PRIVILEGED and + * MT_EXECUTE/MT_EXECUTE_NEVER. The other fields are left as 0 because they are + * ignored by the function xlat_change_mem_attributes_ctx(). + ******************************************************************************/ +static unsigned int ffa_perm_to_mmap_perm(unsigned int perms) +{ + unsigned int tf_attr = 0U; + unsigned int access; + + /* Deal with data access permissions first. */ + access = (perms & FFA_MEM_PERM_DATA_MASK) >> FFA_MEM_PERM_DATA_SHIFT; + + switch (access) { + case FFA_MEM_PERM_DATA_RW: + /* Return 0 if the execute is set with RW. */ + if ((perms & FFA_MEM_PERM_INST_NON_EXEC) != 0) { + tf_attr |= MT_RW | MT_USER | MT_EXECUTE_NEVER; + } + break; + + case FFA_MEM_PERM_DATA_RO: + tf_attr |= MT_RO | MT_USER; + /* Deal with the instruction access permissions next. */ + if ((perms & FFA_MEM_PERM_INST_NON_EXEC) == 0) { + tf_attr |= MT_EXECUTE; + } else { + tf_attr |= MT_EXECUTE_NEVER; + } + break; + + case FFA_MEM_PERM_DATA_NA: + default: + return tf_attr; + } + + return tf_attr; +} + +/******************************************************************************* + * Handler to set the permissions of a set of contiguous pages of a S-EL0 SP + ******************************************************************************/ +static uint64_t ffa_mem_perm_set_handler(uint32_t smc_fid, + bool secure_origin, + uint64_t x1, + uint64_t x2, + uint64_t x3, + uint64_t x4, + void *cookie, + void *handle, + uint64_t flags) +{ + struct secure_partition_desc *sp; + unsigned int idx; + uintptr_t base_va = (uintptr_t) x1; + size_t size = (size_t)(x2 * PAGE_SIZE); + uint32_t tf_attr; + int ret; + + /* This request cannot originate from the Normal world. */ + if (!secure_origin) { + return spmc_ffa_error_return(handle, FFA_ERROR_NOT_SUPPORTED); + } + + if (size == 0) { + return spmc_ffa_error_return(handle, + FFA_ERROR_INVALID_PARAMETER); + } + + /* Get the context of the current SP. */ + sp = spmc_get_current_sp_ctx(); + if (sp == NULL) { + return spmc_ffa_error_return(handle, + FFA_ERROR_INVALID_PARAMETER); + } + + /* A S-EL1 SP has no business invoking this ABI. */ + if (sp->runtime_el == S_EL1) { + return spmc_ffa_error_return(handle, FFA_ERROR_DENIED); + } + + if ((x3 & ~((uint64_t)FFA_MEM_PERM_MASK)) != 0) { + return spmc_ffa_error_return(handle, + FFA_ERROR_INVALID_PARAMETER); + } + + /* Get the execution context of the calling SP. */ + idx = get_ec_index(sp); + + /* + * Ensure that the S-EL0 SP is initialising itself. We do not need to + * synchronise this operation through a spinlock since a S-EL0 SP is UP + * and can only be initialising on this cpu. + */ + if (sp->ec[idx].rt_model != RT_MODEL_INIT) { + return spmc_ffa_error_return(handle, FFA_ERROR_DENIED); + } + + VERBOSE("Setting memory permissions:\n"); + VERBOSE(" Start address : 0x%lx\n", base_va); + VERBOSE(" Number of pages: %lu (%zu bytes)\n", x2, size); + VERBOSE(" Attributes : 0x%x\n", (uint32_t)x3); + + /* Convert inbound permissions to TF-A permission attributes */ + tf_attr = ffa_perm_to_mmap_perm((unsigned int)x3); + if (tf_attr == 0U) { + return spmc_ffa_error_return(handle, + FFA_ERROR_INVALID_PARAMETER); + } + + /* Request the change in permissions */ + ret = xlat_change_mem_attributes_ctx(sp->xlat_ctx_handle, + base_va, size, tf_attr); + if (ret != 0) { + return spmc_ffa_error_return(handle, + FFA_ERROR_INVALID_PARAMETER); + } + + SMC_RET1(handle, FFA_SUCCESS_SMC32); +} + +/******************************************************************************* + * Permissions are encoded using a different format in the FFA_MEM_PERM_* ABIs + * than in the Trusted Firmware, where the mmap_attr_t enum type is used. This + * function converts a permission value from the mmap_attr_t format to the FF-A + * format. + ******************************************************************************/ +static unsigned int mmap_perm_to_ffa_perm(unsigned int attr) +{ + unsigned int perms = 0U; + unsigned int data_access; + + if ((attr & MT_USER) == 0) { + /* No access from EL0. */ + data_access = FFA_MEM_PERM_DATA_NA; + } else { + if ((attr & MT_RW) != 0) { + data_access = FFA_MEM_PERM_DATA_RW; + } else { + data_access = FFA_MEM_PERM_DATA_RO; + } + } + + perms |= (data_access & FFA_MEM_PERM_DATA_MASK) + << FFA_MEM_PERM_DATA_SHIFT; + + if ((attr & MT_EXECUTE_NEVER) != 0U) { + perms |= FFA_MEM_PERM_INST_NON_EXEC; + } + + return perms; +} + +/******************************************************************************* + * Handler to get the permissions of a set of contiguous pages of a S-EL0 SP + ******************************************************************************/ +static uint64_t ffa_mem_perm_get_handler(uint32_t smc_fid, + bool secure_origin, + uint64_t x1, + uint64_t x2, + uint64_t x3, + uint64_t x4, + void *cookie, + void *handle, + uint64_t flags) +{ + struct secure_partition_desc *sp; + unsigned int idx; + uintptr_t base_va = (uintptr_t)x1; + uint32_t tf_attr = 0; + int ret; + + /* This request cannot originate from the Normal world. */ + if (!secure_origin) { + return spmc_ffa_error_return(handle, FFA_ERROR_NOT_SUPPORTED); + } + + /* Get the context of the current SP. */ + sp = spmc_get_current_sp_ctx(); + if (sp == NULL) { + return spmc_ffa_error_return(handle, + FFA_ERROR_INVALID_PARAMETER); + } + + /* A S-EL1 SP has no business invoking this ABI. */ + if (sp->runtime_el == S_EL1) { + return spmc_ffa_error_return(handle, FFA_ERROR_DENIED); + } + + /* Get the execution context of the calling SP. */ + idx = get_ec_index(sp); + + /* + * Ensure that the S-EL0 SP is initialising itself. We do not need to + * synchronise this operation through a spinlock since a S-EL0 SP is UP + * and can only be initialising on this cpu. + */ + if (sp->ec[idx].rt_model != RT_MODEL_INIT) { + return spmc_ffa_error_return(handle, FFA_ERROR_DENIED); + } + + /* Request the permissions */ + ret = xlat_get_mem_attributes_ctx(sp->xlat_ctx_handle, base_va, &tf_attr); + if (ret != 0) { + return spmc_ffa_error_return(handle, + FFA_ERROR_INVALID_PARAMETER); + } + + /* Convert TF-A permission to FF-A permissions attributes. */ + x2 = mmap_perm_to_ffa_perm(tf_attr); + + SMC_RET3(handle, FFA_SUCCESS_SMC32, 0, x2); +} + /******************************************************************************* * This function will parse the Secure Partition Manifest. From manifest, it * will fetch details for preparing Secure partition image context and secure @@ -1588,7 +1875,7 @@ static int sp_manifest_parse(void *sp_manifest, int offset, * since this is currently a hardcoded value for S-EL1 partitions * we don't need to save it here, just validate. */ - if (config_32 != PLATFORM_CORE_COUNT) { + if ((sp->runtime_el == S_EL1) && (config_32 != PLATFORM_CORE_COUNT)) { ERROR("SP Execution Context Count (%u) must be %u.\n", config_32, PLATFORM_CORE_COUNT); return -EINVAL; @@ -1615,6 +1902,11 @@ static int sp_manifest_parse(void *sp_manifest, int offset, if (ret != 0) { WARN("Missing Power Management Messages entry.\n"); } else { + if ((sp->runtime_el == S_EL0) && (config_32 != 0)) { + ERROR("Power messages not supported for S-EL0 SP\n"); + return -EINVAL; + } + /* * Ensure only the currently supported power messages have * been requested. @@ -1704,7 +1996,8 @@ static int find_and_prepare_sp_context(void) * the manifest as boot information later. */ next_image_ep_info->args.arg1 = fdt_totalsize(sp_manifest); - INFO("Manifest size = %lu bytes.\n", next_image_ep_info->args.arg1); + INFO("Manifest adr = %lx , size = %lu bytes\n", manifest_base, + next_image_ep_info->args.arg1); /* * Select an SP descriptor for initialising the partition's execution @@ -1712,6 +2005,11 @@ static int find_and_prepare_sp_context(void) */ sp = spmc_get_current_sp_ctx(); +#if SPMC_AT_EL3_SEL0_SP + /* Assign translation tables context. */ + sp_desc->xlat_ctx_handle = spm_get_sp_xlat_context(); + +#endif /* SPMC_AT_EL3_SEL0_SP */ /* Initialize entry point information for the SP */ SET_PARAM_HEAD(next_image_ep_info, PARAM_EP, VERSION_1, SECURE | EP_ST_ENABLE); @@ -1725,7 +2023,7 @@ static int find_and_prepare_sp_context(void) } /* Check that the runtime EL in the manifest was correct. */ - if (sp->runtime_el != S_EL1) { + if (sp->runtime_el != S_EL0 && sp->runtime_el != S_EL1) { ERROR("Unexpected runtime EL: %d\n", sp->runtime_el); return -EINVAL; } @@ -1734,11 +2032,29 @@ static int find_and_prepare_sp_context(void) spmc_sp_common_setup(sp, next_image_ep_info, boot_info_reg); /* Perform any initialisation specific to S-EL1 SPs. */ - spmc_el1_sp_setup(sp, next_image_ep_info); + if (sp->runtime_el == S_EL1) { + spmc_el1_sp_setup(sp, next_image_ep_info); + } + +#if SPMC_AT_EL3_SEL0_SP + /* Setup spsr in endpoint info for common context management routine. */ + if (sp->runtime_el == S_EL0) { + spmc_el0_sp_spsr_setup(next_image_ep_info); + } +#endif /* SPMC_AT_EL3_SEL0_SP */ /* Initialize the SP context with the required ep info. */ spmc_sp_common_ep_commit(sp, next_image_ep_info); +#if SPMC_AT_EL3_SEL0_SP + /* + * Perform any initialisation specific to S-EL0 not set by common + * context management routine. + */ + if (sp->runtime_el == S_EL0) { + spmc_el0_sp_setup(sp, boot_info_reg, sp_manifest); + } +#endif /* SPMC_AT_EL3_SEL0_SP */ return 0; } @@ -2051,6 +2367,14 @@ uint64_t spmc_smc_handler(uint32_t smc_fid, return spmc_ffa_mem_reclaim(smc_fid, secure_origin, x1, x2, x3, x4, cookie, handle, flags); + case FFA_MEM_PERM_GET: + return ffa_mem_perm_get_handler(smc_fid, secure_origin, x1, x2, + x3, x4, cookie, handle, flags); + + case FFA_MEM_PERM_SET: + return ffa_mem_perm_set_handler(smc_fid, secure_origin, x1, x2, + x3, x4, cookie, handle, flags); + default: WARN("Unsupported FF-A call 0x%08x.\n", smc_fid); break; diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_pm.c b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_pm.c similarity index 94% rename from atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_pm.c rename to atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_pm.c index c7e864f37..517d6d5ee 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_pm.c +++ b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_pm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2022-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -36,7 +36,7 @@ static void spmc_build_pm_message(gp_regs_t *gpregs, } /******************************************************************************* - * This CPU has been turned on. Enter the SP to initialise S-EL1. + * This CPU has been turned on. Enter the SP to initialise S-EL0 or S-EL1. ******************************************************************************/ static void spmc_cpu_on_finish_handler(u_register_t unused) { @@ -49,6 +49,19 @@ static void spmc_cpu_on_finish_handler(u_register_t unused) /* Sanity check for a NULL pointer dereference. */ assert(sp != NULL); + /* Obtain a reference to the SP execution context */ + ec = &sp->ec[get_ec_index(sp)]; + + /* + * In case of a S-EL0 SP, only initialise the context data structure for + * the secure world on this cpu and return. + */ + if (sp->runtime_el == S_EL0) { + /* Assign the context of the SP to this CPU */ + cm_set_context(&(ec->cpu_ctx), SECURE); + return; + } + /* Initialize entry point information for the SP. */ SET_PARAM_HEAD(&sec_ec_ep_info, PARAM_EP, VERSION_1, SECURE | EP_ST_ENABLE); diff --git a/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_setup.c b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_setup.c new file mode 100644 index 000000000..609d968b9 --- /dev/null +++ b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_setup.c @@ -0,0 +1,589 @@ +/* + * Copyright (c) 2022, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "spm_common.h" +#include "spm_shim_private.h" +#include "spmc.h" +#include + +#include + +/* + * Statically allocate a page of memory for passing boot information to an SP. + */ +static uint8_t ffa_boot_info_mem[PAGE_SIZE] __aligned(PAGE_SIZE); + +/* + * We need to choose one execution context from all those available for a S-EL0 + * SP. This execution context will be used subsequently irrespective of which + * physical CPU the SP runs on. + */ +#define SEL0_SP_EC_INDEX 0 +#define SP_MEM_READ 0x1 +#define SP_MEM_WRITE 0x2 +#define SP_MEM_EXECUTE 0x4 +#define SP_MEM_NON_SECURE 0x8 +#define SP_MEM_READ_ONLY SP_MEM_READ +#define SP_MEM_READ_WRITE (SP_MEM_READ | SP_MEM_WRITE) + +/* Type of the memory region in SP's manifest. */ +enum sp_memory_region_type { + SP_MEM_REGION_DEVICE, + SP_MEM_REGION_MEMORY, + SP_MEM_REGION_NOT_SPECIFIED +}; + +/* + * This function creates a initialization descriptor in the memory reserved + * for passing boot information to an SP. It then copies the partition manifest + * into this region and ensures that its reference in the initialization + * descriptor is updated. + */ +static void spmc_create_boot_info(entry_point_info_t *ep_info, + struct secure_partition_desc *sp) +{ + struct ffa_boot_info_header *boot_header; + struct ffa_boot_info_desc *boot_descriptor; + uintptr_t manifest_addr; + + /* + * Calculate the maximum size of the manifest that can be accommodated + * in the boot information memory region. + */ + const unsigned int + max_manifest_sz = sizeof(ffa_boot_info_mem) - + (sizeof(struct ffa_boot_info_header) + + sizeof(struct ffa_boot_info_desc)); + + /* + * The current implementation only supports the FF-A v1.1 + * implementation of the boot protocol, therefore check + * that a v1.0 SP has not requested use of the protocol. + */ + if (sp->ffa_version == MAKE_FFA_VERSION(1, 0)) { + ERROR("FF-A boot protocol not supported for v1.0 clients\n"); + return; + } + + /* + * Check if the manifest will fit into the boot info memory region else + * bail. + */ + if (ep_info->args.arg1 > max_manifest_sz) { + WARN("Unable to copy manifest into boot information. "); + WARN("Max sz = %u bytes. Manifest sz = %lu bytes\n", + max_manifest_sz, ep_info->args.arg1); + return; + } + + /* Zero the memory region before populating. */ + memset(ffa_boot_info_mem, 0, PAGE_SIZE); + + /* + * Populate the ffa_boot_info_header at the start of the boot info + * region. + */ + boot_header = (struct ffa_boot_info_header *) ffa_boot_info_mem; + + /* Position the ffa_boot_info_desc after the ffa_boot_info_header. */ + boot_header->offset_boot_info_desc = + sizeof(struct ffa_boot_info_header); + boot_descriptor = (struct ffa_boot_info_desc *) + (ffa_boot_info_mem + + boot_header->offset_boot_info_desc); + + /* + * We must use the FF-A version corresponding to the version implemented + * by the SP. Currently this can only be v1.1. + */ + boot_header->version = sp->ffa_version; + + /* Populate the boot information header. */ + boot_header->size_boot_info_desc = sizeof(struct ffa_boot_info_desc); + + /* Set the signature "0xFFA". */ + boot_header->signature = FFA_INIT_DESC_SIGNATURE; + + /* Set the count. Currently 1 since only the manifest is specified. */ + boot_header->count_boot_info_desc = 1; + + /* Populate the boot information descriptor for the manifest. */ + boot_descriptor->type = + FFA_BOOT_INFO_TYPE(FFA_BOOT_INFO_TYPE_STD) | + FFA_BOOT_INFO_TYPE_ID(FFA_BOOT_INFO_TYPE_ID_FDT); + + boot_descriptor->flags = + FFA_BOOT_INFO_FLAG_NAME(FFA_BOOT_INFO_FLAG_NAME_UUID) | + FFA_BOOT_INFO_FLAG_CONTENT(FFA_BOOT_INFO_FLAG_CONTENT_ADR); + + /* + * Copy the manifest into boot info region after the boot information + * descriptor. + */ + boot_descriptor->size_boot_info = (uint32_t) ep_info->args.arg1; + + manifest_addr = (uintptr_t) (ffa_boot_info_mem + + boot_header->offset_boot_info_desc + + boot_header->size_boot_info_desc); + + memcpy((void *) manifest_addr, (void *) ep_info->args.arg0, + boot_descriptor->size_boot_info); + + boot_descriptor->content = manifest_addr; + + /* Calculate the size of the total boot info blob. */ + boot_header->size_boot_info_blob = boot_header->offset_boot_info_desc + + boot_descriptor->size_boot_info + + (boot_header->count_boot_info_desc * + boot_header->size_boot_info_desc); + + INFO("SP boot info @ 0x%lx, size: %u bytes.\n", + (uintptr_t) ffa_boot_info_mem, + boot_header->size_boot_info_blob); + INFO("SP manifest @ 0x%lx, size: %u bytes.\n", + boot_descriptor->content, + boot_descriptor->size_boot_info); +} + +/* + * S-EL1 partitions can be assigned with multiple execution contexts, each + * pinned to the physical CPU. Each execution context index corresponds to the + * respective liner core position. + * S-EL0 partitions execute in a single execution context (index 0). + */ +unsigned int get_ec_index(struct secure_partition_desc *sp) +{ + return (sp->runtime_el == S_EL0) ? + SEL0_SP_EC_INDEX : plat_my_core_pos(); +} + +#if SPMC_AT_EL3_SEL0_SP +/* Setup spsr in entry point info for common context management code to use. */ +void spmc_el0_sp_spsr_setup(entry_point_info_t *ep_info) +{ + /* Setup Secure Partition SPSR for S-EL0 SP. */ + ep_info->spsr = SPSR_64(MODE_EL0, MODE_SP_EL0, DISABLE_ALL_EXCEPTIONS); +} + +static void read_optional_string(void *manifest, int32_t offset, + char *property, char *out, size_t len) +{ + const fdt32_t *prop; + int lenp; + + prop = fdt_getprop(manifest, offset, property, &lenp); + if (prop == NULL) { + out[0] = '\0'; + } else { + memcpy(out, prop, MIN(lenp, (int)len)); + } +} + +/******************************************************************************* + * This function will parse the Secure Partition Manifest for fetching secure + * partition specific memory/device region details. It will find base address, + * size, memory attributes for each region and then add the respective region + * into secure parition's translation context. + ******************************************************************************/ +static void populate_sp_regions(struct secure_partition_desc *sp, + void *sp_manifest, int node, + enum sp_memory_region_type type) +{ + uintptr_t base_address; + uint32_t mem_attr, mem_region, size; + struct mmap_region sp_mem_regions = {0}; + int32_t offset, ret; + char *compatibility[SP_MEM_REGION_NOT_SPECIFIED] = { + "arm,ffa-manifest-device-regions", + "arm,ffa-manifest-memory-regions" + }; + char description[10]; + char *property; + char *region[SP_MEM_REGION_NOT_SPECIFIED] = { + "device regions", + "memory regions" + }; + + if (type >= SP_MEM_REGION_NOT_SPECIFIED) { + WARN("Invalid region type\n"); + return; + } + + INFO("Mapping SP's %s\n", region[type]); + + if (fdt_node_check_compatible(sp_manifest, node, + compatibility[type]) != 0) { + WARN("Incompatible region node in manifest\n"); + return; + } + + for (offset = fdt_first_subnode(sp_manifest, node), mem_region = 0; + offset >= 0; + offset = fdt_next_subnode(sp_manifest, offset), mem_region++) { + read_optional_string(sp_manifest, offset, "description", + description, sizeof(description)); + + INFO("Mapping: region: %d, %s\n", mem_region, description); + + property = "base-address"; + ret = fdt_read_uint64(sp_manifest, offset, property, + &base_address); + if (ret < 0) { + WARN("Missing:%s for %s.\n", property, description); + continue; + } + + property = "pages-count"; + ret = fdt_read_uint32(sp_manifest, offset, property, &size); + if (ret < 0) { + WARN("Missing: %s for %s.\n", property, description); + continue; + } + size *= PAGE_SIZE; + + property = "attributes"; + ret = fdt_read_uint32(sp_manifest, offset, property, &mem_attr); + if (ret < 0) { + WARN("Missing: %s for %s.\n", property, description); + continue; + } + + sp_mem_regions.attr = MT_USER; + if (type == SP_MEM_REGION_DEVICE) { + sp_mem_regions.attr |= MT_EXECUTE_NEVER; + } else { + sp_mem_regions.attr |= MT_MEMORY; + if ((mem_attr & SP_MEM_EXECUTE) == SP_MEM_EXECUTE) { + sp_mem_regions.attr &= ~MT_EXECUTE_NEVER; + } else { + sp_mem_regions.attr |= MT_EXECUTE_NEVER; + } + } + + if ((mem_attr & SP_MEM_READ_WRITE) == SP_MEM_READ_WRITE) { + sp_mem_regions.attr |= MT_RW; + } + + if ((mem_attr & SP_MEM_NON_SECURE) == SP_MEM_NON_SECURE) { + sp_mem_regions.attr |= MT_NS; + } else { + sp_mem_regions.attr |= MT_SECURE; + } + + sp_mem_regions.base_pa = base_address; + sp_mem_regions.base_va = base_address; + sp_mem_regions.size = size; + + INFO("Adding PA: 0x%llx VA: 0x%lx Size: 0x%lx attr:0x%x\n", + sp_mem_regions.base_pa, + sp_mem_regions.base_va, + sp_mem_regions.size, + sp_mem_regions.attr); + + if (type == SP_MEM_REGION_DEVICE) { + sp_mem_regions.granularity = XLAT_BLOCK_SIZE(1); + } else { + sp_mem_regions.granularity = XLAT_BLOCK_SIZE(3); + } + mmap_add_region_ctx(sp->xlat_ctx_handle, &sp_mem_regions); + } +} + +static void spmc_el0_sp_setup_mmu(struct secure_partition_desc *sp, + cpu_context_t *ctx) +{ + xlat_ctx_t *xlat_ctx; + uint64_t mmu_cfg_params[MMU_CFG_PARAM_MAX]; + + xlat_ctx = sp->xlat_ctx_handle; + init_xlat_tables_ctx(sp->xlat_ctx_handle); + setup_mmu_cfg((uint64_t *)&mmu_cfg_params, 0, xlat_ctx->base_table, + xlat_ctx->pa_max_address, xlat_ctx->va_max_address, + EL1_EL0_REGIME); + + write_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_MAIR_EL1, + mmu_cfg_params[MMU_CFG_MAIR]); + + write_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_TCR_EL1, + mmu_cfg_params[MMU_CFG_TCR]); + + write_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_TTBR0_EL1, + mmu_cfg_params[MMU_CFG_TTBR0]); +} + +static void spmc_el0_sp_setup_sctlr_el1(cpu_context_t *ctx) +{ + u_register_t sctlr_el1; + + /* Setup SCTLR_EL1 */ + sctlr_el1 = read_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_SCTLR_EL1); + + sctlr_el1 |= + /*SCTLR_EL1_RES1 |*/ + /* Don't trap DC CVAU, DC CIVAC, DC CVAC, DC CVAP, or IC IVAU */ + SCTLR_UCI_BIT | + /* RW regions at xlat regime EL1&0 are forced to be XN. */ + SCTLR_WXN_BIT | + /* Don't trap to EL1 execution of WFI or WFE at EL0. */ + SCTLR_NTWI_BIT | SCTLR_NTWE_BIT | + /* Don't trap to EL1 accesses to CTR_EL0 from EL0. */ + SCTLR_UCT_BIT | + /* Don't trap to EL1 execution of DZ ZVA at EL0. */ + SCTLR_DZE_BIT | + /* Enable SP Alignment check for EL0 */ + SCTLR_SA0_BIT | + /* Don't change PSTATE.PAN on taking an exception to EL1 */ + SCTLR_SPAN_BIT | + /* Allow cacheable data and instr. accesses to normal memory. */ + SCTLR_C_BIT | SCTLR_I_BIT | + /* Enable MMU. */ + SCTLR_M_BIT; + + sctlr_el1 &= ~( + /* Explicit data accesses at EL0 are little-endian. */ + SCTLR_E0E_BIT | + /* + * Alignment fault checking disabled when at EL1 and EL0 as + * the UEFI spec permits unaligned accesses. + */ + SCTLR_A_BIT | + /* Accesses to DAIF from EL0 are trapped to EL1. */ + SCTLR_UMA_BIT + ); + + write_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_SCTLR_EL1, sctlr_el1); +} + +static void spmc_el0_sp_setup_system_registers(struct secure_partition_desc *sp, + cpu_context_t *ctx) +{ + + spmc_el0_sp_setup_mmu(sp, ctx); + + spmc_el0_sp_setup_sctlr_el1(ctx); + + /* Setup other system registers. */ + + /* Shim Exception Vector Base Address */ + write_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_VBAR_EL1, + SPM_SHIM_EXCEPTIONS_PTR); +#if NS_TIMER_SWITCH + write_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_CNTKCTL_EL1, + EL0PTEN_BIT | EL0VTEN_BIT | EL0PCTEN_BIT | EL0VCTEN_BIT); +#endif + + /* + * FPEN: Allow the Secure Partition to access FP/SIMD registers. + * Note that SPM will not do any saving/restoring of these registers on + * behalf of the SP. This falls under the SP's responsibility. + * TTA: Enable access to trace registers. + * ZEN (v8.2): Trap SVE instructions and access to SVE registers. + */ + write_ctx_reg(get_el1_sysregs_ctx(ctx), CTX_CPACR_EL1, + CPACR_EL1_FPEN(CPACR_EL1_FP_TRAP_NONE)); +} + +/* Setup context of an EL0 Secure Partition. */ +void spmc_el0_sp_setup(struct secure_partition_desc *sp, + int32_t boot_info_reg, + void *sp_manifest) +{ + mmap_region_t sel1_exception_vectors = + MAP_REGION_FLAT(SPM_SHIM_EXCEPTIONS_START, + SPM_SHIM_EXCEPTIONS_SIZE, + MT_CODE | MT_SECURE | MT_PRIVILEGED); + cpu_context_t *ctx; + int node; + int offset = 0; + + ctx = &sp->ec[SEL0_SP_EC_INDEX].cpu_ctx; + + sp->xlat_ctx_handle->xlat_regime = EL1_EL0_REGIME; + + /* This region contains the exception vectors used at S-EL1. */ + mmap_add_region_ctx(sp->xlat_ctx_handle, + &sel1_exception_vectors); + + /* + * If the SP manifest specified the register to pass the address of the + * boot information, then map the memory region to pass boot + * information. + */ + if (boot_info_reg >= 0) { + mmap_region_t ffa_boot_info_region = MAP_REGION_FLAT( + (uintptr_t) ffa_boot_info_mem, + PAGE_SIZE, + MT_RO_DATA | MT_SECURE | MT_USER); + mmap_add_region_ctx(sp->xlat_ctx_handle, &ffa_boot_info_region); + } + + /* + * Parse the manifest for any device regions that the SP wants to be + * mapped in its translation regime. + */ + node = fdt_subnode_offset_namelen(sp_manifest, offset, + "device-regions", + sizeof("device-regions") - 1); + if (node < 0) { + WARN("Not found device-region configuration for SP.\n"); + } else { + populate_sp_regions(sp, sp_manifest, node, + SP_MEM_REGION_DEVICE); + } + + /* + * Parse the manifest for any memory regions that the SP wants to be + * mapped in its translation regime. + */ + node = fdt_subnode_offset_namelen(sp_manifest, offset, + "memory-regions", + sizeof("memory-regions") - 1); + if (node < 0) { + WARN("Not found memory-region configuration for SP.\n"); + } else { + populate_sp_regions(sp, sp_manifest, node, + SP_MEM_REGION_MEMORY); + } + + spmc_el0_sp_setup_system_registers(sp, ctx); + +} +#endif /* SPMC_AT_EL3_SEL0_SP */ + +/* S-EL1 partition specific initialisation. */ +void spmc_el1_sp_setup(struct secure_partition_desc *sp, + entry_point_info_t *ep_info) +{ + /* Sanity check input arguments. */ + assert(sp != NULL); + assert(ep_info != NULL); + + /* Initialise the SPSR for S-EL1 SPs. */ + ep_info->spsr = SPSR_64(MODE_EL1, MODE_SP_ELX, + DISABLE_ALL_EXCEPTIONS); + + /* + * TF-A Implementation defined behaviour to provide the linear + * core ID in the x4 register. + */ + ep_info->args.arg4 = (uintptr_t) plat_my_core_pos(); + + /* + * Check whether setup is being performed for the primary or a secondary + * execution context. In the latter case, indicate to the SP that this + * is a warm boot. + * TODO: This check would need to be reworked if the same entry point is + * used for both primary and secondary initialisation. + */ + if (sp->secondary_ep != 0U) { + /* + * Sanity check that the secondary entry point is still what was + * originally set. + */ + assert(sp->secondary_ep == ep_info->pc); + ep_info->args.arg0 = FFA_WB_TYPE_S2RAM; + } +} + +/* Common initialisation for all SPs. */ +void spmc_sp_common_setup(struct secure_partition_desc *sp, + entry_point_info_t *ep_info, + int32_t boot_info_reg) +{ + uint16_t sp_id; + + /* Assign FF-A Partition ID if not already assigned. */ + if (sp->sp_id == INV_SP_ID) { + sp_id = FFA_SP_ID_BASE + ACTIVE_SP_DESC_INDEX; + /* + * Ensure we don't clash with previously assigned partition + * IDs. + */ + while (!is_ffa_secure_id_valid(sp_id)) { + sp_id++; + + if (sp_id == FFA_SWD_ID_LIMIT) { + ERROR("Unable to determine valid SP ID.\n"); + panic(); + } + } + sp->sp_id = sp_id; + } + + /* Check if the SP wants to use the FF-A boot protocol. */ + if (boot_info_reg >= 0) { + /* + * Create a boot information descriptor and copy the partition + * manifest into the reserved memory region for consumption by + * the SP. + */ + spmc_create_boot_info(ep_info, sp); + + /* + * We have consumed what we need from ep args so we can now + * zero them before we start populating with new information + * specifically for the SP. + */ + zeromem(&ep_info->args, sizeof(ep_info->args)); + + /* + * Pass the address of the boot information in the + * boot_info_reg. + */ + switch (boot_info_reg) { + case 0: + ep_info->args.arg0 = (uintptr_t) ffa_boot_info_mem; + break; + case 1: + ep_info->args.arg1 = (uintptr_t) ffa_boot_info_mem; + break; + case 2: + ep_info->args.arg2 = (uintptr_t) ffa_boot_info_mem; + break; + case 3: + ep_info->args.arg3 = (uintptr_t) ffa_boot_info_mem; + break; + default: + ERROR("Invalid value for \"gp-register-num\" %d.\n", + boot_info_reg); + } + } else { + /* + * We don't need any of the information that was populated + * in ep_args so we can clear them. + */ + zeromem(&ep_info->args, sizeof(ep_info->args)); + } +} + +/* + * Initialise the SP context now we have populated the common and EL specific + * entrypoint information. + */ +void spmc_sp_common_ep_commit(struct secure_partition_desc *sp, + entry_point_info_t *ep_info) +{ + cpu_context_t *cpu_ctx; + + cpu_ctx = &(spmc_get_sp_ec(sp)->cpu_ctx); + print_entry_point_info(ep_info); + cm_setup_context(cpu_ctx, ep_info); +} diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_shared_mem.c b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_shared_mem.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_shared_mem.c rename to atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_shared_mem.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_shared_mem.h b/atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_shared_mem.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spm/el3_spmc/spmc_shared_mem.h rename to atf-20240117-bacca82a8/services/std_svc/spm/el3_spmc/spmc_shared_mem.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm.mk b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm.mk similarity index 96% rename from atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm.mk rename to atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm.mk index 513e8ef96..cbc794020 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm.mk +++ b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm.mk @@ -21,7 +21,6 @@ ifeq (${CTX_INCLUDE_FPREGS},0) endif SPM_MM_SOURCES := $(addprefix services/std_svc/spm/spm_mm/, \ - ${ARCH}/spm_mm_shim_exceptions.S \ spm_mm_main.c \ spm_mm_setup.c \ spm_mm_xlat.c) diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_main.c b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_main.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_main.c rename to atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_main.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_private.h b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_private.h similarity index 93% rename from atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_private.h rename to atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_private.h index 0eff1c071..3a52a3ee8 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_private.h +++ b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_private.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -55,8 +55,6 @@ typedef struct sp_context { void spm_sp_setup(sp_context_t *sp_ctx); -xlat_ctx_t *spm_get_sp_xlat_context(void); - int32_t spm_memory_attributes_get_smc_handler(sp_context_t *sp_ctx, uintptr_t base_va); int spm_memory_attributes_set_smc_handler(sp_context_t *sp_ctx, diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_setup.c b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_setup.c similarity index 98% rename from atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_setup.c rename to atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_setup.c index 04dc21291..4e65c9cb1 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_setup.c +++ b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_setup.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2021, NVIDIA Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -21,7 +21,7 @@ #include "spm_common.h" #include "spm_mm_private.h" -#include "spm_mm_shim_private.h" +#include "spm_shim_private.h" /* Setup context of the Secure Partition */ void spm_sp_setup(sp_context_t *sp_ctx) diff --git a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_xlat.c b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_xlat.c similarity index 81% rename from atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_xlat.c rename to atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_xlat.c index b1ca55ae3..01d95c77c 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spm/spm_mm/spm_mm_xlat.c +++ b/atf-20240117-bacca82a8/services/std_svc/spm/spm_mm/spm_mm_xlat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -15,33 +15,11 @@ #include #include "spm_mm_private.h" -#include "spm_mm_shim_private.h" - -/* Place translation tables by default along with the ones used by BL31. */ -#ifndef PLAT_SP_IMAGE_XLAT_SECTION_NAME -#define PLAT_SP_IMAGE_XLAT_SECTION_NAME ".xlat_table" -#endif -#ifndef PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME -#define PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME ".bss" -#endif - -/* Allocate and initialise the translation context for the secure partitions. */ -REGISTER_XLAT_CONTEXT2(sp, - PLAT_SP_IMAGE_MMAP_REGIONS, - PLAT_SP_IMAGE_MAX_XLAT_TABLES, - PLAT_VIRT_ADDR_SPACE_SIZE, PLAT_PHY_ADDR_SPACE_SIZE, - EL1_EL0_REGIME, PLAT_SP_IMAGE_XLAT_SECTION_NAME, - PLAT_SP_IMAGE_BASE_XLAT_SECTION_NAME); +#include "spm_shim_private.h" /* Lock used for SP_MEMORY_ATTRIBUTES_GET and SP_MEMORY_ATTRIBUTES_SET */ static spinlock_t mem_attr_smc_lock; -/* Get handle of Secure Partition translation context */ -xlat_ctx_t *spm_get_sp_xlat_context(void) -{ - return &sp_xlat_ctx; -}; - /* * Attributes are encoded using a different format in the SMC interface than in * the Trusted Firmware, where the mmap_attr_t enum type is used. This function diff --git a/atf-20231013-0ea67d76a/services/std_svc/spmd/aarch64/spmd_helpers.S b/atf-20240117-bacca82a8/services/std_svc/spmd/aarch64/spmd_helpers.S similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spmd/aarch64/spmd_helpers.S rename to atf-20240117-bacca82a8/services/std_svc/spmd/aarch64/spmd_helpers.S diff --git a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd.mk b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd.mk similarity index 81% rename from atf-20231013-0ea67d76a/services/std_svc/spmd/spmd.mk rename to atf-20240117-bacca82a8/services/std_svc/spmd/spmd.mk index 72376f757..e567b5300 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd.mk +++ b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd.mk @@ -4,14 +4,6 @@ # SPDX-License-Identifier: BSD-3-Clause # -ifneq (${ARCH},aarch64) - $(error "Error: SPMD is only supported on aarch64.") -endif - -ifneq (${ENABLE_SME_FOR_NS},0) - $(error "Error: SPMD is not compatible with ENABLE_SME_FOR_NS") -endif - SPMD_SOURCES += $(addprefix services/std_svc/spmd/, \ ${ARCH}/spmd_helpers.S \ spmd_pm.c \ diff --git a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_logical_sp.c b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd_logical_sp.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_logical_sp.c rename to atf-20240117-bacca82a8/services/std_svc/spmd/spmd_logical_sp.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_main.c b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd_main.c similarity index 96% rename from atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_main.c rename to atf-20240117-bacca82a8/services/std_svc/spmd/spmd_main.c index d830403fc..066571e9b 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_main.c +++ b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd_main.c @@ -110,6 +110,12 @@ void spmd_build_spmc_message(gp_regs_t *gpregs, uint8_t target_func, spmd_spmc_id_get()); write_ctx_reg(gpregs, CTX_GPREG_X2, BIT(31) | target_func); write_ctx_reg(gpregs, CTX_GPREG_X3, message); + + /* Zero out x4-x7 for the direct request emitted towards the SPMC. */ + write_ctx_reg(gpregs, CTX_GPREG_X4, 0); + write_ctx_reg(gpregs, CTX_GPREG_X5, 0); + write_ctx_reg(gpregs, CTX_GPREG_X6, 0); + write_ctx_reg(gpregs, CTX_GPREG_X7, 0); } @@ -945,6 +951,21 @@ uint64_t spmd_smc_handler(uint32_t smc_fid, SPMD_FWK_MSG_FFA_VERSION_REQ, input_version); + /* + * Ensure x8-x17 NS GP register values are untouched when returning + * from the SPMC. + */ + write_ctx_reg(gpregs, CTX_GPREG_X8, SMC_GET_GP(handle, CTX_GPREG_X8)); + write_ctx_reg(gpregs, CTX_GPREG_X9, SMC_GET_GP(handle, CTX_GPREG_X9)); + write_ctx_reg(gpregs, CTX_GPREG_X10, SMC_GET_GP(handle, CTX_GPREG_X10)); + write_ctx_reg(gpregs, CTX_GPREG_X11, SMC_GET_GP(handle, CTX_GPREG_X11)); + write_ctx_reg(gpregs, CTX_GPREG_X12, SMC_GET_GP(handle, CTX_GPREG_X12)); + write_ctx_reg(gpregs, CTX_GPREG_X13, SMC_GET_GP(handle, CTX_GPREG_X13)); + write_ctx_reg(gpregs, CTX_GPREG_X14, SMC_GET_GP(handle, CTX_GPREG_X14)); + write_ctx_reg(gpregs, CTX_GPREG_X15, SMC_GET_GP(handle, CTX_GPREG_X15)); + write_ctx_reg(gpregs, CTX_GPREG_X16, SMC_GET_GP(handle, CTX_GPREG_X16)); + write_ctx_reg(gpregs, CTX_GPREG_X17, SMC_GET_GP(handle, CTX_GPREG_X17)); + rc = spmd_spm_core_sync_entry(ctx); if ((rc != 0ULL) || @@ -959,6 +980,14 @@ uint64_t spmd_smc_handler(uint32_t smc_fid, ret = SMC_GET_GP(gpregs, CTX_GPREG_X3); } + /* + * x0-x4 are updated by spmd_smc_forward below. + * Zero out x5-x7 in the FFA_VERSION response. + */ + write_ctx_reg(gpregs, CTX_GPREG_X5, 0); + write_ctx_reg(gpregs, CTX_GPREG_X6, 0); + write_ctx_reg(gpregs, CTX_GPREG_X7, 0); + /* * Return here after SPMC has handled FFA_VERSION. * The returned SPMC version is held in X3. diff --git a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_pm.c b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd_pm.c similarity index 87% rename from atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_pm.c rename to atf-20240117-bacca82a8/services/std_svc/spmd/spmd_pm.c index a2704dd81..fd89c8138 100644 --- a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_pm.c +++ b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd_pm.c @@ -122,8 +122,20 @@ static int32_t spmd_cpu_off_handler(u_register_t unused) assert(ctx->state != SPMC_STATE_OFF); /* Build an SPMD to SPMC direct message request. */ - spmd_build_spmc_message(get_gpregs_ctx(&ctx->cpu_ctx), - FFA_FWK_MSG_PSCI, PSCI_CPU_OFF); + gp_regs_t *gpregs = get_gpregs_ctx(&ctx->cpu_ctx); + spmd_build_spmc_message(gpregs, FFA_FWK_MSG_PSCI, PSCI_CPU_OFF); + + /* Clear remaining x8 - x17 at EL3/SEL2 or EL3/SEL1 boundary. */ + write_ctx_reg(gpregs, CTX_GPREG_X8, 0); + write_ctx_reg(gpregs, CTX_GPREG_X9, 0); + write_ctx_reg(gpregs, CTX_GPREG_X10, 0); + write_ctx_reg(gpregs, CTX_GPREG_X11, 0); + write_ctx_reg(gpregs, CTX_GPREG_X12, 0); + write_ctx_reg(gpregs, CTX_GPREG_X13, 0); + write_ctx_reg(gpregs, CTX_GPREG_X14, 0); + write_ctx_reg(gpregs, CTX_GPREG_X15, 0); + write_ctx_reg(gpregs, CTX_GPREG_X16, 0); + write_ctx_reg(gpregs, CTX_GPREG_X17, 0); rc = spmd_spm_core_sync_entry(ctx); if (rc != 0ULL) { diff --git a/atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_private.h b/atf-20240117-bacca82a8/services/std_svc/spmd/spmd_private.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/spmd/spmd_private.h rename to atf-20240117-bacca82a8/services/std_svc/spmd/spmd_private.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/std_svc_setup.c b/atf-20240117-bacca82a8/services/std_svc/std_svc_setup.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/std_svc_setup.c rename to atf-20240117-bacca82a8/services/std_svc/std_svc_setup.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/trng/trng_entropy_pool.c b/atf-20240117-bacca82a8/services/std_svc/trng/trng_entropy_pool.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/trng/trng_entropy_pool.c rename to atf-20240117-bacca82a8/services/std_svc/trng/trng_entropy_pool.c diff --git a/atf-20231013-0ea67d76a/services/std_svc/trng/trng_entropy_pool.h b/atf-20240117-bacca82a8/services/std_svc/trng/trng_entropy_pool.h similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/trng/trng_entropy_pool.h rename to atf-20240117-bacca82a8/services/std_svc/trng/trng_entropy_pool.h diff --git a/atf-20231013-0ea67d76a/services/std_svc/trng/trng_main.c b/atf-20240117-bacca82a8/services/std_svc/trng/trng_main.c similarity index 100% rename from atf-20231013-0ea67d76a/services/std_svc/trng/trng_main.c rename to atf-20240117-bacca82a8/services/std_svc/trng/trng_main.c diff --git a/atf-20231013-0ea67d76a/tools/amlogic/Makefile b/atf-20240117-bacca82a8/tools/amlogic/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/amlogic/Makefile rename to atf-20240117-bacca82a8/tools/amlogic/Makefile diff --git a/atf-20231013-0ea67d76a/tools/amlogic/doimage.c b/atf-20240117-bacca82a8/tools/amlogic/doimage.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/amlogic/doimage.c rename to atf-20240117-bacca82a8/tools/amlogic/doimage.c diff --git a/atf-20231013-0ea67d76a/tools/bl2plimage/.gitignore b/atf-20240117-bacca82a8/tools/bl2plimage/.gitignore similarity index 100% rename from atf-20231013-0ea67d76a/tools/bl2plimage/.gitignore rename to atf-20240117-bacca82a8/tools/bl2plimage/.gitignore diff --git a/atf-20231013-0ea67d76a/tools/bl2plimage/Makefile b/atf-20240117-bacca82a8/tools/bl2plimage/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/bl2plimage/Makefile rename to atf-20240117-bacca82a8/tools/bl2plimage/Makefile diff --git a/atf-20231013-0ea67d76a/tools/bl2plimage/bl2plimage.c b/atf-20240117-bacca82a8/tools/bl2plimage/bl2plimage.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/bl2plimage/bl2plimage.c rename to atf-20240117-bacca82a8/tools/bl2plimage/bl2plimage.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/Makefile b/atf-20240117-bacca82a8/tools/cert_create/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/Makefile rename to atf-20240117-bacca82a8/tools/cert_create/Makefile diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/cca/cca_cot.h b/atf-20240117-bacca82a8/tools/cert_create/include/cca/cca_cot.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/cca/cca_cot.h rename to atf-20240117-bacca82a8/tools/cert_create/include/cca/cca_cot.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/cert.h b/atf-20240117-bacca82a8/tools/cert_create/include/cert.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/cert.h rename to atf-20240117-bacca82a8/tools/cert_create/include/cert.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/cmd_opt.h b/atf-20240117-bacca82a8/tools/cert_create/include/cmd_opt.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/cmd_opt.h rename to atf-20240117-bacca82a8/tools/cert_create/include/cmd_opt.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/debug.h b/atf-20240117-bacca82a8/tools/cert_create/include/debug.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/debug.h rename to atf-20240117-bacca82a8/tools/cert_create/include/debug.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/dualroot/cot.h b/atf-20240117-bacca82a8/tools/cert_create/include/dualroot/cot.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/dualroot/cot.h rename to atf-20240117-bacca82a8/tools/cert_create/include/dualroot/cot.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/ext.h b/atf-20240117-bacca82a8/tools/cert_create/include/ext.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/ext.h rename to atf-20240117-bacca82a8/tools/cert_create/include/ext.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/key.h b/atf-20240117-bacca82a8/tools/cert_create/include/key.h similarity index 94% rename from atf-20231013-0ea67d76a/tools/cert_create/include/key.h rename to atf-20240117-bacca82a8/tools/cert_create/include/key.h index 312575b44..e0ecdaed2 100644 --- a/atf-20231013-0ea67d76a/tools/cert_create/include/key.h +++ b/atf-20240117-bacca82a8/tools/cert_create/include/key.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -44,7 +44,7 @@ enum{ static const unsigned int KEY_SIZES[KEY_ALG_MAX_NUM][KEY_SIZE_MAX_NUM] = { { 2048, 1024, 3072, 4096 }, /* KEY_ALG_RSA */ #ifndef OPENSSL_NO_EC - {}, /* KEY_ALG_ECDSA_NIST */ + { 256, 384 }, /* KEY_ALG_ECDSA_NIST */ {}, /* KEY_ALG_ECDSA_BRAINPOOL_R */ {} /* KEY_ALG_ECDSA_BRAINPOOL_T */ #endif /* OPENSSL_NO_EC */ @@ -74,7 +74,7 @@ key_t *key_get_by_opt(const char *opt); int key_new(key_t *key); #endif int key_create(key_t *key, int type, int key_bits); -int key_load(key_t *key, unsigned int *err_code); +unsigned int key_load(key_t *key); int key_store(key_t *key); void key_cleanup(void); diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/sha.h b/atf-20240117-bacca82a8/tools/cert_create/include/sha.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/sha.h rename to atf-20240117-bacca82a8/tools/cert_create/include/sha.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/tbbr/tbb_cert.h b/atf-20240117-bacca82a8/tools/cert_create/include/tbbr/tbb_cert.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/tbbr/tbb_cert.h rename to atf-20240117-bacca82a8/tools/cert_create/include/tbbr/tbb_cert.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/tbbr/tbb_ext.h b/atf-20240117-bacca82a8/tools/cert_create/include/tbbr/tbb_ext.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/tbbr/tbb_ext.h rename to atf-20240117-bacca82a8/tools/cert_create/include/tbbr/tbb_ext.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/include/tbbr/tbb_key.h b/atf-20240117-bacca82a8/tools/cert_create/include/tbbr/tbb_key.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/include/tbbr/tbb_key.h rename to atf-20240117-bacca82a8/tools/cert_create/include/tbbr/tbb_key.h diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/cca/cot.c b/atf-20240117-bacca82a8/tools/cert_create/src/cca/cot.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/cca/cot.c rename to atf-20240117-bacca82a8/tools/cert_create/src/cca/cot.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/cca/cot.mk b/atf-20240117-bacca82a8/tools/cert_create/src/cca/cot.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/cca/cot.mk rename to atf-20240117-bacca82a8/tools/cert_create/src/cca/cot.mk diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/cert.c b/atf-20240117-bacca82a8/tools/cert_create/src/cert.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/cert.c rename to atf-20240117-bacca82a8/tools/cert_create/src/cert.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/cmd_opt.c b/atf-20240117-bacca82a8/tools/cert_create/src/cmd_opt.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/cmd_opt.c rename to atf-20240117-bacca82a8/tools/cert_create/src/cmd_opt.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/dualroot/cot.c b/atf-20240117-bacca82a8/tools/cert_create/src/dualroot/cot.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/dualroot/cot.c rename to atf-20240117-bacca82a8/tools/cert_create/src/dualroot/cot.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/dualroot/cot.mk b/atf-20240117-bacca82a8/tools/cert_create/src/dualroot/cot.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/dualroot/cot.mk rename to atf-20240117-bacca82a8/tools/cert_create/src/dualroot/cot.mk diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/ext.c b/atf-20240117-bacca82a8/tools/cert_create/src/ext.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/ext.c rename to atf-20240117-bacca82a8/tools/cert_create/src/ext.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/key.c b/atf-20240117-bacca82a8/tools/cert_create/src/key.c similarity index 86% rename from atf-20231013-0ea67d76a/tools/cert_create/src/key.c rename to atf-20240117-bacca82a8/tools/cert_create/src/key.c index 32229d1e9..04214aacb 100644 --- a/atf-20231013-0ea67d76a/tools/cert_create/src/key.c +++ b/atf-20240117-bacca82a8/tools/cert_create/src/key.c @@ -1,9 +1,10 @@ /* - * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include #include @@ -112,7 +113,12 @@ static int key_create_ecdsa(key_t *key, int key_bits, const char *curve) static int key_create_ecdsa_nist(key_t *key, int key_bits) { - return key_create_ecdsa(key, key_bits, "prime256v1"); + if (key_bits == 384) { + return key_create_ecdsa(key, key_bits, "secp384r1"); + } else { + assert(key_bits == 256); + return key_create_ecdsa(key, key_bits, "prime256v1"); + } } static int key_create_ecdsa_brainpool_r(key_t *key, int key_bits) @@ -154,7 +160,12 @@ err: static int key_create_ecdsa_nist(key_t *key, int key_bits) { - return key_create_ecdsa(key, key_bits, NID_X9_62_prime256v1); + if (key_bits == 384) { + return key_create_ecdsa(key, key_bits, NID_secp384r1); + } else { + assert(key_bits == 256); + return key_create_ecdsa(key, key_bits, NID_X9_62_prime256v1); + } } static int key_create_ecdsa_brainpool_r(key_t *key, int key_bits) @@ -228,38 +239,34 @@ err: } -int key_load(key_t *key, unsigned int *err_code) +unsigned int key_load(key_t *key) { - FILE *fp; - - if (key->fn) { - if (!strncmp(key->fn, "pkcs11:", 7)) { - /* Load key through pkcs11 */ - key->key = key_load_pkcs11(key->fn); - } else { - /* Load key from file */ - fp = fopen(key->fn, "r"); - if (fp) { - key->key = PEM_read_PrivateKey(fp, NULL, NULL, NULL); - fclose(fp); - } else { - WARN("Cannot open file %s\n", key->fn); - *err_code = KEY_ERR_OPEN; - } - } - if (key->key) { - *err_code = KEY_ERR_NONE; - return 1; - } else { - ERROR("Cannot load key from %s\n", key->fn); - *err_code = KEY_ERR_LOAD; - } - } else { + if (key->fn == NULL) { VERBOSE("Key not specified\n"); - *err_code = KEY_ERR_FILENAME; + return KEY_ERR_FILENAME; } - return 0; + if (strncmp(key->fn, "pkcs11:", 7) == 0) { + /* Load key through pkcs11 */ + key->key = key_load_pkcs11(key->fn); + } else { + /* Load key from file */ + FILE *fp = fopen(key->fn, "r"); + if (fp == NULL) { + WARN("Cannot open file %s\n", key->fn); + return KEY_ERR_OPEN; + } + + key->key = PEM_read_PrivateKey(fp, NULL, NULL, NULL); + fclose(fp); + } + + if (key->key == NULL) { + ERROR("Cannot load key from %s\n", key->fn); + return KEY_ERR_LOAD; + } + + return KEY_ERR_NONE; } int key_store(key_t *key) diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/main.c b/atf-20240117-bacca82a8/tools/cert_create/src/main.c similarity index 99% rename from atf-20231013-0ea67d76a/tools/cert_create/src/main.c rename to atf-20240117-bacca82a8/tools/cert_create/src/main.c index 2ab6bcfd9..f10a768bc 100644 --- a/atf-20231013-0ea67d76a/tools/cert_create/src/main.c +++ b/atf-20240117-bacca82a8/tools/cert_create/src/main.c @@ -441,7 +441,8 @@ int main(int argc, char *argv[]) #endif /* First try to load the key from disk */ - if (key_load(&keys[i], &err_code)) { + err_code = key_load(&keys[i]); + if (err_code == KEY_ERR_NONE) { /* Key loaded successfully */ continue; } diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/sha.c b/atf-20240117-bacca82a8/tools/cert_create/src/sha.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/sha.c rename to atf-20240117-bacca82a8/tools/cert_create/src/sha.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbb_cert.c b/atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbb_cert.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbb_cert.c rename to atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbb_cert.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbb_ext.c b/atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbb_ext.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbb_ext.c rename to atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbb_ext.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbb_key.c b/atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbb_key.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbb_key.c rename to atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbb_key.c diff --git a/atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbbr.mk b/atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbbr.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/cert_create/src/tbbr/tbbr.mk rename to atf-20240117-bacca82a8/tools/cert_create/src/tbbr/tbbr.mk diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/index.js b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/index.js similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/index.js rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/index.js diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/package.json b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/package.json similarity index 92% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/package.json rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/package.json index 116b28b72..d0efab8fe 100644 --- a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/package.json +++ b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/package.json @@ -1,6 +1,6 @@ { "name": "conventional-changelog-tf-a", - "version": "2.9.0", + "version": "2.10.0", "license": "BSD-3-Clause", "private": true, "main": "index.js", diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/commit-section.hbs b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/commit-section.hbs similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/commit-section.hbs rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/commit-section.hbs diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/commit.hbs b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/commit.hbs similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/commit.hbs rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/commit.hbs diff --git a/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/footer.hbs b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/footer.hbs new file mode 100644 index 000000000..e69de29bb diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/header.hbs b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/header.hbs similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/header.hbs rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/header.hbs diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/note-section.hbs b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/note-section.hbs similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/note-section.hbs rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/note-section.hbs diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/note.hbs b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/note.hbs similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/note.hbs rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/note.hbs diff --git a/atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/template.hbs b/atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/template.hbs similarity index 100% rename from atf-20231013-0ea67d76a/tools/conventional-changelog-tf-a/templates/template.hbs rename to atf-20240117-bacca82a8/tools/conventional-changelog-tf-a/templates/template.hbs diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/.gitignore b/atf-20240117-bacca82a8/tools/dev/gpt_editor/.gitignore similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/.gitignore rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/.gitignore diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/README.md b/atf-20240117-bacca82a8/tools/dev/gpt_editor/README.md similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/README.md rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/README.md diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/boot-kernel-from-eMMC.json b/atf-20240117-bacca82a8/tools/dev/gpt_editor/example/boot-kernel-from-eMMC.json similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/boot-kernel-from-eMMC.json rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/example/boot-kernel-from-eMMC.json diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/bpir64.json b/atf-20240117-bacca82a8/tools/dev/gpt_editor/example/bpir64.json similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/bpir64.json rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/example/bpir64.json diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7622-eMMC-legacy.json b/atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7622-eMMC-legacy.json similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7622-eMMC-legacy.json rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7622-eMMC-legacy.json diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7981-mt7986-emmc.json b/atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7981-mt7986-emmc.json similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7981-mt7986-emmc.json rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7981-mt7986-emmc.json diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7981-mt7986-sd.json b/atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7981-mt7986-sd.json similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7981-mt7986-sd.json rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7981-mt7986-sd.json diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7988-emmc.json b/atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7988-emmc.json similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7988-emmc.json rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7988-emmc.json diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7988-sd.json b/atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7988-sd.json similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/example/mt7988-sd.json rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/example/mt7988-sd.json diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/libgpt.py b/atf-20240117-bacca82a8/tools/dev/gpt_editor/libgpt.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/libgpt.py rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/libgpt.py diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/mtk_gpt.py b/atf-20240117-bacca82a8/tools/dev/gpt_editor/mtk_gpt.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/mtk_gpt.py rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/mtk_gpt.py diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/partition_layout.py b/atf-20240117-bacca82a8/tools/dev/gpt_editor/partition_layout.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/partition_layout.py rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/partition_layout.py diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/Arial.ttf b/atf-20240117-bacca82a8/tools/dev/gpt_editor/template/Arial.ttf similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/Arial.ttf rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/template/Arial.ttf diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/MTK_MBR b/atf-20240117-bacca82a8/tools/dev/gpt_editor/template/MTK_MBR similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/MTK_MBR rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/template/MTK_MBR diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/MTK_SD_HDR b/atf-20240117-bacca82a8/tools/dev/gpt_editor/template/MTK_SD_HDR similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/MTK_SD_HDR rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/template/MTK_SD_HDR diff --git a/atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/color.conf b/atf-20240117-bacca82a8/tools/dev/gpt_editor/template/color.conf similarity index 100% rename from atf-20231013-0ea67d76a/tools/dev/gpt_editor/template/color.conf rename to atf-20240117-bacca82a8/tools/dev/gpt_editor/template/color.conf diff --git a/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/mk_image.sh b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/mk_image.sh new file mode 100755 index 000000000..75b3d16cb --- /dev/null +++ b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/mk_image.sh @@ -0,0 +1,502 @@ +#!/bin/bash + +# pip install: ubi_reader, yq + +#global variables: +gpt_start_dec=0 +gpt_start_hex=0 +bl2_start_dec=0 +bl2_start_hex=0x0 +rf_start_dec=0 +rf_start_hex=0x0 +fip_start_dec=0 +fip_start_hex=0x0 +kernel_start_dec=0 +kernel_start_hex=0x0 +rootfs_start_dec=0 +rootfs_start_hex=0x0 +rootfs_image="" +sdmmc_extracted_folder="" + +ws_folder="./tmp" + +# Regular Colors +RED='\033[0;31m' +NC='\033[0m' + +usage() { + printf 'Usage:\n'\ +' ./mk_image -p \n'\ +' -d \n'\ +' -c \n'\ +' -b , default=bl2.img\n'\ +' -r \n'\ +' -f , default=fip.bin\n'\ +' -k \n'\ +' -g \n'\ +' -h \n'\ +' -o \n'\ +' -u \n'\ +' -uk \n'\ +' -ur \n'\ +' -uo '\ +' example:\n'\ +'[eMMC single image]\n'\ +' ./mk_image.sh -p mt7986 -d emmc \\\n'\ +' -g GPT_EMMC-iap-20220125 \\\n'\ +' -f fip-iap-emmc-20220125.bin \\\n'\ +' -k OF_openwrt-mediatek-mt7986-mt7986a-ax6000-emmc-rfb-squashfs-sysupgrade.bin\n'\ +'[SPIM-NAND single image]\n'\ +' ./mk_image.sh -p mt7986 -d spim-nand \\\n'\ +' -b bl2-iap-snand-20220114.img \\\n'\ +' -f fip-snand-20220114.bin \\\n'\ +' -k OF_openwrt-mediatek-mt7986-mt7986a-ax6000-spim-nand-rfb-squashfs-factory.bin\n'\ +'[SPIM-NAND dual image mode]\n'\ +' ./mk_image.sh -p mt7986 -d spim-nand \\\n'\ +' -b bl2.img -f fip.bin \\\n'\ +' -k OF_openwrt-mediatek-mt7986-mt7986a-ax6000-spim-nand-rfb-squashfs-factory.bin \\\n'\ +' --dual-image\n' + exit 0 +} + +## Enter current folder +DIR="$(cd "$(dirname "$0")" && pwd)" +cd ${DIR} +export PATH="$PATH:${DIR}/bin" + +if [ $# -lt 1 ] +then + usage + exit 0 +fi + +## We set default values for some arguments +bl2_image="bl2.img" +bl2_default=1 +fip_image="fip.bin" +fip_default=1 +partition_config="" +partition_config_default=1 +dual_image_mode=0 +new_ubi_image="new_ubi.bin" +part_type="default" +yq="yq_linux_amd64" + +while [ "$1" != "" ]; do + case $1 in + -h ) + usage + ;; + -p ) + shift + platform=$1 + ;; + -d | --device) + shift + flash_type=$1 + ;; + -c ) + shift + partition_config=$1 + partition_config_default=0 + ;; + -b ) + shift + bl2_image=$1 + bl2_default=0 + ;; + -f ) + shift + fip_image=$1 + fip_default=0 + ;; + -k ) + shift + kernel_image=$1 + ;; + -g ) + shift + gpt=$1 + ;; + -o ) + shift + single_image=$1 + ;; + -r ) + shift + rf_image=$1 + ;; + -i | --dual_image) + dual_image_mode=1 + part_type="dual-image" + ;; + esac + shift +done + +parse_yaml() { + local prefix=$2 + local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') + sed -ne "s|^\($s\):|\1|" \ + -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + awk -F$fs '{ + indent = length($1)/2; + vname[indent] = $2; + for (i in vname) {if (i > indent) {delete vname[i]}} + if (length($3) > 0) { + vn=""; for (i=0; i $single_image + else + dd if=/dev/zero ibs=$fip_start_dec count=1 \ + | tr "\000" "\377" > $single_image + fi + else + if [[ $flash_type == "emmc" ]] || [[ $flash_type == "sd" ]] + then + dd if=/dev/zero ibs=$kernel_start_dec count=1 \ + > $single_image 2>&1 + else + dd if=/dev/zero ibs=$kernel_start_dec count=1 \ + | tr "\000" "\377" > $single_image 2>&1 + fi + fi +} + +extract_sdmmc_kernel() { + output=`tar -xvf $kernel_image -C ${ws_folder}/ | awk {'print $1'}` + IFS=$'\n' read -d "\034" -r -a output_arr <<< "$output" + + #For debugging + #echo "There are ${#output_arr[*]}" next lines in the output. + + sdmmc_extracted_folder="${ws_folder}/${output_arr[0]}" + echo ${sdmmc_extracted_folder} + + for filename in "${output_arr[@]}"; + do + filename="${ws_folder}/${filename}" + if [[ "$filename" == *"kernel" ]] + then + kernel_image=$filename + elif [[ "$filename" == *"root" ]] + then + rootfs_image=$filename + fi + done +} + +recreate_ubimage() { + ubinize_config="ubi_temp.cfg" + + ubireader_extract_images -v ${kernel_image} -o ${ws_folder}/ > /dev/null 2>&1 + # Remove tail 0xff paddings + sed -i '$ s/\xff*$//' ${ws_folder}/${kernel_image}/*kernel.ubifs + sed -i '$ s/\xff*$//' ${ws_folder}/${kernel_image}/*rootfs.ubifs + + peb_size=`ubireader_display_info ${kernel_image} | grep "PEB Size: " | awk '{print $3}'` + min_io_size=`ubireader_display_info ${kernel_image} | grep "Min I/O: " | awk '{print $3}'` + ec=`ubireader_display_info ${kernel_image} | grep "Unknown Block Count: " | awk '{print $4}'` + ubi_volumes=($(${yq} .${platform}.${part_type}.ubi ${partition_config} | ${yq} 'keys' - | sed 's/^- //')) + rootfs_size=($(${yq} .${platform}.${part_type}.ubi.rootfs.size ${partition_config})) + rootfs_size_dec=$((rootfs_size)) + rootfs_data_size=($(${yq} .${platform}.${part_type}.ubi.rootfs_data.size ${partition_config})) + rootfs_data_size_dec=$((rootfs_data_size)) + uboot_env_size=($(${yq} .${platform}.${part_type}.ubi."u-boot-env".size ${partition_config})) + uboot_env_size_dec=$((uboot_env_size)) + ubi_volume_num=`${yq} .${platform}.${part_type}.ubi ${partition_config} | ${yq} 'keys' - | wc -l` + + i=0 + for i in $(seq 0 $((${ubi_volume_num}-1)) ); do + volume_name=${ubi_volumes[${i}]} + cat << EOF >> ${ubinize_config} +[${volume_name}] +mode=ubi +vol_id=${i} +vol_type=dynamic +vol_name=${volume_name} +EOF + if [[ ${volume_name} == "kernel" ]] || [[ ${volume_name} == "kernel2" ]]; then + kernel_file=(${ws_folder}/${kernel_image}/*kernel.ubifs) + echo "image=${kernel_file}" >> ${ubinize_config} + elif [[ ${volume_name} == "rootfs" ]] || [[ ${volume_name} == "rootfs2" ]]; then + rootfs_file=(${ws_folder}/${kernel_image}/*rootfs.ubifs) + echo "image=${rootfs_file}" >> ${ubinize_config} + echo "vol_size=${rootfs_size_dec}" >> ${ubinize_config} + elif [[ ${volume_name} == "rootfs_data" ]]; then + echo "vol_size=${rootfs_data_size_dec}" >> ${ubinize_config} + elif [[ ${volume_name} == "u-boot-env" ]]; then + echo "vol_size=${uboot_env_size_dec}" >> ${ubinize_config} + fi + done + #echo "ubinize -o ${ws_folder}/${new_ubi_image} -p ${peb_size} -m ${min_io_size} -e ${ec} ${ubinize_config}" + ubinize -o ${ws_folder}/${new_ubi_image} -p ${peb_size} -m ${min_io_size} -e ${ec} ${ubinize_config} + rm ${ubinize_config} + kernel_image=${ws_folder}/${new_ubi_image} +} + +recreate_sdmmc_kernel() { + kernel_single=${ws_folder}/kernel_single.bin + dd if=/dev/zero ibs=$kernel_size_dec count=1 > $kernel_single + dd if=$kernel_image of=$kernel_single bs=512 seek=0 conv=notrunc + dd if=$rootfs_image of=$kernel_single bs=512 \ + seek=$(( ($kernel_size_dec/512) )) conv=notrunc + kernel_image=${kernel_single} +} + +recreate_sdmmc_kernel_dual() { + kernel_dual=${ws_folder}/kernel_dual.bin + pad_length=$(( ${kernel_size_dec} + ${rootfs_size_dec} + ${kernel2_size_dec})) + dd if=/dev/zero ibs=$pad_length count=1 > $kernel_dual + dd if=$kernel_image of=$kernel_dual bs=512 seek=0 conv=notrunc + dd if=$rootfs_image of=$kernel_dual bs=512 \ + seek=$(( ($kernel_size_dec/512) )) conv=notrunc + dd if=$kernel_image of=$kernel_dual bs=512 \ + seek=$(( ($kernel_size_dec + $rootfs_size_dec)/512 )) conv=notrunc + dd if=$rootfs_image of=$kernel_dual bs=512 \ + seek=$(( ($kernel_size_dec + $rootfs_size_dec + $kernel2_size_dec)/512 )) conv=notrunc + kernel_image=${kernel_dual} +} + +start_wrapping() { + if [[ $flash_type == "emmc" ]] || [[ $flash_type == "sd" ]] + then + printf "[wrapping GPT......]\n" + dd if=$gpt of=$single_image bs=512 seek=0 conv=notrunc + fi + + if [[ $flash_type != "emmc" ]] + then + printf "[wrapping BL2 image......]\n" + dd if=$bl2_image of=$single_image bs=512 \ + seek=$(( ($bl2_start_dec/512) )) conv=notrunc + fi + + if [[ -n $rf_image ]] + then + printf "[wrapping RF image......]\n" + dd if=$rf_image of=$single_image bs=512 \ + seek=$(( ($rf_start_dec/512) )) conv=notrunc + fi + + printf "[wrapping FIP image......]\n" + dd if=$fip_image of=$single_image bs=512 \ + seek=$(( ($fip_start_dec/512) )) conv=notrunc + + if [[ -n $kernel_image ]] + then + printf "[wrapping kernel image......]\n" + dd if=$kernel_image of=$single_image bs=512 \ + seek=$(( ($kernel_start_dec/512) )) conv=notrunc + fi +} + +destroy_workspace() { + rm -r ${ws_folder} +} + +######## Check if variables are valid ######## +if ! [[ $platform =~ ^(mt7981|mt7986|mt7988)$ ]]; then + printf "${RED}Platform must be in mt7981|mt7986|mt7988\n${NC}" + usage + exit 1 +fi +if ! [[ $flash_type =~ ^(snfi-nand|spim-nand|spim-nor|emmc|sd)$ ]]; then + printf "${RED}Flash type must be in snfi-nand|spim-nand|spim-nor|emmc|sd\n${NC}" + usage + exit 1 +fi + +if [[ $partition_config_default -eq 1 ]]; then + partition_config="./partitions/${flash_type}.yml" +fi + +# For SPIM-NAND/SPIM-NOR/SNFI-NAND: +# There must at least be bl2.img & fip.bin +# For eMMC: +# There must at least be GPT & fip.bin +# For SD: +# There must at least be GPT & bl2.img & fip.bin +if [[ $flash_type =~ ^(emmc|sd)$ ]] && [[ -z $gpt ]]; then + printf "${RED}GPT table must be provided if flash type is emmc or sd\n${NC}" + exit 1 +fi + +if [[ $flash_type =~ ^(emmc)$ ]]; then + if [[ $bl2_default -eq 0 ]]; then + printf "${RED}eMMC single image doesn't contain bl2 image, please don't specify bl2\n${NC}" + exit 1 + fi +fi + +if [[ -n $gpt ]] && ! [[ -f $gpt ]]; then + printf "${RED}GPT table provided doesn't exist.\n${NC}" + exit 1 +fi +if [[ -n $rf_image ]] && ! [[ -f $rf_image ]]; then + printf "${RED}RF image provided doesn't exist.\n${NC}" + exit 1 +fi +if [[ -n $kernel_image ]] && ! [[ -f $kernel_image ]]; then + if ! [[ $ubi_enbable -eq 1 ]]; then + printf "${RED}Kernel image provided doesn't exist.\n${NC}" + exit 1 + fi +fi +############################################## + +######## Check if partition configs are valid ######## +if ! [[ -f $partition_config ]] +then + if [[ $partition_config_default -eq 1 ]] + then + printf "${RED}Default partition config${NC}" + else + printf "${RED}Partition config provided${NC}" + fi + printf "${RED} doesn't exist: %s\n${NC}" $partition_config + exit 1 +fi +printf "* Partition config: %s\n" $partition_config + +if ! [[ -f $bl2_image ]] && [[ $flash_type != "emmc" ]] +then + if [[ $bl2_default -eq 1 ]] + then + printf "${RED}Default BL2 image${NC}" + else + printf "${RED}BL2 image provided${NC}" + fi + printf "${RED} doesn't exist: %s\n${NC}" $bl2_image + exit 1 +fi +printf "* BL2 image name: %s\n" $bl2_image + +if ! [[ -f $fip_image ]] +then + if [[ $fip_default -eq 1 ]] + then + printf "${RED}Default FIP image" + else + printf "${RED}FIP image provided" + fi + printf "${RED} doesn't exist: %s\n${NC}" $fip_image + exit 1 +fi +printf "* FIP image name: %s\n" $fip_image + +if [[ -z $single_image ]] +then + single_image="$platform-$flash_type-$(date +%Y%m%d)-single-image.bin" + printf "* Single image name: %s\n" $single_image +fi + +check_ok=1 +###################################################### + +if [[ $check_ok == 1 ]]; then + echo "=========================================" + create_workspace + load_partition + pad_output_image + + if [[ $flash_type == "emmc" ]] || [[ $flash_type == "sd" ]] + then + extract_sdmmc_kernel + recreate_sdmmc_kernel + fi + + if [[ ${dual_image_mode} -eq 1 ]]; then + #create_workspace + if [[ $flash_type == "spim-nand" ]] || [[ $flash_type == "snfi-nand" ]] + then + recreate_ubimage + elif [[ $flash_type == "emmc" ]] || [[ $flash_type == "sd" ]] + then + recreate_sdmmc_kernel_dual + fi + fi + + start_wrapping + destroy_workspace +fi diff --git a/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/emmc.yml b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/emmc.yml new file mode 100644 index 000000000..d537b422f --- /dev/null +++ b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/emmc.yml @@ -0,0 +1,149 @@ +# Copyright (C) 2021-2022 SkyLake Huang +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# eMMC layout(mt7981/mt7986): +# 0x0~0x4400 : GPT +# 0x400000~0x480000 : u-boot-env +# 0x480000~0x680000 : rf +# 0x680000~0x880000 : fip +# 0x880000~0x2880000 : kernel +# 0x2880000~0x12880000: rootfs +mt7981: + default: + gpt: + start: 0x0 + size: 0x4400 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x10000000 + "dual-image": + gpt: + start: 0x0 + size: 0x4400 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x2000000 + kernel2: + start: 0x4880000 + size: 0x2000000 + rootfs2: + start: 0x6880000 + size: 0x2000000 + +mt7986: + default: + gpt: + start: 0x0 + size: 0x4400 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x10000000 + "dual-image": + gpt: + start: 0x0 + size: 0x4400 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x2000000 + kernel2: + start: 0x4880000 + size: 0x2000000 + rootfs2: + start: 0x6880000 + size: 0x2000000 + +# eMMC layout(mt7988): +# 0x0~0x4400 : GPT +# 0x400000~0x480000 : u-boot-env +# 0x480000~0x880000 : rf +# 0x880000~0xa80000 : fip +# 0xa80000~0x2a80000 : kernel +# 0x2a80000~0x12a80000: rootfs +mt7988: + default: + gpt: + start: 0x0 + size: 0x4400 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x880000 + size: 0x200000 + kernel: + start: 0xa80000 + size: 0x2000000 + rootfs: + start: 0x2a80000 + size: 0x10000000 + "dual-image": + gpt: + start: 0x0 + size: 0x4400 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x880000 + size: 0x200000 + kernel: + start: 0xa80000 + size: 0x2000000 + rootfs: + start: 0x2a80000 + size: 0x2000000 + kernel2: + start: 0x4a80000 + size: 0x2000000 + rootfs2: + start: 0x6a80000 + size: 0x2000000 \ No newline at end of file diff --git a/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/sd.yml b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/sd.yml new file mode 100644 index 000000000..3bbbc88f7 --- /dev/null +++ b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/sd.yml @@ -0,0 +1,169 @@ +# Copyright (C) 2021-2022 SkyLake Huang +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# SD-card layout(mt7981/mt7986): +# 0x0~0x4400 : GPT +# 0x4400~0x400000 : bl2 +# 0x400000~0x480000 : u-boot-env +# 0x480000~0x680000 : rf +# 0x680000~0x880000 : fip +# 0x880000~0x2880000 : kernel +# 0x2880000~0x12880000: rootfs +mt7981: + default: + gpt: + start: 0x0 + size: 0x4400 + bl2: + start: 0x4400 + size: 0x3fbc00 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x10000000 + "dual-image": + gpt: + start: 0x0 + size: 0x4400 + bl2: + start: 0x4400 + size: 0x3fbc00 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x2000000 + kernel2: + start: 0x4880000 + size: 0x2000000 + rootfs2: + start: 0x6880000 + size: 0x2000000 + +mt7986: + default: + gpt: + start: 0x0 + size: 0x4400 + bl2: + start: 0x4400 + size: 0x3fbc00 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x10000000 + "dual-image": + gpt: + start: 0x0 + size: 0x4400 + bl2: + start: 0x4400 + size: 0x3fbc00 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x680000 + size: 0x200000 + kernel: + start: 0x880000 + size: 0x2000000 + rootfs: + start: 0x2880000 + size: 0x2000000 + kernel2: + start: 0x4880000 + size: 0x2000000 + rootfs2: + start: 0x6880000 + size: 0x2000000 + +# SD-card layout(mt7988): +# 0x0~0x4400 : GPT +# 0x80000~0x400000 : bl2 +# 0x400000~0x480000 : u-boot-env +# 0x480000~0x880000 : rf +# 0x880000~0xa80000 : fip +# 0xa80000~0x2a80000 : kernel +# 0x2a80000~0x12a80000: rootfs +mt7988: + default: + gpt: + start: 0x0 + size: 0x4400 + bl2: + start: 0x4400 + size: 0x3fbc00 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x880000 + size: 0x200000 + kernel: + start: 0xa80000 + size: 0x2000000 + rootfs: + start: 0x2a80000 + size: 0x10000000 + "dual-image": + gpt: + start: 0x0 + size: 0x4400 + bl2: + start: 0x4400 + size: 0x3fbc00 + factory: + start: 0x480000 + size: 0x200000 + fip: + start: 0x880000 + size: 0x200000 + kernel: + start: 0xa80000 + size: 0x2000000 + rootfs: + start: 0x2a80000 + size: 0x2000000 + kernel2: + start: 0x4a80000 + size: 0x2000000 + rootfs2: + start: 0x6a80000 + size: 0x2000000 \ No newline at end of file diff --git a/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/snfi-nand.yml b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/snfi-nand.yml new file mode 100644 index 000000000..1dfd077d1 --- /dev/null +++ b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/snfi-nand.yml @@ -0,0 +1,141 @@ +# Copyright (C) 2021-2022 SkyLake Huang +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# NAND flash layout(mt7981/mt7986): +# 0x0~0x100000: BL2, 1024K +# 0x100000~0x180000: Uboot env, 512K +# 0x180000~0x380000: RF, 2048K +# 0x380000~0x580000: FIP, 2048K +# 0x580000~ : firmware +mt7981: + default: + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x200000 + fip: + start: 0x380000 + size: 0x200000 + ubi: + kernel: + start: 0x580000 + size: 0x7280000 + "dual-image": + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x200000 + fip: + start: 0x380000 + size: 0x200000 + ubi: + kernel: + start: 0x580000 + rootfs: + size: 0x14a1400 + kernel2: + rootfs2: + size: 0x14a1400 + rootfs_data: + size: 0x500000 + u-boot-env: + size: 0x80000 + +mt7986: + default: + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x200000 + fip: + start: 0x380000 + size: 0x200000 + ubi: + kernel: + start: 0x580000 + size: 0x7280000 + "dual-image": + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x200000 + fip: + start: 0x380000 + size: 0x200000 + ubi: + kernel: + start: 0x580000 + rootfs: + size: 0x14a1400 + kernel2: + rootfs2: + size: 0x14a1400 + rootfs_data: + size: 0x500000 + u-boot-env: + size: 0x80000 + +# NAND flash layout(mt7988): +# 0x0~0x100000: BL2, 1024K +# 0x100000~0x180000: Uboot env, 512K +# 0x180000~0x580000: RF, 4096K +# 0x580000~0x780000: FIP, 2048K +# 0x780000~ : firmware +mt7988: + "default": + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x400000 + fip: + start: 0x580000 + size: 0x200000 + ubi: + kernel: + start: 0x780000 + size: 0x7080000 + "dual-image": + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x400000 + fip: + start: 0x580000 + size: 0x200000 + ubi: + kernel: + start: 0x780000 + rootfs: + size: 0x14a1400 + kernel2: + rootfs2: + size: 0x14a1400 + rootfs_data: + size: 0x500000 + u-boot-env: + size: 0x80000 \ No newline at end of file diff --git a/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/spim-nand.yml b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/spim-nand.yml new file mode 100644 index 000000000..0453f980b --- /dev/null +++ b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/spim-nand.yml @@ -0,0 +1,120 @@ +# Copyright (C) 2021-2022 SkyLake Huang +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# NAND flash layout(mt7981/mt7986): +# 0x0~0x100000: BL2, 1024K +# 0x100000~0x180000: Uboot env, 512K +# 0x180000~0x380000: RF, 2048K +# 0x380000~0x580000: FIP, 2048K +# 0x580000~0x7800000: ubi (refer to ubi as kernel down below) + +mt7981: + default: + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x200000 + fip: + start: 0x380000 + size: 0x200000 + ubi: + kernel: + start: 0x580000 + size: 0x7280000 + "dual-image": + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x200000 + fip: + start: 0x380000 + size: 0x200000 + ubi: + kernel: + start: 0x580000 + rootfs: + size: 0x14a1400 + kernel2: + rootfs2: + size: 0x14a1400 + rootfs_data: + size: 0x500000 + u-boot-env: + size: 0x80000 + +mt7986: + default: + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x200000 + fip: + start: 0x380000 + size: 0x200000 + ubi: + kernel: + start: 0x580000 + size: 0x7280000 + +# NAND flash layout(mt7988): +# 0x0~0x100000: bl2, 1024K +# 0x100000~0x180000: u-boot-env, 512K +# 0x180000~0x580000: factory, 4096K +# 0x580000~0x780000: fip, 2048K +# 0x780000~0x7800000: ubi (refer to ubi as kernel down below) +mt7988: + "default": + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x400000 + fip: + start: 0x580000 + size: 0x200000 + ubi: + kernel: + start: 0x780000 + size: 0x7080000 + "dual-image": + bl2: + start: 0x0 + size: 0x100000 + factory: + start: 0x180000 + size: 0x400000 + fip: + start: 0x580000 + size: 0x200000 + ubi: + kernel: + start: 0x780000 + rootfs: + size: 0x14a1400 + kernel2: + rootfs2: + size: 0x14a1400 + rootfs_data: + size: 0x500000 + u-boot-env: + size: 0x80000 \ No newline at end of file diff --git a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nor-default.yml b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/spim-nor.yml similarity index 52% rename from atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nor-default.yml rename to atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/spim-nor.yml index 47d73cae7..8b5d92e1b 100644 --- a/atf-20231013-0ea67d76a/tools/dev/single_img_wrapper/partitions/spim-nor-default.yml +++ b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/partitions/spim-nor.yml @@ -14,15 +14,56 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# NOR flash layout: +# NOR flash layout(mt7981/mt7986): # 0x0~0x40000 : BL2, 256K # 0x40000~0x50000 : Uboot env, 64K # 0x50000~0x100000: RF, 704K # 0x100000~0x180000: FIP, 512K # 0x180000~ : firmware +mt7981: + default: + bl2: + start: 0x0 + size: 0x40000 + rf: + start: 0x50000 + size: 0xb0000 + fip: + start: 0x100000 + size: 0x80000 + kernel: + start: 0x180000 -spim-nor: - bl2_start: 0x0 - rf_start: 0x50000 - fip_start: 0x100000 - kernel_start: 0x180000 +mt7986: + default: + bl2: + start: 0x0 + size: 0x40000 + rf: + start: 0x50000 + size: 0xb0000 + fip: + start: 0x100000 + size: 0x80000 + kernel: + start: 0x180000 + +# NOR flash layout(mt7988): +# 0x0~0x40000 : BL2, 256K +# 0x40000~0x50000 : Uboot env, 64K +# 0x50000~0x250000: RF, 2048K +# 0x250000~0x2d0000: FIP, 512K +# 0x2d0000~ : firmware +mt7988: + default: + bl2: + start: 0x0 + size: 0x40000 + rf: + start: 0x50000 + size: 0x200000 + fip: + start: 0x250000 + size: 0x80000 + kernel: + start: 0x2d0000 \ No newline at end of file diff --git a/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/test_mk_image.sh b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/test_mk_image.sh new file mode 100755 index 000000000..84cbc9bac --- /dev/null +++ b/atf-20240117-bacca82a8/tools/dev/single_img_wrapper/test_mk_image.sh @@ -0,0 +1,159 @@ +#!/bin/bash + +# Import the script +#source ./my_script.sh +debug_mode=1 +data="./test_data" +script="mk_image.sh" +output_bl2_fip="${data}/bl2_fip.bin" +output_bl2_factory_fip="${data}/bl2_factory_fip.bin" +output_gpt_fip="${data}/gpt_fip.bin" +output_single_image="${data}/single_image.bin" +declare -a platforms=("mt7981" "mt7986" "mt7988") +declare -a nand_nor=("spim-nand" "snfi-nand" "spim-nor") +declare -a sdmmc=("emmc" "sd") + +debug() { + command=$1 + if [[ ${debug_mode} -eq 1 ]]; then + echo "- [ CMD: ${command} ]" + fi +} + +############################## Default cases start here: ############################## +test_Normalcase_usage() { + cmd="./${script}" + debug "${cmd}" + result=$(${cmd}) + expect=$(cat ${data}/usage.txt) + assertEquals "${expect}" "${result}" +} + +test_Normalcase_nand_nor_combine_bl2_fip() { + for platform in "${platforms[@]}" + do + for flash in "${nand_nor[@]}" + do + cmd="./${script} -p ${platform} -d ${flash} \ +-b ${data}/common-bl2.img \ +-f ${data}/common-fip.bin \ +-o ${output_bl2_fip}" + debug "${cmd}" + eval ${cmd} > /dev/null 2>&1 + + diff ${output_bl2_fip} ${data}/${platform}-${flash}-bl2-fip.bin + diff_exit_status=$? + rm ${output_bl2_fip} + assertEquals "Generated file differs from expected output." 0 ${diff_exit_status} + done + done +} + +test_Normalcase_nand_nor_combine_bl2_factory_fip() { + for platform in "${platforms[@]}" + do + for flash in "${nand_nor[@]}" + do + cmd="./${script} -p ${platform} -d ${flash} \ +-b ${data}/common-bl2.img \ +-r ${data}/common-factory.bin \ +-f ${data}/common-fip.bin \ +-o ${output_bl2_fip}" + debug "${cmd}" + eval ${cmd} > /dev/null 2>&1 + + diff ${output_bl2_fip} ${data}/${platform}-${flash}-bl2-factory-fip.bin + diff_exit_status=$? + rm ${output_bl2_fip} + assertEquals "Generated file differs from expected output." 0 ${diff_exit_status} + done + done +} + +test_Normalcase_spim_nand_default_single_image() { + for platform in "${platforms[@]}" + do + for flash in "${nand_nor[@]}" + do + cmd="./${script} -p ${platform} -d ${flash} \ +-b ${data}/common-bl2.img \ +-r ${data}/common-factory.bin \ +-f ${data}/common-fip.bin \ +-k ${data}/nand-kernel-factory.bin \ +-o ${output_single_image}" + debug "${cmd}" + eval ${cmd} > /dev/null 2>&1 + + diff ${output_single_image} ${data}/${platform}-${flash}-single-image.bin + diff_exit_status=$? + rm ${output_single_image} + assertEquals "Generated file differs from expected output." 0 ${diff_exit_status} + done + done +} + +: <<'END' +test_Normalcase_nand_dual_image() { + for platform in "${platforms[@]}" + do + cmd="./${script} -p ${platform} -d spim-nand \ +-b ${data}/common-bl2.img \ +-r ${data}/common-factory.bin \ +-f ${data}/common-fip.bin \ +-k ${data}/nand-kernel-factory.bin \ +--dual_image \ +-o ${output_single_image}" + + debug "${cmd}" + exit 0 + eval ${cmd} > /dev/null 2>&1 + + diff ${output_single_image} ${data}/${platform}-${flash}-single-image.bin + diff_exit_status=$? + rm ${output_single_image} + assertEquals "Generated file differs from expected output." 0 ${diff_exit_status} + done +} +END + +test_Normalcase_emmc_combine_gpt_fip() { + for platform in "${platforms[@]}" + do + cmd="./${script} -p ${platform} -d emmc \ +-g ${data}/common-GPT.bin \ +-f ${data}/common-fip.bin \ +-o ${output_gpt_fip}" + debug "${cmd}" + eval ${cmd} > /dev/null 2>&1 + + diff ${output_gpt_fip} ${data}/${platform}-emmc-gpt-fip.bin + diff_exit_status=$? + rm ${output_gpt_fip} + assertEquals "Generated file differs from expected output." 0 ${diff_exit_status} + done +} + +############################## Error cases start here: ############################## +test_Errorcase__sdmmc_without_gpt() { + for platform in "${platforms[@]}" + do + # With BL2 specified + # With BL2/factory specified + # With BL2/factory/fip specified + # With BL2/factory/fip/kernel specified + cmd="./${script} -p ${platform} -d ${sdmmc} \ +-b ${data}/common-bl2.img \ +-f ${data}/common-fip.bin \ +-o ${output_bl2_fip}" + debug "${cmd}" + output=$(${cmd}) + output=$(echo "$output" | sed -r "s/\x1B\[[0-9;]*[a-zA-Z]//g") #Remove color ASCII + expected_output="GPT table must be provided if flash type is emmc or sd" + + assertEquals "Output message not expected" "${expected_output}" "${output}" + done +} + +# Load shunit2 +. /usr/bin/shunit2 +#. /usr/share/shunit2/shunit2 diff --git a/atf-20231013-0ea67d76a/tools/encrypt_fw/Makefile b/atf-20240117-bacca82a8/tools/encrypt_fw/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/encrypt_fw/Makefile rename to atf-20240117-bacca82a8/tools/encrypt_fw/Makefile diff --git a/atf-20231013-0ea67d76a/tools/encrypt_fw/include/cmd_opt.h b/atf-20240117-bacca82a8/tools/encrypt_fw/include/cmd_opt.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/encrypt_fw/include/cmd_opt.h rename to atf-20240117-bacca82a8/tools/encrypt_fw/include/cmd_opt.h diff --git a/atf-20231013-0ea67d76a/tools/encrypt_fw/include/debug.h b/atf-20240117-bacca82a8/tools/encrypt_fw/include/debug.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/encrypt_fw/include/debug.h rename to atf-20240117-bacca82a8/tools/encrypt_fw/include/debug.h diff --git a/atf-20231013-0ea67d76a/tools/encrypt_fw/include/encrypt.h b/atf-20240117-bacca82a8/tools/encrypt_fw/include/encrypt.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/encrypt_fw/include/encrypt.h rename to atf-20240117-bacca82a8/tools/encrypt_fw/include/encrypt.h diff --git a/atf-20231013-0ea67d76a/tools/encrypt_fw/src/cmd_opt.c b/atf-20240117-bacca82a8/tools/encrypt_fw/src/cmd_opt.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/encrypt_fw/src/cmd_opt.c rename to atf-20240117-bacca82a8/tools/encrypt_fw/src/cmd_opt.c diff --git a/atf-20231013-0ea67d76a/tools/encrypt_fw/src/encrypt.c b/atf-20240117-bacca82a8/tools/encrypt_fw/src/encrypt.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/encrypt_fw/src/encrypt.c rename to atf-20240117-bacca82a8/tools/encrypt_fw/src/encrypt.c diff --git a/atf-20231013-0ea67d76a/tools/encrypt_fw/src/main.c b/atf-20240117-bacca82a8/tools/encrypt_fw/src/main.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/encrypt_fw/src/main.c rename to atf-20240117-bacca82a8/tools/encrypt_fw/src/main.c diff --git a/atf-20231013-0ea67d76a/tools/fiptool/Makefile b/atf-20240117-bacca82a8/tools/fiptool/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/Makefile rename to atf-20240117-bacca82a8/tools/fiptool/Makefile diff --git a/atf-20231013-0ea67d76a/tools/fiptool/Makefile.msvc b/atf-20240117-bacca82a8/tools/fiptool/Makefile.msvc similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/Makefile.msvc rename to atf-20240117-bacca82a8/tools/fiptool/Makefile.msvc diff --git a/atf-20231013-0ea67d76a/tools/fiptool/fiptool.c b/atf-20240117-bacca82a8/tools/fiptool/fiptool.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/fiptool.c rename to atf-20240117-bacca82a8/tools/fiptool/fiptool.c diff --git a/atf-20231013-0ea67d76a/tools/fiptool/fiptool.h b/atf-20240117-bacca82a8/tools/fiptool/fiptool.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/fiptool.h rename to atf-20240117-bacca82a8/tools/fiptool/fiptool.h diff --git a/atf-20231013-0ea67d76a/tools/fiptool/fiptool_platform.h b/atf-20240117-bacca82a8/tools/fiptool/fiptool_platform.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/fiptool_platform.h rename to atf-20240117-bacca82a8/tools/fiptool/fiptool_platform.h diff --git a/atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/arm/board/juno/plat_fiptool.mk b/atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/arm/board/juno/plat_fiptool.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/arm/board/juno/plat_fiptool.mk rename to atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/arm/board/juno/plat_fiptool.mk diff --git a/atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/arm/board/tc/plat_def_uuid_config.c b/atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/arm/board/tc/plat_def_uuid_config.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/arm/board/tc/plat_def_uuid_config.c rename to atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/arm/board/tc/plat_def_uuid_config.c diff --git a/atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/arm/board/tc/plat_fiptool.mk b/atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/arm/board/tc/plat_fiptool.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/arm/board/tc/plat_fiptool.mk rename to atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/arm/board/tc/plat_fiptool.mk diff --git a/atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/nxp/plat_def_uuid_config.c b/atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/nxp/plat_def_uuid_config.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/nxp/plat_def_uuid_config.c rename to atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/nxp/plat_def_uuid_config.c diff --git a/atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/nxp/plat_fiptool.mk b/atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/nxp/plat_fiptool.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/nxp/plat_fiptool.mk rename to atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/nxp/plat_fiptool.mk diff --git a/atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c b/atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c rename to atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c diff --git a/atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/st/stm32mp1/plat_fiptool.mk b/atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/st/stm32mp1/plat_fiptool.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/plat_fiptool/st/stm32mp1/plat_fiptool.mk rename to atf-20240117-bacca82a8/tools/fiptool/plat_fiptool/st/stm32mp1/plat_fiptool.mk diff --git a/atf-20231013-0ea67d76a/tools/fiptool/tbbr_config.c b/atf-20240117-bacca82a8/tools/fiptool/tbbr_config.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/tbbr_config.c rename to atf-20240117-bacca82a8/tools/fiptool/tbbr_config.c diff --git a/atf-20231013-0ea67d76a/tools/fiptool/tbbr_config.h b/atf-20240117-bacca82a8/tools/fiptool/tbbr_config.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/tbbr_config.h rename to atf-20240117-bacca82a8/tools/fiptool/tbbr_config.h diff --git a/atf-20231013-0ea67d76a/tools/fiptool/win_posix.c b/atf-20240117-bacca82a8/tools/fiptool/win_posix.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/win_posix.c rename to atf-20240117-bacca82a8/tools/fiptool/win_posix.c diff --git a/atf-20231013-0ea67d76a/tools/fiptool/win_posix.h b/atf-20240117-bacca82a8/tools/fiptool/win_posix.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/fiptool/win_posix.h rename to atf-20240117-bacca82a8/tools/fiptool/win_posix.h diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/Makefile b/atf-20240117-bacca82a8/tools/marvell/doimage/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/Makefile rename to atf-20240117-bacca82a8/tools/marvell/doimage/Makefile diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/doimage.c b/atf-20240117-bacca82a8/tools/marvell/doimage/doimage.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/doimage.c rename to atf-20240117-bacca82a8/tools/marvell/doimage/doimage.c diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/doimage.mk b/atf-20240117-bacca82a8/tools/marvell/doimage/doimage.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/doimage.mk rename to atf-20240117-bacca82a8/tools/marvell/doimage/doimage.mk diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/aes_key.txt b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/aes_key.txt similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/aes_key.txt rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/aes_key.txt diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem0.key b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem0.key similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem0.key rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem0.key diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem1.key b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem1.key similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem1.key rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem1.key diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem2.key b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem2.key similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem2.key rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem2.key diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem3.key b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem3.key similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/csk_priv_pem3.key rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/csk_priv_pem3.key diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/kak_priv_pem.key b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/kak_priv_pem.key similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/kak_priv_pem.key rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/kak_priv_pem.key diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/sec_img_7K.cfg b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/sec_img_7K.cfg similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/sec_img_7K.cfg rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/sec_img_7K.cfg diff --git a/atf-20231013-0ea67d76a/tools/marvell/doimage/secure/sec_img_8K.cfg b/atf-20240117-bacca82a8/tools/marvell/doimage/secure/sec_img_8K.cfg similarity index 100% rename from atf-20231013-0ea67d76a/tools/marvell/doimage/secure/sec_img_8K.cfg rename to atf-20240117-bacca82a8/tools/marvell/doimage/secure/sec_img_8K.cfg diff --git a/atf-20231013-0ea67d76a/tools/mediatek/ar-table/Makefile b/atf-20240117-bacca82a8/tools/mediatek/ar-table/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/ar-table/Makefile rename to atf-20240117-bacca82a8/tools/mediatek/ar-table/Makefile diff --git a/atf-20231013-0ea67d76a/tools/mediatek/ar-table/ar-table.py b/atf-20240117-bacca82a8/tools/mediatek/ar-table/ar-table.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/ar-table/ar-table.py rename to atf-20240117-bacca82a8/tools/mediatek/ar-table/ar-table.py diff --git a/atf-20231013-0ea67d76a/tools/mediatek/ar-table/example/ar_table.xml b/atf-20240117-bacca82a8/tools/mediatek/ar-table/example/ar_table.xml similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/ar-table/example/ar_table.xml rename to atf-20240117-bacca82a8/tools/mediatek/ar-table/example/ar_table.xml diff --git a/atf-20231013-0ea67d76a/tools/mediatek/ar-tool/Makefile b/atf-20240117-bacca82a8/tools/mediatek/ar-tool/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/ar-tool/Makefile rename to atf-20240117-bacca82a8/tools/mediatek/ar-tool/Makefile diff --git a/atf-20231013-0ea67d76a/tools/mediatek/ar-tool/ar-tool.py b/atf-20240117-bacca82a8/tools/mediatek/ar-tool/ar-tool.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/ar-tool/ar-tool.py rename to atf-20240117-bacca82a8/tools/mediatek/ar-tool/ar-tool.py diff --git a/atf-20231013-0ea67d76a/tools/mediatek/ar-tool/example/bl_ar_table.xml b/atf-20240117-bacca82a8/tools/mediatek/ar-tool/example/bl_ar_table.xml similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/ar-tool/example/bl_ar_table.xml rename to atf-20240117-bacca82a8/tools/mediatek/ar-tool/example/bl_ar_table.xml diff --git a/atf-20231013-0ea67d76a/tools/mediatek/ar-tool/example/fw_ar_table.xml b/atf-20240117-bacca82a8/tools/mediatek/ar-tool/example/fw_ar_table.xml similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/ar-tool/example/fw_ar_table.xml rename to atf-20240117-bacca82a8/tools/mediatek/ar-tool/example/fw_ar_table.xml diff --git a/atf-20231013-0ea67d76a/tools/mediatek/bromimage/Makefile b/atf-20240117-bacca82a8/tools/mediatek/bromimage/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/bromimage/Makefile rename to atf-20240117-bacca82a8/tools/mediatek/bromimage/Makefile diff --git a/atf-20231013-0ea67d76a/tools/mediatek/bromimage/bromimage b/atf-20240117-bacca82a8/tools/mediatek/bromimage/bromimage similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/bromimage/bromimage rename to atf-20240117-bacca82a8/tools/mediatek/bromimage/bromimage diff --git a/atf-20231013-0ea67d76a/tools/mediatek/bromimage/bromimage-linux-i686 b/atf-20240117-bacca82a8/tools/mediatek/bromimage/bromimage-linux-i686 similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/bromimage/bromimage-linux-i686 rename to atf-20240117-bacca82a8/tools/mediatek/bromimage/bromimage-linux-i686 diff --git a/atf-20231013-0ea67d76a/tools/mediatek/bromimage/bromimage-linux-x86_64 b/atf-20240117-bacca82a8/tools/mediatek/bromimage/bromimage-linux-x86_64 similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/bromimage/bromimage-linux-x86_64 rename to atf-20240117-bacca82a8/tools/mediatek/bromimage/bromimage-linux-x86_64 diff --git a/atf-20231013-0ea67d76a/tools/mediatek/bromimage/licenses/COPYRIGHT.musl b/atf-20240117-bacca82a8/tools/mediatek/bromimage/licenses/COPYRIGHT.musl similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/bromimage/licenses/COPYRIGHT.musl rename to atf-20240117-bacca82a8/tools/mediatek/bromimage/licenses/COPYRIGHT.musl diff --git a/atf-20231013-0ea67d76a/tools/mediatek/bromimage/licenses/LICENSE.openssl b/atf-20240117-bacca82a8/tools/mediatek/bromimage/licenses/LICENSE.openssl similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/bromimage/licenses/LICENSE.openssl rename to atf-20240117-bacca82a8/tools/mediatek/bromimage/licenses/LICENSE.openssl diff --git a/atf-20231013-0ea67d76a/tools/mediatek/signoffline/Makefile b/atf-20240117-bacca82a8/tools/mediatek/signoffline/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/signoffline/Makefile rename to atf-20240117-bacca82a8/tools/mediatek/signoffline/Makefile diff --git a/atf-20231013-0ea67d76a/tools/mediatek/signoffline/signoffline.c b/atf-20240117-bacca82a8/tools/mediatek/signoffline/signoffline.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/mediatek/signoffline/signoffline.c rename to atf-20240117-bacca82a8/tools/mediatek/signoffline/signoffline.c diff --git a/atf-20231013-0ea67d76a/tools/memory/__init__.py b/atf-20240117-bacca82a8/tools/memory/__init__.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/memory/__init__.py rename to atf-20240117-bacca82a8/tools/memory/__init__.py diff --git a/atf-20231013-0ea67d76a/tools/memory/memory/__init__.py b/atf-20240117-bacca82a8/tools/memory/memory/__init__.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/memory/memory/__init__.py rename to atf-20240117-bacca82a8/tools/memory/memory/__init__.py diff --git a/atf-20231013-0ea67d76a/tools/memory/memory/buildparser.py b/atf-20240117-bacca82a8/tools/memory/memory/buildparser.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/memory/memory/buildparser.py rename to atf-20240117-bacca82a8/tools/memory/memory/buildparser.py diff --git a/atf-20231013-0ea67d76a/tools/memory/memory/elfparser.py b/atf-20240117-bacca82a8/tools/memory/memory/elfparser.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/memory/memory/elfparser.py rename to atf-20240117-bacca82a8/tools/memory/memory/elfparser.py diff --git a/atf-20231013-0ea67d76a/tools/memory/memory/mapparser.py b/atf-20240117-bacca82a8/tools/memory/memory/mapparser.py similarity index 95% rename from atf-20231013-0ea67d76a/tools/memory/memory/mapparser.py rename to atf-20240117-bacca82a8/tools/memory/memory/mapparser.py index b1a4b4c5c..ce4cc3113 100644 --- a/atf-20231013-0ea67d76a/tools/memory/memory/mapparser.py +++ b/atf-20240117-bacca82a8/tools/memory/memory/mapparser.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2023, Arm Limited. All rights reserved. +# Copyright (c) 2023-2024, Arm Limited. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -57,7 +57,7 @@ class TfaMapParser: if "start" and "length" and "end" in memory_layout[region]: memory_layout[region]["limit"] = ( - memory_layout[region]["end"] + memory_layout[region]["start"] + memory_layout[region]["length"] ) memory_layout[region]["free"] = ( diff --git a/atf-20231013-0ea67d76a/tools/memory/memory/memmap.py b/atf-20240117-bacca82a8/tools/memory/memory/memmap.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/memory/memory/memmap.py rename to atf-20240117-bacca82a8/tools/memory/memory/memmap.py diff --git a/atf-20231013-0ea67d76a/tools/memory/memory/printer.py b/atf-20240117-bacca82a8/tools/memory/memory/printer.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/memory/memory/printer.py rename to atf-20240117-bacca82a8/tools/memory/memory/printer.py diff --git a/atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/cert_create_tbbr.mk b/atf-20240117-bacca82a8/tools/nxp/cert_create_helper/cert_create_tbbr.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/cert_create_tbbr.mk rename to atf-20240117-bacca82a8/tools/nxp/cert_create_helper/cert_create_tbbr.mk diff --git a/atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/include/pdef_tbb_cert.h b/atf-20240117-bacca82a8/tools/nxp/cert_create_helper/include/pdef_tbb_cert.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/include/pdef_tbb_cert.h rename to atf-20240117-bacca82a8/tools/nxp/cert_create_helper/include/pdef_tbb_cert.h diff --git a/atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/include/pdef_tbb_ext.h b/atf-20240117-bacca82a8/tools/nxp/cert_create_helper/include/pdef_tbb_ext.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/include/pdef_tbb_ext.h rename to atf-20240117-bacca82a8/tools/nxp/cert_create_helper/include/pdef_tbb_ext.h diff --git a/atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/include/pdef_tbb_key.h b/atf-20240117-bacca82a8/tools/nxp/cert_create_helper/include/pdef_tbb_key.h similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/include/pdef_tbb_key.h rename to atf-20240117-bacca82a8/tools/nxp/cert_create_helper/include/pdef_tbb_key.h diff --git a/atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/src/pdef_tbb_cert.c b/atf-20240117-bacca82a8/tools/nxp/cert_create_helper/src/pdef_tbb_cert.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/src/pdef_tbb_cert.c rename to atf-20240117-bacca82a8/tools/nxp/cert_create_helper/src/pdef_tbb_cert.c diff --git a/atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/src/pdef_tbb_ext.c b/atf-20240117-bacca82a8/tools/nxp/cert_create_helper/src/pdef_tbb_ext.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/src/pdef_tbb_ext.c rename to atf-20240117-bacca82a8/tools/nxp/cert_create_helper/src/pdef_tbb_ext.c diff --git a/atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/src/pdef_tbb_key.c b/atf-20240117-bacca82a8/tools/nxp/cert_create_helper/src/pdef_tbb_key.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/cert_create_helper/src/pdef_tbb_key.c rename to atf-20240117-bacca82a8/tools/nxp/cert_create_helper/src/pdef_tbb_key.c diff --git a/atf-20231013-0ea67d76a/tools/nxp/create_pbl/Makefile b/atf-20240117-bacca82a8/tools/nxp/create_pbl/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/create_pbl/Makefile rename to atf-20240117-bacca82a8/tools/nxp/create_pbl/Makefile diff --git a/atf-20231013-0ea67d76a/tools/nxp/create_pbl/README b/atf-20240117-bacca82a8/tools/nxp/create_pbl/README similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/create_pbl/README rename to atf-20240117-bacca82a8/tools/nxp/create_pbl/README diff --git a/atf-20231013-0ea67d76a/tools/nxp/create_pbl/byte_swap.c b/atf-20240117-bacca82a8/tools/nxp/create_pbl/byte_swap.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/create_pbl/byte_swap.c rename to atf-20240117-bacca82a8/tools/nxp/create_pbl/byte_swap.c diff --git a/atf-20231013-0ea67d76a/tools/nxp/create_pbl/create_pbl.c b/atf-20240117-bacca82a8/tools/nxp/create_pbl/create_pbl.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/create_pbl/create_pbl.c rename to atf-20240117-bacca82a8/tools/nxp/create_pbl/create_pbl.c diff --git a/atf-20231013-0ea67d76a/tools/nxp/create_pbl/create_pbl.mk b/atf-20240117-bacca82a8/tools/nxp/create_pbl/create_pbl.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/create_pbl/create_pbl.mk rename to atf-20240117-bacca82a8/tools/nxp/create_pbl/create_pbl.mk diff --git a/atf-20231013-0ea67d76a/tools/nxp/create_pbl/pbl_ch2.mk b/atf-20240117-bacca82a8/tools/nxp/create_pbl/pbl_ch2.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/create_pbl/pbl_ch2.mk rename to atf-20240117-bacca82a8/tools/nxp/create_pbl/pbl_ch2.mk diff --git a/atf-20231013-0ea67d76a/tools/nxp/create_pbl/pbl_ch3.mk b/atf-20240117-bacca82a8/tools/nxp/create_pbl/pbl_ch3.mk similarity index 100% rename from atf-20231013-0ea67d76a/tools/nxp/create_pbl/pbl_ch3.mk rename to atf-20240117-bacca82a8/tools/nxp/create_pbl/pbl_ch3.mk diff --git a/atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/makefile b/atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/makefile rename to atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/makefile diff --git a/atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa0.c b/atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa0.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa0.c rename to atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa0.c diff --git a/atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa0.ld.S b/atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa0.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa0.ld.S rename to atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa0.ld.S diff --git a/atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa6.c b/atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa6.c similarity index 98% rename from atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa6.c rename to atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa6.c index 8fafdaded..58881f971 100644 --- a/atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa6.c +++ b/atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa6.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2021, Renesas Electronics Corporation. All rights reserved. + * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -91,7 +91,7 @@ #define RCAR_BL31DST_ADDRESS (0x44000000U) #define RCAR_BL31DST_ADDRESSH (0x00000000U) /* Destination size for BL31 */ -#define RCAR_BL31DST_SIZE (0x00004000U) +#define RCAR_BL31DST_SIZE (0x0000F800U) /* Destination address for BL32 */ #define RCAR_BL32DST_ADDRESS (0x44100000U) #define RCAR_BL32DST_ADDRESSH (0x00000000U) diff --git a/atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa6.ld.S b/atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa6.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rcar_layout_create/sa6.ld.S rename to atf-20240117-bacca82a8/tools/renesas/rcar_layout_create/sa6.ld.S diff --git a/atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/makefile b/atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/makefile rename to atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/makefile diff --git a/atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa0.c b/atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa0.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa0.c rename to atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa0.c diff --git a/atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa0.ld.S b/atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa0.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa0.ld.S rename to atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa0.ld.S diff --git a/atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa6.c b/atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa6.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa6.c rename to atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa6.c diff --git a/atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa6.ld.S b/atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa6.ld.S similarity index 100% rename from atf-20231013-0ea67d76a/tools/renesas/rzg_layout_create/sa6.ld.S rename to atf-20240117-bacca82a8/tools/renesas/rzg_layout_create/sa6.ld.S diff --git a/atf-20231013-0ea67d76a/tools/sptool/Makefile b/atf-20240117-bacca82a8/tools/sptool/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/sptool/Makefile rename to atf-20240117-bacca82a8/tools/sptool/Makefile diff --git a/atf-20231013-0ea67d76a/tools/sptool/sp_mk_generator.py b/atf-20240117-bacca82a8/tools/sptool/sp_mk_generator.py similarity index 97% rename from atf-20231013-0ea67d76a/tools/sptool/sp_mk_generator.py rename to atf-20240117-bacca82a8/tools/sptool/sp_mk_generator.py index c69e0a73d..06fa520dd 100644 --- a/atf-20231013-0ea67d76a/tools/sptool/sp_mk_generator.py +++ b/atf-20240117-bacca82a8/tools/sptool/sp_mk_generator.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -# Copyright (c) 2020-2023, Arm Limited. All rights reserved. +# Copyright (c) 2020-2024, Arm Limited. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause @@ -136,7 +136,10 @@ def get_load_address(sp_layout, sp, args :dict): ''' Helper to fetch load-address from pm file listed in sp_layout.json''' with open(get_sp_manifest_full_path(sp_layout[sp], args), "r") as pm_f: load_address_lines = [l for l in pm_f if 'load-address' in l] - assert(len(load_address_lines) == 1) + + if len(load_address_lines) is not 1: + return None + load_address_parsed = re.search("(0x[0-9a-f]+)", load_address_lines[0]) return load_address_parsed.group(0) @@ -240,7 +243,8 @@ def gen_fconf_fragment(sp_layout, sp, args: dict): else: load_address = get_load_address(sp_layout, sp, args) - f.write( + if load_address is not None: + f.write( f'''\ {sp} {{ uuid = "{uuid}"; @@ -249,6 +253,9 @@ f'''\ }}; ''') + else: + print("Warning: No load-address was found in the SP manifest.") + return args def init_sp_actions(sys): diff --git a/atf-20231013-0ea67d76a/tools/sptool/spactions.py b/atf-20240117-bacca82a8/tools/sptool/spactions.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/sptool/spactions.py rename to atf-20240117-bacca82a8/tools/sptool/spactions.py diff --git a/atf-20231013-0ea67d76a/tools/sptool/sptool.py b/atf-20240117-bacca82a8/tools/sptool/sptool.py similarity index 100% rename from atf-20231013-0ea67d76a/tools/sptool/sptool.py rename to atf-20240117-bacca82a8/tools/sptool/sptool.py diff --git a/atf-20231013-0ea67d76a/tools/stm32image/Makefile b/atf-20240117-bacca82a8/tools/stm32image/Makefile similarity index 100% rename from atf-20231013-0ea67d76a/tools/stm32image/Makefile rename to atf-20240117-bacca82a8/tools/stm32image/Makefile diff --git a/atf-20231013-0ea67d76a/tools/stm32image/stm32image.c b/atf-20240117-bacca82a8/tools/stm32image/stm32image.c similarity index 100% rename from atf-20231013-0ea67d76a/tools/stm32image/stm32image.c rename to atf-20240117-bacca82a8/tools/stm32image/stm32image.c diff --git a/build.sh b/build.sh index 8230d89ab..a402478a1 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ TOOLCHAIN=aarch64-linux-gnu- #UBOOT_DIR=uboot-mtk-20220606 UBOOT_DIR=uboot-mtk-20230718-09eda825 #ATF_DIR=atf-20220606-637ba581b -ATF_DIR=atf-20231013-0ea67d76a +ATF_DIR=atf-20240117-bacca82a8 if [ -z "$SOC" ] || [ -z "$BOARD" ]; then echo "Usage: SOC=[mt7981|mt7986] BOARD= MULTI_LAYOUT=[0|1] $0" @@ -59,9 +59,9 @@ if [ "$fixedparts" = "1" ]; then echo "CONFIG_MTK_FIXED_MTD_MTDPARTS=y" >> "$UBOOT_DIR/.config" fi make -C "$UBOOT_DIR" olddefconfig +make -C "$UBOOT_DIR" clean make -C "$UBOOT_DIR" -j $(nproc) all if [ -f "$UBOOT_DIR/u-boot.bin" ]; then - cp -f "$UBOOT_DIR/u-boot.bin" "$ATF_DIR/u-boot.bin" echo "u-boot build done!" else echo "u-boot build fail!" @@ -69,13 +69,18 @@ else fi echo "Build atf..." -make -C "$ATF_DIR" -f makefile "$ATF_CFG" CONFIG_CROSS_COMPILER="${TOOLCHAIN}" -make -C "$ATF_DIR" -f makefile clean CONFIG_CROSS_COMPILER="${TOOLCHAIN}" +if [ -e "$ATF_DIR/makefile" ]; then + ATF_MKFILE="makefile" +else + ATF_MKFILE="Makefile" +fi +make -C "$ATF_DIR" -f "$ATF_MKFILE" clean CONFIG_CROSS_COMPILER="$TOOLCHAIN" CROSS_COMPILER="$TOOLCHAIN" rm -rf "$ATF_DIR/build" -make -C "$ATF_DIR" -f makefile all CONFIG_CROSS_COMPILER="${TOOLCHAIN}" +make -C "$ATF_DIR" -f "$ATF_MKFILE" "$ATF_CFG" CONFIG_CROSS_COMPILER="$TOOLCHAIN" CROSS_COMPILER="$TOOLCHAIN" +make -C "$ATF_DIR" -f "$ATF_MKFILE" all CONFIG_CROSS_COMPILER="$TOOLCHAIN" CROSS_COMPILER="$TOOLCHAIN" CONFIG_BL33="../$UBOOT_DIR/u-boot.bin" BL33="../$UBOOT_DIR/u-boot.bin" -j $(nproc) mkdir -p "output" -if [ -f "$ATF_DIR/build/${SOC}/release/fip.bin" ]; then +if [ -f "$ATF_DIR/build/$SOC/release/fip.bin" ]; then FIP_NAME="${SOC}_${BOARD}-fip" if [ "$fixedparts" = "1" ]; then FIP_NAME="${FIP_NAME}-fixed-parts" @@ -83,16 +88,16 @@ if [ -f "$ATF_DIR/build/${SOC}/release/fip.bin" ]; then if [ "$multilayout" = "1" ]; then FIP_NAME="${FIP_NAME}-multi-layout" fi - cp -f "$ATF_DIR/build/${SOC}/release/fip.bin" "output/${FIP_NAME}.bin" + cp -f "$ATF_DIR/build/$SOC/release/fip.bin" "output/$FIP_NAME.bin" echo "$FIP_NAME build done" else echo "fip build fail!" exit 1 fi -if grep -q "CONFIG_TARGET_ALL_NO_SEC_BOOT=y" "$ATF_DIR/configs/$ATF_CFG"; then - if [ -f "$ATF_DIR/build/${SOC}/release/bl2.img" ]; then +if grep -Eq "(^_|CONFIG_TARGET_ALL_NO_SEC_BOOT=y)" "$ATF_DIR/configs/$ATF_CFG"; then + if [ -f "$ATF_DIR/build/$SOC/release/bl2.img" ]; then BL2_NAME="${SOC}_${BOARD}-bl2" - cp -f "$ATF_DIR/build/${SOC}/release/bl2.img" "output/${BL2_NAME}.bin" + cp -f "$ATF_DIR/build/$SOC/release/bl2.img" "output/$BL2_NAME.bin" echo "$BL2_NAME build done" else echo "bl2 build fail!"