[coreboot-gerrit] New patch to review for coreboot: a50b947 armv8/secmon: Correct PSCI function ids

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue Apr 21 15:29:07 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9925

-gerrit

commit a50b947ef9bb311c0692fbc7b3ccc2618294a121
Author: Furquan Shaikh <furquan at google.com>
Date:   Thu Apr 9 08:22:57 2015 -0700

    armv8/secmon: Correct PSCI function ids
    
    PSCI_CPU_OFF is SMC32 call, there is not SMC64 version. Register SMC32
    and SMC64 types of PSCI calls.
    
    BUG=None
    BRANCH=None
    TEST=Compiles successfully and CPU off works fine with PSCI command.
    
    Change-Id: I8df2eabfff52924625426b3607720c5219d38b58
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 9228c07f9d9a4dd6325afb1f64b41b9b8711b146
    Original-Change-Id: I2f387291893c1acf40bb6aa26f3d2ee8d5d843ea
    Original-Signed-off-by: Furquan Shaikh <furquan at google.com>
    Original-Reviewed-on: https://chromium-review.googlesource.com/265622
    Original-Trybot-Ready: Furquan Shaikh <furquan at chromium.org>
    Original-Tested-by: Furquan Shaikh <furquan at chromium.org>
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Original-Commit-Queue: Furquan Shaikh <furquan at chromium.org>
---
 src/arch/arm64/armv8/secmon/psci.c | 9 +++++++--
 src/arch/arm64/include/arch/psci.h | 1 -
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/arch/arm64/armv8/secmon/psci.c b/src/arch/arm64/armv8/secmon/psci.c
index 6047abd..a651b6e 100644
--- a/src/arch/arm64/armv8/secmon/psci.c
+++ b/src/arch/arm64/armv8/secmon/psci.c
@@ -368,7 +368,7 @@ static int psci_handler(struct smc_call *smc)
 	case PSCI_CPU_ON64:
 		psci_cpu_on(pf);
 		break;
-	case PSCI_CPU_OFF64:
+	case PSCI_CPU_OFF32:
 		psci32_return(pf, psci_turn_off_self());
 		break;
 	default:
@@ -563,7 +563,12 @@ void psci_init(uintptr_t cpu_on_entry)
 		printk(BIOS_ERR, "Error linking cpu_info to PSCI nodes.\n");
 
 	/* Register PSCI handlers. */
-	if (smc_register_range(PSCI_CPU_OFF64, PSCI_CPU_ON64, &psci_handler))
+	if (smc_register_range(PSCI_CPU_SUSPEND32, PSCI_CPU_ON32,
+			       &psci_handler))
+		printk(BIOS_ERR, "Couldn't register PSCI handler.\n");
+
+	if (smc_register_range(PSCI_CPU_SUSPEND64, PSCI_CPU_ON64,
+			       &psci_handler))
 		printk(BIOS_ERR, "Couldn't register PSCI handler.\n");
 
 	/* Inform SoC layer of CPU_ON entry point. */
diff --git a/src/arch/arm64/include/arch/psci.h b/src/arch/arm64/include/arch/psci.h
index b408f3d..47c9028 100644
--- a/src/arch/arm64/include/arch/psci.h
+++ b/src/arch/arm64/include/arch/psci.h
@@ -164,7 +164,6 @@ enum {
 
 	/* 64-bit CPU support functions. */
 	PSCI_CPU_SUSPEND64 = SMC_FUNC_FAST64(0x4, 0x1),
-	PSCI_CPU_OFF64 = SMC_FUNC_FAST64(0x4, 0x2),
 	PSCI_CPU_ON64 = SMC_FUNC_FAST64(0x4, 0x3),
 };
 



More information about the coreboot-gerrit mailing list