[U-Boot] [PATCH v2 0/9] PSCI v0.2 framework for ARMv8

Apologies for the long delay, this is v2 of the series of patches that creates a generic PSCI v0.2 framework for ARMv8.
The first 3 patches refactor existing code so that ARMv7 PSCI, ARMv8 spin-table and ARMv8 PSCI can coexist.
The 4th patch modifies the spin table implementation for the ARMv8 foundation model to create per cpu release addresses
The next 5 patches create a generic framework for PSCI v0.2 in ARMv8.
The implementation is modelled on the pre-existing PSCI v0.1 support in ARMv7.
PSCI support patches for the ARMv8 Foundation model that implement the mandatory PSCI functions and enable PCSI will follow very soon.
Arnab Basu (9): ARM: PSCI: Update psci.h for psci v0.2 ARM: PSCI: Alow arch specific DT patching ARMv8/fsl-lsch3: Refactor spin-table code vexpress_aemv8a: Add spin table handling with per cpu release addresses ARMv8: PSCI: Add linker section to hold PSCI code ARMv8: PCSI: Add generic ARMv8 PSCI code ARMv8: PSCI: Fixup the device tree for PSCI v0.2 ARMv8: PSCI: Setup ARMv8 PSCI ARMv8: PSCI: Enable SMC
arch/arm/config.mk | 2 +- arch/arm/cpu/armv7/virt-dt.c | 7 +- arch/arm/cpu/armv8/Makefile | 4 +- arch/arm/cpu/armv8/cpu-dt.c | 189 +++++++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/cpu.c | 136 ++++++++++++++++++++++++++ arch/arm/cpu/armv8/fsl-lsch3/fdt.c | 48 ++++------ arch/arm/cpu/armv8/psci.S | 168 +++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/start.S | 141 ++++++++++++++++++++------- arch/arm/cpu/armv8/u-boot.lds | 30 ++++++ arch/arm/include/asm/armv8/esr.h | 12 +++ arch/arm/include/asm/armv8/mp.h | 36 +++++++ arch/arm/include/asm/config.h | 1 + arch/arm/include/asm/macro.h | 5 + arch/arm/include/asm/psci.h | 42 ++++++++- arch/arm/include/asm/system.h | 7 ++ arch/arm/lib/bootm-fdt.c | 11 ++- arch/arm/lib/bootm.c | 3 + include/configs/vexpress_aemv8a.h | 2 + 18 files changed, 772 insertions(+), 72 deletions(-) create mode 100644 arch/arm/cpu/armv8/cpu-dt.c create mode 100644 arch/arm/cpu/armv8/psci.S create mode 100644 arch/arm/include/asm/armv8/esr.h create mode 100644 arch/arm/include/asm/armv8/mp.h

Signed-off-by: Arnab Basu arnab_basu@rocketmail.com Cc: Bhupesh Sharma bhupesh.sharma@freescale.com Cc: Marc Zyngier marc.zyngier@arm.com --- arch/arm/include/asm/psci.h | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h index 704b4b0..68579cd 100644 --- a/arch/arm/include/asm/psci.h +++ b/arch/arm/include/asm/psci.h @@ -2,6 +2,10 @@ * Copyright (C) 2013 - ARM Ltd * Author: Marc Zyngier marc.zyngier@arm.com * + * Copyright (C) 2014 - Freescale Semiconductor Ltd + * Author: Arnab Basu arnab.basu@freescale.com + * updated file for PSCI v0.2 + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. @@ -18,7 +22,7 @@ #ifndef __ARM_PSCI_H__ #define __ARM_PSCI_H__
-/* PSCI interface */ +/* PSCI v0.1 interface */ #define ARM_PSCI_FN_BASE 0x95c1ba5e #define ARM_PSCI_FN(n) (ARM_PSCI_FN_BASE + (n))
@@ -27,9 +31,45 @@ #define ARM_PSCI_FN_CPU_ON ARM_PSCI_FN(2) #define ARM_PSCI_FN_MIGRATE ARM_PSCI_FN(3)
+/* PSCI v0.2 interface */ +#define PSCI_0_2_FN_BASE 0x84000000 +#define PSCI_0_2_FN(n) (PSCI_0_2_FN_BASE + (n)) +#define PSCI_0_2_64BIT 0x40000000 +#define PSCI_0_2_FN64_BASE \ + (PSCI_0_2_FN_BASE + PSCI_0_2_64BIT) +#define PSCI_0_2_FN64(n) (PSCI_0_2_FN64_BASE + (n)) + +#define PSCI_0_2_FN_PSCI_VERSION PSCI_0_2_FN(0) +#define PSCI_0_2_FN_CPU_SUSPEND PSCI_0_2_FN(1) +#define PSCI_0_2_FN_CPU_OFF PSCI_0_2_FN(2) +#define PSCI_0_2_FN_CPU_ON PSCI_0_2_FN(3) +#define PSCI_0_2_FN_AFFINITY_INFO PSCI_0_2_FN(4) +#define PSCI_0_2_FN_MIGRATE PSCI_0_2_FN(5) +#define PSCI_0_2_FN_MIGRATE_INFO_TYPE PSCI_0_2_FN(6) +#define PSCI_0_2_FN_MIGRATE_INFO_UP_CPU PSCI_0_2_FN(7) +#define PSCI_0_2_FN_SYSTEM_OFF PSCI_0_2_FN(8) +#define PSCI_0_2_FN_SYSTEM_RESET PSCI_0_2_FN(9) + +#define PSCI_0_2_FN64_CPU_SUSPEND PSCI_0_2_FN64(1) +#define PSCI_0_2_FN64_CPU_ON PSCI_0_2_FN64(3) +#define PSCI_0_2_FN64_AFFINITY_INFO PSCI_0_2_FN64(4) +#define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5) +#define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7) + + +/* + * Only PSCI return values such as: SUCCESS, NOT_SUPPORTED, + * INVALID_PARAMS, and DENIED defined below are applicable + * to PSCI v0.1. + */ #define ARM_PSCI_RET_SUCCESS 0 #define ARM_PSCI_RET_NI (-1) #define ARM_PSCI_RET_INVAL (-2) #define ARM_PSCI_RET_DENIED (-3) +#define PSCI_RET_ALREADY_ON (-4) +#define PSCI_RET_ON_PENDING (-5) +#define PSCI_RET_INTERNAL_FAILURE (-6) +#define PSCI_RET_NOT_PRESENT (-7) +#define PSCI_RET_DISABLED (-8)
#endif /* __ARM_PSCI_H__ */

Hi Albert,
-----Original Message----- From: Arnab Basu [mailto:arnab_basu@rocketmail.com] Apologies for the long delay, this is v2 of the series of patches that creates a generic PSCI v0.2 framework for ARMv8.
The first 3 patches refactor existing code so that ARMv7 PSCI, ARMv8 spin-table and ARMv8 PSCI can coexist.
The 4th patch modifies the spin table implementation for the ARMv8 foundation model to create per cpu release addresses
The next 5 patches create a generic framework for PSCI v0.2 in ARMv8.
The implementation is modelled on the pre-existing PSCI v0.1 support in ARMv7.
PSCI support patches for the ARMv8 Foundation model that implement the mandatory PSCI functions and enable PCSI will follow very soon.
It's been long since Arnab posted this series.
This works fine for me on ARMv8 foundation model and also with minor modifications on Freescale's LS2085A platform.
Can this be merged to the u-boot tree or are we waiting for a v3 to be spun-out by Arnab.
Arnab Basu (9): ARM: PSCI: Update psci.h for psci v0.2 ARM: PSCI: Alow arch specific DT patching ARMv8/fsl-lsch3: Refactor spin-table code vexpress_aemv8a: Add spin table handling with per cpu release addresses ARMv8: PSCI: Add linker section to hold PSCI code ARMv8: PCSI: Add generic ARMv8 PSCI code ARMv8: PSCI: Fixup the device tree for PSCI v0.2 ARMv8: PSCI: Setup ARMv8 PSCI ARMv8: PSCI: Enable SMC
arch/arm/config.mk | 2 +- arch/arm/cpu/armv7/virt-dt.c | 7 +- arch/arm/cpu/armv8/Makefile | 4 +- arch/arm/cpu/armv8/cpu-dt.c | 189 +++++++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/cpu.c | 136 ++++++++++++++++++++++++++ arch/arm/cpu/armv8/fsl-lsch3/fdt.c | 48 ++++------ arch/arm/cpu/armv8/psci.S | 168 +++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/start.S | 141 ++++++++++++++++++++------- arch/arm/cpu/armv8/u-boot.lds | 30 ++++++ arch/arm/include/asm/armv8/esr.h | 12 +++ arch/arm/include/asm/armv8/mp.h | 36 +++++++ arch/arm/include/asm/config.h | 1 + arch/arm/include/asm/macro.h | 5 + arch/arm/include/asm/psci.h | 42 ++++++++- arch/arm/include/asm/system.h | 7 ++ arch/arm/lib/bootm-fdt.c | 11 ++- arch/arm/lib/bootm.c | 3 + include/configs/vexpress_aemv8a.h | 2 + 18 files changed, 772 insertions(+), 72 deletions(-) create mode 100644 arch/arm/cpu/armv8/cpu-dt.c create mode 100644 arch/arm/cpu/armv8/psci.S create mode 100644 arch/arm/include/asm/armv8/esr.h create mode 100644 arch/arm/include/asm/armv8/mp.h
-- 1.9.1

Hi Bhupesh
On Tue, May 5, 2015 at 2:47 PM, bhupesh.sharma@freescale.com < bhupesh.sharma@freescale.com> wrote:
Hi Albert,
-----Original Message----- From: Arnab Basu [mailto:arnab_basu@rocketmail.com] Apologies for the long delay, this is v2 of the series of patches that creates a generic PSCI v0.2 framework for ARMv8.
The first 3 patches refactor existing code so that ARMv7 PSCI, ARMv8 spin-table and ARMv8 PSCI can coexist.
The 4th patch modifies the spin table implementation for the ARMv8 foundation model to create per cpu release addresses
The next 5 patches create a generic framework for PSCI v0.2 in ARMv8.
The implementation is modelled on the pre-existing PSCI v0.1 support in ARMv7.
PSCI support patches for the ARMv8 Foundation model that implement the mandatory PSCI functions and enable PCSI will follow very soon.
It's been long since Arnab posted this series.
This works fine for me on ARMv8 foundation model and also with minor modifications on Freescale's LS2085A platform.
Can this be merged to the u-boot tree or are we waiting for a v3 to be spun-out by Arnab.
Another version is required. I am working on it (very slowly, I admit).
Expect a new version this weekend.
Thanks Arnab
Arnab Basu (9): ARM: PSCI: Update psci.h for psci v0.2 ARM: PSCI: Alow arch specific DT patching ARMv8/fsl-lsch3: Refactor spin-table code vexpress_aemv8a: Add spin table handling with per cpu release addresses ARMv8: PSCI: Add linker section to hold PSCI code ARMv8: PCSI: Add generic ARMv8 PSCI code ARMv8: PSCI: Fixup the device tree for PSCI v0.2 ARMv8: PSCI: Setup ARMv8 PSCI ARMv8: PSCI: Enable SMC
arch/arm/config.mk | 2 +- arch/arm/cpu/armv7/virt-dt.c | 7 +- arch/arm/cpu/armv8/Makefile | 4 +- arch/arm/cpu/armv8/cpu-dt.c | 189 +++++++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/cpu.c | 136 ++++++++++++++++++++++++++ arch/arm/cpu/armv8/fsl-lsch3/fdt.c | 48 ++++------ arch/arm/cpu/armv8/psci.S | 168 +++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/start.S | 141 ++++++++++++++++++++------- arch/arm/cpu/armv8/u-boot.lds | 30 ++++++ arch/arm/include/asm/armv8/esr.h | 12 +++ arch/arm/include/asm/armv8/mp.h | 36 +++++++ arch/arm/include/asm/config.h | 1 + arch/arm/include/asm/macro.h | 5 + arch/arm/include/asm/psci.h | 42 ++++++++- arch/arm/include/asm/system.h | 7 ++ arch/arm/lib/bootm-fdt.c | 11 ++- arch/arm/lib/bootm.c | 3 + include/configs/vexpress_aemv8a.h | 2 + 18 files changed, 772 insertions(+), 72 deletions(-) create mode 100644 arch/arm/cpu/armv8/cpu-dt.c create mode 100644 arch/arm/cpu/armv8/psci.S create mode 100644 arch/arm/include/asm/armv8/esr.h create mode 100644 arch/arm/include/asm/armv8/mp.h
-- 1.9.1
participants (2)
-
Arnab Basu
-
bhupesh.sharmaï¼ freescale.com