History log of /rk3399_ARM-atf/lib/ (Results 501 – 525 of 2463)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
c9f352c316-Oct-2024 Boyan Karatotev <boyan.karatotev@arm.com>

fix(cpus): clear CPUPWRCTLR_EL1.CORE_PWRDN_EN_BIT on reset

The model has a bug where it will not clear CPUPWRCTLR_EL1 on reset,
even though the actual cores do. The write of 1 to the bit itself
trig

fix(cpus): clear CPUPWRCTLR_EL1.CORE_PWRDN_EN_BIT on reset

The model has a bug where it will not clear CPUPWRCTLR_EL1 on reset,
even though the actual cores do. The write of 1 to the bit itself
triggers the powerdown sequnece, regardless of the value before the
write. As such, the bug does not impact functionality but it does throw
off software reading it.

Clear the bit on Travis and Gelas as they are the only ones to require
reading it back.

Change-Id: I765a7fa055733d522480be30d412e3b417af2bd7
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>

show more ...

697290a904-Feb-2025 Manish V Badarkhe <manish.badarkhe@arm.com>

Merge changes from topic "us_tc_trng" into integration

* changes:
feat(tc): get entropy with PSA Crypto API
feat(psa): add interface with RSE for retrieving entropy
fix(psa): guard Crypto APIs

Merge changes from topic "us_tc_trng" into integration

* changes:
feat(tc): get entropy with PSA Crypto API
feat(psa): add interface with RSE for retrieving entropy
fix(psa): guard Crypto APIs with CRYPTO_SUPPORT
feat(tc): enable trng
feat(tc): initialize the RSE communication in earlier phase

show more ...

1147a47031-Jan-2025 Leo Yan <leo.yan@arm.com>

feat(psa): add interface with RSE for retrieving entropy

Add the AP/RSS interface for reading the entropy. And update the
document for the API.

Change-Id: I61492d6b5d824a01ffeadc92f9d41ca841ba3367

feat(psa): add interface with RSE for retrieving entropy

Add the AP/RSS interface for reading the entropy. And update the
document for the API.

Change-Id: I61492d6b5d824a01ffeadc92f9d41ca841ba3367
Signed-off-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>

show more ...

8a41106c31-Jan-2025 Leo Yan <leo.yan@arm.com>

fix(psa): guard Crypto APIs with CRYPTO_SUPPORT

When building Crypto APIs, it requires dependency on external headers,
e.g., Mbedtls headers. Without the CRYPTO_SUPPORT configuration,
external depe

fix(psa): guard Crypto APIs with CRYPTO_SUPPORT

When building Crypto APIs, it requires dependency on external headers,
e.g., Mbedtls headers. Without the CRYPTO_SUPPORT configuration,
external dependencies are not set up, building Crypto APIs will fail.

Guard Crypto APIs with the CRYPTO_SUPPORT configuration, to make sure
the code is built only for Crypto enabled case.

Change-Id: Iffe1220b0e6272586c46432b4f8d0512cb39b0b5
Signed-off-by: Leo Yan <leo.yan@arm.com>

show more ...


/rk3399_ARM-atf/.github/CODEOWNERS
/rk3399_ARM-atf/.github/dependabot.yml
/rk3399_ARM-atf/Makefile
/rk3399_ARM-atf/fdts/tc-base.dtsi
/rk3399_ARM-atf/include/lib/psa/rse_platform_api.h
psa/rse_platform.c
/rk3399_ARM-atf/plat/arm/board/neoverse_rd/platform/rdv3/rdv3_common.c
/rk3399_ARM-atf/plat/arm/board/tc/platform.mk
/rk3399_ARM-atf/plat/arm/board/tc/tc_bl31_setup.c
/rk3399_ARM-atf/plat/arm/board/tc/tc_rng_trap.c
/rk3399_ARM-atf/plat/arm/board/tc/tc_stack_protector.c
/rk3399_ARM-atf/plat/intel/soc/agilex/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/agilex5/bl31_plat_setup.c
/rk3399_ARM-atf/plat/intel/soc/agilex5/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/common/aarch64/plat_helpers.S
/rk3399_ARM-atf/plat/intel/soc/common/include/platform_def.h
/rk3399_ARM-atf/plat/intel/soc/common/soc/socfpga_reset_manager.c
/rk3399_ARM-atf/plat/intel/soc/common/socfpga_psci.c
/rk3399_ARM-atf/plat/intel/soc/n5x/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/stratix10/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_power.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_security_ctrl_plat.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/mminfra/mminfra_stub.c
/rk3399_ARM-atf/plat/mediatek/drivers/mminfra/rules.mk
/rk3399_ARM-atf/plat/mediatek/include/drivers/mminfra_public.h
/rk3399_ARM-atf/plat/mediatek/mt8196/include/platform_def.h
/rk3399_ARM-atf/plat/mediatek/mt8196/plat_config.mk
/rk3399_ARM-atf/plat/mediatek/mt8196/platform.mk
/rk3399_ARM-atf/plat/rockchip/rk3399/drivers/pmu/pmu_fw.S
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/pm_api_clock.h
/rk3399_ARM-atf/tools/sptool/sp_mk_generator.py
e25fc9df22-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Neoverse-V3 erratum 3701767

Neoverse-V3 erratum 3701767 that applies to r0p0, r0p1, r0p2 is
still Open.

The workaround is for EL3 software that performs context save/resto

fix(cpus): workaround for Neoverse-V3 erratum 3701767

Neoverse-V3 erratum 3701767 that applies to r0p0, r0p1, r0p2 is
still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-2891958/latest/

Change-Id: I5be0de881f408a9e82a07b8459d79490e9065f94
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

fded839222-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Neoverse-N3 erratum 3699563

Neoverse-N3 erratum 3699563 that applies to r0p0 is still Open.

The workaround is for EL3 software that performs context save/restore
on a chan

fix(cpus): workaround for Neoverse-N3 erratum 3699563

Neoverse-N3 erratum 3699563 that applies to r0p0 is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-3050973/latest/

Change-Id: I77aaf8ae0afff3adde9a85f4a1a13ac9d1daf0af
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

adea6e5222-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Neoverse-N2 erratum 3701773

Neoverse-N2 erratum 3701773 that applies to r0p0, r0p1, r0p2 and r0p3
is still Open.

The workaround is for EL3 software that performs context s

fix(cpus): workaround for Neoverse-N2 erratum 3701773

Neoverse-N2 erratum 3701773 that applies to r0p0, r0p1, r0p2 and r0p3
is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1982442/latest/

Change-Id: If95bd67363228c8083724b31f630636fb27f3b61
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

511148ef22-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-X925 erratum 3701747

Cortex-X925 erratum 3701747 that applies to r0p0, r0p1 and is still
Open.

The workaround is for EL3 software that performs context save/restore

fix(cpus): workaround for Cortex-X925 erratum 3701747

Cortex-X925 erratum 3701747 that applies to r0p0, r0p1 and is still
Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/109180/latest/

Change-Id: I080296666f89276b3260686c2bdb8de63fc174c1
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

38401c5322-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-X4 erratum 3701758

Cortex-X4 erratum 3701758 that applies to r0p0, r0p1, r0p2 and r0p3
is still Open.

The workaround is for EL3 software that performs context save/

fix(cpus): workaround for Cortex-X4 erratum 3701758

Cortex-X4 erratum 3701758 that applies to r0p0, r0p1, r0p2 and r0p3
is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/109148/latest/

Change-Id: I4ee941d1e7653de7a12d69f538ca05f7f9f9961d
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

77feb74522-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-X3 erratum 3701769

Cortex-X3 erratum 3701769 that applies to r0p0, r1p0, r1p1 and r1p2
is still Open.

The workaround is for EL3 software that performs context save/

fix(cpus): workaround for Cortex-X3 erratum 3701769

Cortex-X3 erratum 3701769 that applies to r0p0, r1p0, r1p1 and r1p2
is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-2055130/latest/

Change-Id: Ifd722e1bb8616ada2ad158297a7ca80b19a3370b
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

ae6c7c9722-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-X2 erratum 3701772

Cortex-X2 erratum 3701772 that applies to r0p0, r1p0, r2p0, r2p1
is still Open.

The workaround is for EL3 software that performs context save/res

fix(cpus): workaround for Cortex-X2 erratum 3701772

Cortex-X2 erratum 3701772 that applies to r0p0, r1p0, r2p0, r2p1
is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1775100/latest/

Change-Id: I2ffc5e7d7467f1bcff8b895fea52a1daa7d14495
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

d732300b21-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-A725 erratum 3699564

Cortex-A725 erratum 3699564 that applies to r0p0, r0p1 and is
fixed in r0p2.

The workaround is for EL3 software that performs context save/rest

fix(cpus): workaround for Cortex-A725 erratum 3699564

Cortex-A725 erratum 3699564 that applies to r0p0, r0p1 and is
fixed in r0p2.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-2832921/latest

Change-Id: Ifad1f6c3f5b74060273f897eb5e4b79dd9f088f7
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

af5ae9a721-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-A720-AE erratum 3699562

Cortex-A720-AE erratum 3699562 that applies to r0p0 and is still
Open.

The workaround is for EL3 software that performs context save/restore

fix(cpus): workaround for Cortex-A720-AE erratum 3699562

Cortex-A720-AE erratum 3699562 that applies to r0p0 and is still
Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-3090091/latest/

Change-Id: Ib830470747822cac916750c01684a65cb5efc15b
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

050c4a3821-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-A720 erratum 3699561

Cortex-A720 erratum 3699561 that applies to all revisions <= r0p2
and is still Open.

The workaround is for EL3 software that performs context s

fix(cpus): workaround for Cortex-A720 erratum 3699561

Cortex-A720 erratum 3699561 that applies to all revisions <= r0p2
and is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-2439421/latest/

Change-Id: I7ea3aaf3e7bf6b4f3648f6872e505a41247b14ba
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

26437afd21-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-A715 erratum 3699560

Cortex-A715 erratum 3699560 that applies to all revisions <= r1p3
and is still Open.

The workaround is for EL3 software that performs context s

fix(cpus): workaround for Cortex-A715 erratum 3699560

Cortex-A715 erratum 3699560 that applies to all revisions <= r1p3
and is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-2148827/latest/

Change-Id: I183aa921b4b6f715d64eb6b70809de2566017d31
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

463b5b4a21-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for Cortex-A710 erratum 3701772

Cortex-A710 erratum 3701772 that applies to all revisions <= r2p1
and is still Open.

The workaround is for EL3 software that performs context s

fix(cpus): workaround for Cortex-A710 erratum 3701772

Cortex-A710 erratum 3701772 that applies to all revisions <= r2p1
and is still Open.

The workaround is for EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1775101/latest/

Change-Id: I997c9cfaa75321f22b4f690c4d3f234c0b51c670
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...

7455cd1729-Jan-2025 Govindraj Raja <govindraj.raja@arm.com>

fix(cpus): workaround for accessing ICH_VMCR_EL2

When ICH_VMCR_EL2.VBPR1 is written in Secure state (SCR_EL3.NS==0)
and then subsequently read in Non-secure state (SCR_EL3.NS==1), a
wrong value migh

fix(cpus): workaround for accessing ICH_VMCR_EL2

When ICH_VMCR_EL2.VBPR1 is written in Secure state (SCR_EL3.NS==0)
and then subsequently read in Non-secure state (SCR_EL3.NS==1), a
wrong value might be returned. The same issue exists in the opposite way.

Adding workaround in EL3 software that performs context save/restore
on a change of Security state to use a value of SCR_EL3.NS when
accessing ICH_VMCR_EL2 that reflects the Security state that owns the
data being saved or restored. For example, EL3 software should set
SCR_EL3.NS to 1 when saving or restoring the value ICH_VMCR_EL2 for
Non-secure(or Realm) state. EL3 software should clear
SCR_EL3.NS to 0 when saving or restoring the value ICH_VMCR_EL2 for
Secure state.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1775101/latest/

Change-Id: I9f0403601c6346276e925f02eab55908b009d957
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>

show more ...


/rk3399_ARM-atf/.github/CODEOWNERS
/rk3399_ARM-atf/.github/dependabot.yml
/rk3399_ARM-atf/Makefile
/rk3399_ARM-atf/include/lib/cpus/errata.h
cpus/errata_common.c
el3_runtime/aarch64/context_mgmt.c
/rk3399_ARM-atf/plat/arm/board/neoverse_rd/platform/rdv3/rdv3_common.c
/rk3399_ARM-atf/plat/arm/board/tc/platform.mk
/rk3399_ARM-atf/plat/arm/board/tc/tc_stack_protector.c
/rk3399_ARM-atf/plat/intel/soc/agilex/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/agilex5/bl31_plat_setup.c
/rk3399_ARM-atf/plat/intel/soc/agilex5/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/common/aarch64/plat_helpers.S
/rk3399_ARM-atf/plat/intel/soc/common/include/platform_def.h
/rk3399_ARM-atf/plat/intel/soc/common/soc/socfpga_reset_manager.c
/rk3399_ARM-atf/plat/intel/soc/common/socfpga_psci.c
/rk3399_ARM-atf/plat/intel/soc/n5x/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/stratix10/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_power.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_security_ctrl_plat.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/mminfra/mminfra_stub.c
/rk3399_ARM-atf/plat/mediatek/drivers/mminfra/rules.mk
/rk3399_ARM-atf/plat/mediatek/include/drivers/mminfra_public.h
/rk3399_ARM-atf/plat/mediatek/mt8196/include/platform_def.h
/rk3399_ARM-atf/plat/mediatek/mt8196/plat_config.mk
/rk3399_ARM-atf/plat/mediatek/mt8196/platform.mk
/rk3399_ARM-atf/plat/rockchip/rk3399/drivers/pmu/pmu_fw.S
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/pm_api_clock.h
/rk3399_ARM-atf/tools/sptool/sp_mk_generator.py
db5fe4f408-Oct-2024 Boyan Karatotev <boyan.karatotev@arm.com>

chore(docs): drop the "wfi" from `pwr_domain_pwr_down_wfi`

To allow for generic handling of a wakeup, this hook is no longer
expected to call wfi itself. Update the name everywhere to reflect this
e

chore(docs): drop the "wfi" from `pwr_domain_pwr_down_wfi`

To allow for generic handling of a wakeup, this hook is no longer
expected to call wfi itself. Update the name everywhere to reflect this
expectation so that future platform implementers don't get misled.

Change-Id: Ic33f0b6da74592ad6778fd802c2f0b85223af614
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>

show more ...

dc0bf48608-Oct-2024 Boyan Karatotev <boyan.karatotev@arm.com>

chore(psci): drop skip_wfi variable

There is now a convent place at the end of the function to jump to when
we shouldn't power down. This eliminates the need for skip_wfi.

Change-Id: I8d1a88c77463e

chore(psci): drop skip_wfi variable

There is now a convent place at the end of the function to jump to when
we shouldn't power down. This eliminates the need for skip_wfi.

Change-Id: I8d1a88c77463e8ee6765b185adbe3d23d9fce101
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>

show more ...

45c7328c20-Sep-2024 Boyan Karatotev <boyan.karatotev@arm.com>

fix(cpus): avoid SME related loss of context on powerdown

Travis' and Gelas' TRMs tell us to disable SME (set PSTATE.{ZA, SM} to
0) when we're attempting to power down. What they don't tell us is th

fix(cpus): avoid SME related loss of context on powerdown

Travis' and Gelas' TRMs tell us to disable SME (set PSTATE.{ZA, SM} to
0) when we're attempting to power down. What they don't tell us is that
if this isn't done, the powerdown request will be rejected. On the
CPU_OFF path that's not a problem - we can force SVCR to 0 and be
certain the core will power off.

On the suspend to powerdown path, however, we cannot do this. The TRM
also tells us that the sequence could also be aborted on eg. GIC
interrupts. If this were to happen when we have overwritten SVCR to 0,
upon a return to the caller they would experience a loss of context. We
know that at least Linux may call into PSCI with SVCR != 0. One option
is to save the entire SME context which would be quite expensive just to
work around. Another option is to downgrade the request to a normal
suspend when SME was left on. This option is better as this is expected
to happen rarely enough to ignore the wasted power and we don't want to
burden the generic (correct) path with needless context management.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I698fa8490ebf51461f6aa8bba84f9827c5c46ad4

show more ...

2b5e00d419-Dec-2024 Boyan Karatotev <boyan.karatotev@arm.com>

feat(psci): allow cores to wake up from powerdown

The simplistic view of a core's powerdown sequence is that power is
atomically cut upon calling `wfi`. However, it turns out that it has
lots to do

feat(psci): allow cores to wake up from powerdown

The simplistic view of a core's powerdown sequence is that power is
atomically cut upon calling `wfi`. However, it turns out that it has
lots to do - it has to talk to the interconnect to exit coherency, clean
caches, check for RAS errors, etc. These take significant amounts of
time and are certainly not atomic. As such there is a significant window
of opportunity for external events to happen. Many of these steps are
not destructive to context, so theoretically, the core can just "give
up" half way (or roll certain actions back) and carry on running. The
point in this sequence after which roll back is not possible is called
the point of no return.

One of these actions is the checking for RAS errors. It is possible for
one to happen during this lengthy sequence, or at least remain
undiscovered until that point. If the core were to continue powerdown
when that happens, there would be no (easy) way to inform anyone about
it. Rejecting the powerdown and letting software handle the error is the
best way to implement this.

Arm cores since at least the a510 have included this exact feature. So
far it hasn't been deemed necessary to account for it in firmware due to
the low likelihood of this happening. However, events like GIC wakeup
requests are much more probable. Older cores will powerdown and
immediately power back up when this happens. Travis and Gelas include a
feature similar to the RAS case above, called powerdown abandon. The
idea is that this will improve the latency to service the interrupt by
saving on work which the core and software need to do.

So far firmware has relied on the `wfi` being the point of no return and
if it doesn't explicitly detect a pending interrupt quite early on, it
will embark onto a sequence that it expects to end with shutdown. To
accommodate for it not being a point of no return, we must undo all of
the system management we did, just like in the warm boot entrypoint.

To achieve that, the pwr_domain_pwr_down_wfi hook must not be terminal.
Most recent platforms do some platform management and finish on the
standard `wfi`, followed by a panic or an endless loop as this is
expected to not return. To make this generic, any platform that wishes
to support wakeups must instead let common code call
`psci_power_down_wfi()` right after. Besides wakeups, this lets common
code handle powerdown errata better as well.

Then, the CPU_OFF case is simple - PSCI does not allow it to return. So
the best that can be done is to attempt the `wfi` a few times (the
choice of 32 is arbitrary) in the hope that the wakeup is transient. If
it isn't, the only choice is to panic, as the system is likely to be in
a bad state, eg. interrupts weren't routed away. The same applies for
SYSTEM_OFF, SYSTEM_RESET, and SYSTEM_RESET2. There the panic won't
matter as the system is going offline one way or another. The RAS case
will be considered in a separate patch.

Now, the CPU_SUSPEND case is more involved. First, to powerdown it must
wipe its context as it is not written on warm boot. But it cannot be
overwritten in case of a wakeup. To avoid the catch 22, save a copy that
will only be used if powerdown fails. That is about 500 bytes on the
stack so it hopefully doesn't tip anyone over any limits. In future that
can be avoided by having a core manage its own context.

Second, when the core wakes up, it must undo anything it did to prepare
for poweroff, which for the cores we care about, is writing
CPUPWRCTLR_EL1.CORE_PWRDN_EN. The least intrusive for the cpu library
way of doing this is to simply call the power off hook again and have
the hook toggle the bit. If in the future there need to be more complex
sequences, their direction can be advised on the value of this bit.

Third, do the actual "resume". Most of the logic is already there for
the retention suspend, so that only needs a small touch up to apply to
the powerdown case as well. The missing bit is the powerdown specific
state management. Luckily, the warmboot entrypoint does exactly that
already too, so steal that and we're done.

All of this is hidden behind a FEAT_PABANDON flag since it has a large
memory and runtime cost that we don't want to burden non pabandon cores
with.

Finally, do some function renaming to better reflect their purpose and
make names a little bit more consistent.

Change-Id: I2405b59300c2e24ce02e266f91b7c51474c1145f
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>

show more ...

cc94e71b26-Sep-2024 Boyan Karatotev <boyan.karatotev@arm.com>

refactor(cpus): undo errata mitigations

The workarounds introduced in the three patches starting at
888eafa00b99aa06b4ff688407336811a7ff439a assumed that any powerdown
request will be (forced to be)

refactor(cpus): undo errata mitigations

The workarounds introduced in the three patches starting at
888eafa00b99aa06b4ff688407336811a7ff439a assumed that any powerdown
request will be (forced to be) terminal. This assumption can no longer
be the case for new CPUs so there is a need to revisit these older
cores. Since we may wake up, we now need to respect the workaround's
recommendation that the workaround needs to be reverted on wakeup. So do
exactly that.

Introduce a new helper to toggle bits in assembly. This allows us to
call the workaround twice, with the first call setting the workaround
and second undoing it. This is also used for gelas' an travis' powerdown
routines. This is so the same function can be called again

Also fix the condition in the cpu helper macro as it was subtly wrong

Change-Id: Iff9e5251dc9d8670d085d88c070f78991955e7c3
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>

show more ...

bb80185721-Jan-2025 Boyan Karatotev <boyan.karatotev@arm.com>

feat(cpus): add sysreg_bit_toggle

Introduce a new helper to toggle bits in assembly. This allows us to
call the workaround twice, with the first call setting the workaround
and second undoing it. Th

feat(cpus): add sysreg_bit_toggle

Introduce a new helper to toggle bits in assembly. This allows us to
call the workaround twice, with the first call setting the workaround
and second undoing it. This allows the (errata) workaround functions to
be used to both apply and undo the mitigation.

This is applied to functions where the undo part will be required in
follow-up patches.

Change-Id: I058bad58f5949b2d5fe058101410e33b6be1b8ba
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>

show more ...


/rk3399_ARM-atf/.github/CODEOWNERS
/rk3399_ARM-atf/.github/dependabot.yml
/rk3399_ARM-atf/include/lib/cpus/aarch64/cpu_macros.S
cpus/aarch64/cortex_a710.S
cpus/aarch64/cortex_gelas.S
cpus/aarch64/cortex_x3.S
cpus/aarch64/neoverse_n2.S
cpus/aarch64/travis.S
/rk3399_ARM-atf/plat/arm/board/neoverse_rd/platform/rdv3/rdv3_common.c
/rk3399_ARM-atf/plat/arm/board/tc/platform.mk
/rk3399_ARM-atf/plat/arm/board/tc/tc_stack_protector.c
/rk3399_ARM-atf/plat/intel/soc/agilex/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/agilex5/bl31_plat_setup.c
/rk3399_ARM-atf/plat/intel/soc/agilex5/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/common/aarch64/plat_helpers.S
/rk3399_ARM-atf/plat/intel/soc/common/include/platform_def.h
/rk3399_ARM-atf/plat/intel/soc/common/soc/socfpga_reset_manager.c
/rk3399_ARM-atf/plat/intel/soc/common/socfpga_psci.c
/rk3399_ARM-atf/plat/intel/soc/n5x/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/intel/soc/stratix10/include/socfpga_plat_def.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_power.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_security_ctrl_plat.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/mminfra/mminfra_stub.c
/rk3399_ARM-atf/plat/mediatek/drivers/mminfra/rules.mk
/rk3399_ARM-atf/plat/mediatek/include/drivers/mminfra_public.h
/rk3399_ARM-atf/plat/mediatek/mt8196/include/platform_def.h
/rk3399_ARM-atf/plat/mediatek/mt8196/plat_config.mk
/rk3399_ARM-atf/plat/mediatek/mt8196/platform.mk
/rk3399_ARM-atf/plat/rockchip/rk3399/drivers/pmu/pmu_fw.S
09ada2f814-Dec-2024 Andrei Homescu <ahomescu@google.com>

fix(simd): fix base register in fpregs_context_*

The fpregs_state_* macros require the base register
to point to the start of the simd_regs_t structure.
The fpregs_context_* functions were passing t

fix(simd): fix base register in fpregs_context_*

The fpregs_state_* macros require the base register
to point to the start of the simd_regs_t structure.
The fpregs_context_* functions were passing the
address incorrectly shifted by 512 bytes.

Signed-off-by: Andrei Homescu <ahomescu@google.com>
Change-Id: I757a26f8910c2ab648116e001e06baa3deb2eec4

show more ...


/rk3399_ARM-atf/Makefile
/rk3399_ARM-atf/docs/about/maintainers.rst
/rk3399_ARM-atf/docs/design/trusted-board-boot-build.rst
/rk3399_ARM-atf/docs/design/trusted-board-boot.rst
/rk3399_ARM-atf/docs/getting_started/build-options.rst
/rk3399_ARM-atf/docs/plat/arm/arm-build-options.rst
/rk3399_ARM-atf/docs/porting-guide.rst
/rk3399_ARM-atf/fdts/stm32mp157c-ed1.dts
/rk3399_ARM-atf/fdts/stm32mp15xx-dkx.dtsi
/rk3399_ARM-atf/fdts/tc-base.dtsi
/rk3399_ARM-atf/fdts/tc2.dts
/rk3399_ARM-atf/fdts/tc3-4-base.dtsi
/rk3399_ARM-atf/fdts/tc3.dts
/rk3399_ARM-atf/fdts/tc4.dts
/rk3399_ARM-atf/include/arch/aarch64/arch_helpers.h
/rk3399_ARM-atf/include/drivers/auth/mbedtls/default_mbedtls_config.h
/rk3399_ARM-atf/include/lib/el3_runtime/pubsub.h
/rk3399_ARM-atf/include/plat/arm/board/common/rotpk/rotpk_def.h
/rk3399_ARM-atf/include/plat/nuvoton/common/npcm845x_arm_def.h
el3_runtime/aarch64/context.S
/rk3399_ARM-atf/package-lock.json
/rk3399_ARM-atf/plat/amd/versal2/aarch64/common.c
/rk3399_ARM-atf/plat/amd/versal2/bl31_setup.c
/rk3399_ARM-atf/plat/amd/versal2/include/def.h
/rk3399_ARM-atf/plat/amd/versal2/include/versal2-scmi.h
/rk3399_ARM-atf/plat/amd/versal2/plat_psci.c
/rk3399_ARM-atf/plat/amd/versal2/scmi.c
/rk3399_ARM-atf/plat/amd/versal2/sip_svc_setup.c
/rk3399_ARM-atf/plat/arm/board/common/board_arm_trusted_boot.c
/rk3399_ARM-atf/plat/arm/board/common/board_common.mk
/rk3399_ARM-atf/plat/arm/board/common/protpk/README
/rk3399_ARM-atf/plat/arm/board/common/protpk/arm_dev_protpk.S
/rk3399_ARM-atf/plat/arm/board/common/protpk/arm_protprivk_ecdsa.pem
/rk3399_ARM-atf/plat/arm/board/common/protpk/arm_protprivk_ecdsa_secp384r1.pem
/rk3399_ARM-atf/plat/arm/board/common/rotpk/arm_dev_rotpk.S
/rk3399_ARM-atf/plat/arm/board/common/rotpk/arm_rotprivk_rsa_3k.pem
/rk3399_ARM-atf/plat/arm/board/common/rotpk/arm_rotprivk_rsa_4k.pem
/rk3399_ARM-atf/plat/arm/board/common/swd_rotpk/README
/rk3399_ARM-atf/plat/arm/board/common/swd_rotpk/arm_dev_swd_rotpk.S
/rk3399_ARM-atf/plat/arm/board/common/swd_rotpk/arm_swd_rotprivk_ecdsa.pem
/rk3399_ARM-atf/plat/arm/board/common/swd_rotpk/arm_swd_rotprivk_ecdsa_secp384r1.pem
/rk3399_ARM-atf/plat/arm/board/juno/juno_trusted_boot.c
/rk3399_ARM-atf/plat/arm/board/neoverse_rd/common/nrd_bl31_setup.c
/rk3399_ARM-atf/plat/arm/board/tc/include/platform_def.h
/rk3399_ARM-atf/plat/arm/board/tc/include/tc_helpers.S
/rk3399_ARM-atf/plat/arm/board/tc/tc_bl31_setup.c
/rk3399_ARM-atf/plat/arm/common/arm_bl2_setup.c
/rk3399_ARM-atf/plat/arm/common/arm_common.mk
/rk3399_ARM-atf/plat/arm/common/arm_ni.c
/rk3399_ARM-atf/plat/arm/css/common/css_pm.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/apusys.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/apusys.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/apusys_rv/2.0/apusys_rv_sec_info.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/devapc/apusys_dapc_v1.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8188/apusys_power.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8188/apusys_power.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8188/apusys_rv_mbox_mpu.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8188/apusys_rv_pwr_ctrl.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8188/apusys_security_ctrl_plat.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_ammu.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_ammu.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_devapc.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_devapc.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_devapc_def.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_power.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_power.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_rv_mbox_mpu.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_rv_pwr_ctrl.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_rv_pwr_ctrl.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_security_ctrl_perm_plat.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_security_ctrl_perm_plat.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_security_ctrl_plat.c
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/apusys_security_ctrl_plat.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/mt8196/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/security_ctrl/apusys_security_ctrl_perm.h
/rk3399_ARM-atf/plat/mediatek/drivers/apusys/security_ctrl/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/vcp/mt8196/vcp_helper.h
/rk3399_ARM-atf/plat/mediatek/drivers/vcp/mt8196/vcp_reg.h
/rk3399_ARM-atf/plat/mediatek/drivers/vcp/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/vcp/rv/mmup_common.c
/rk3399_ARM-atf/plat/mediatek/drivers/vcp/rv/mmup_common.h
/rk3399_ARM-atf/plat/mediatek/drivers/vcp/rv/rules.mk
/rk3399_ARM-atf/plat/mediatek/drivers/vcp/rv/vcp_common.c
/rk3399_ARM-atf/plat/mediatek/include/drivers/apusys_rv_public.h
/rk3399_ARM-atf/plat/mediatek/include/mtk_sip_def.h
/rk3399_ARM-atf/plat/mediatek/mt8186/drivers/mcdi/mt_cpu_pm.c
/rk3399_ARM-atf/plat/mediatek/mt8192/drivers/mcdi/mt_cpu_pm.c
/rk3399_ARM-atf/plat/mediatek/mt8195/drivers/mcdi/mt_cpu_pm.c
/rk3399_ARM-atf/plat/mediatek/mt8196/include/platform_def.h
/rk3399_ARM-atf/plat/mediatek/mt8196/plat_config.mk
/rk3399_ARM-atf/plat/mediatek/mt8196/plat_mmap.c
/rk3399_ARM-atf/plat/mediatek/mt8196/platform.mk
/rk3399_ARM-atf/plat/nuvoton/npcm845x/platform.mk
/rk3399_ARM-atf/plat/qemu/common/common.mk
/rk3399_ARM-atf/plat/xilinx/common/include/ipi.h
/rk3399_ARM-atf/plat/xilinx/common/ipi.c
/rk3399_ARM-atf/plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c
/rk3399_ARM-atf/plat/xilinx/common/plat_startup.c
/rk3399_ARM-atf/plat/xilinx/common/pm_service/pm_api_sys.c
/rk3399_ARM-atf/plat/xilinx/common/pm_service/pm_ipi.c
/rk3399_ARM-atf/plat/xilinx/common/pm_service/pm_svc_main.c
/rk3399_ARM-atf/plat/xilinx/common/versal.c
/rk3399_ARM-atf/plat/xilinx/versal/bl31_versal_setup.c
/rk3399_ARM-atf/plat/xilinx/versal/include/versal_def.h
/rk3399_ARM-atf/plat/xilinx/versal/plat_psci.c
/rk3399_ARM-atf/plat/xilinx/versal/pm_service/pm_client.c
/rk3399_ARM-atf/plat/xilinx/versal_net/bl31_versal_net_setup.c
/rk3399_ARM-atf/plat/xilinx/versal_net/include/versal_net_def.h
/rk3399_ARM-atf/plat/xilinx/versal_net/plat_psci_pm.c
/rk3399_ARM-atf/plat/xilinx/versal_net/plat_topology.c
/rk3399_ARM-atf/plat/xilinx/versal_net/pm_service/pm_client.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/aarch64/zynqmp_common.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/bl31_zynqmp_setup.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/include/zynqmp_def.h
/rk3399_ARM-atf/plat/xilinx/zynqmp/plat_psci.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/plat_zynqmp.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/pm_api_clock.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/pm_client.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/zynqmp_pm_api_sys.c
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/zynqmp_pm_defs.h
/rk3399_ARM-atf/plat/xilinx/zynqmp/pm_service/zynqmp_pm_svc_main.c
/rk3399_ARM-atf/poetry.lock
/rk3399_ARM-atf/services/std_svc/drtm/drtm_main.c
/rk3399_ARM-atf/services/std_svc/drtm/drtm_main.h
/rk3399_ARM-atf/tools/cert_create/include/key.h
/rk3399_ARM-atf/tools/cot_dt2c/poetry.lock
/rk3399_ARM-atf/tools/cot_dt2c/pyproject.toml
/rk3399_ARM-atf/tools/tlc/poetry.lock
/rk3399_ARM-atf/tools/tlc/pyproject.toml
8ae6b1ad28-Jan-2025 Arvind Ram Prakash <arvind.ramprakash@arm.com>

fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus

This patch implements SMCCC_ARCH_WORKAROUND_4 and
allows discovery through SMCCC_ARCH_FEATURES.
This mechanism is enabled if CVE_2024_78

fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus

This patch implements SMCCC_ARCH_WORKAROUND_4 and
allows discovery through SMCCC_ARCH_FEATURES.
This mechanism is enabled if CVE_2024_7881 [1] is enabled
by the platform. If CVE_2024_7881 mitigation
is implemented, the discovery call returns 0,
if not -1 (SMC_ARCH_CALL_NOT_SUPPORTED).

For more information about SMCCC_ARCH_WORKAROUND_4 [2], please
refer to the SMCCC Specification reference provided below.

[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881
[2]: https://developer.arm.com/documentation/den0028/latest

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I1b1ffaa1f806f07472fd79d5525f81764d99bc79

show more ...

1...<<21222324252627282930>>...99