diff options
| author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2026-01-04 02:55:41 +0100 |
|---|---|---|
| committer | Marex <marek.vasut+renesas@mailbox.org> | 2026-01-06 16:04:17 +0000 |
| commit | 460b5cfc6c0be440f919e6a392b85456bcf20a3e (patch) | |
| tree | 4a552e90a823453ec9876d906651a6e560cba40a | |
| parent | e3c90039ebccbc4adcd99a54082ef4b582bd2e62 (diff) | |
| download | arm-trusted-firmware-460b5cfc6c0be440f919e6a392b85456bcf20a3e.tar.gz arm-trusted-firmware-460b5cfc6c0be440f919e6a392b85456bcf20a3e.zip | |
fix(rcar3): prevent boot CPU hot unplug
The boot CPU runs both TFA and later also Trusted OS, which is UP and can
not be migrated to another CPU. Report MIGRATE_INFO_TYPE "Uniprocessor (UP)
not migrate capable 1" to the OS, so any attempts at CPU_OFF and MIGRATE
of the boot CPU would be DENIED. This has an effect also e.g. on the Linux
kernel, where it prevents stopping boot CPU (CPU0) using CPU hotplug, which
must not be allowed, as it would interfere with the Trusted OS.
Change-Id: I0f38e64711c13ae48e819fb33939451720749c68
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Dien Pham <dien.pham.ry@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.dn@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
| -rw-r--r-- | plat/renesas/common/bl31_plat_setup.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/plat/renesas/common/bl31_plat_setup.c b/plat/renesas/common/bl31_plat_setup.c index aedc414ee..43c514dfe 100644 --- a/plat/renesas/common/bl31_plat_setup.c +++ b/plat/renesas/common/bl31_plat_setup.c @@ -133,3 +133,19 @@ void bl31_platform_setup(void) rcar_boot_mpidr = read_mpidr_el1() & 0x0000ffffU; rcar_pwrc_all_disable_interrupt_wakeup(); } + +static int32_t rcar_svc_migrate_info(u_register_t *resident_cpu) +{ + *resident_cpu = rcar_boot_mpidr; + + return PSCI_TOS_NOT_UP_MIG_CAP; +} + +const spd_pm_ops_t rcar_pm = { + .svc_migrate_info = rcar_svc_migrate_info, +}; + +void bl31_plat_runtime_setup(void) +{ + psci_register_spd_pm_hook(&rcar_pm); +} |
