Re: [U-Boot] [PATCH v4 0/6] Add ARMv8 PSCI framework

2016-11-30 Thread Hongbo Zhang
Will add "depends on !ARMV8_PSCI" for FSL_LS_PPA
and "depends on !FSL_LS_PPA" for ARMV8_PSCI

Thanks.

On Wed, Nov 30, 2016 at 5:59 AM, york sun  wrote:
> On 11/28/2016 06:06 PM, Hongbo Zhang wrote:
>> Hi York,
>> This generic PSCI is controlled by CONFIG_ARMV8_PSCI, if enabled, any
>> platform can implement their own PSCI functions under this framework,
>> this is all similar with ARMv7's.
>>
>> While PPA is controlled by CONFIG_FSL_LS_PPA, and the private PSCI
>> inside the PPA is controlled by FSL_PPA_ARMV8_PSCI,  this macro
>> depends on and selected by CONFIG_FSL_LS_PPA.
>>
>> That is to say, they are using separate configs, and only one of them
>> can be enabled at one time.
>>
>
> That's what I am looking for. So these two options are mutually
> exclusive. But you don't have that in Kconfig. I can run menuconfig and
> get this result in .config file
>
> #
> # Layerscape PPA
> #
> CONFIG_FSL_LS_PPA=y
> CONFIG_FSL_PPA_ARMV8_PSCI=y
> CONFIG_SYS_FSL_ERRATUM_A010539=y
> CONFIG_ARMV8_MULTIENTRY=y
> # CONFIG_ARMV8_SPIN_TABLE is not set
> CONFIG_ARMV8_PSCI=y
> CONFIG_ARMV8_PSCI_NR_CPUS=4
> CONFIG_ARMV8_PSCI_CPUS_PER_CLUSTER=0
> CONFIG_IDENT_STRING=""
> # CONFIG_PRE_CONSOLE_BUFFER is not set
> # CONFIG_VIDEO is not set
>
> You can see both options can be enabled from menuconfig. Please see
> comments in other patches as well.
>
> York
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/6] Add ARMv8 PSCI framework

2016-11-29 Thread york sun
On 11/28/2016 06:06 PM, Hongbo Zhang wrote:
> Hi York,
> This generic PSCI is controlled by CONFIG_ARMV8_PSCI, if enabled, any
> platform can implement their own PSCI functions under this framework,
> this is all similar with ARMv7's.
>
> While PPA is controlled by CONFIG_FSL_LS_PPA, and the private PSCI
> inside the PPA is controlled by FSL_PPA_ARMV8_PSCI,  this macro
> depends on and selected by CONFIG_FSL_LS_PPA.
>
> That is to say, they are using separate configs, and only one of them
> can be enabled at one time.
>

That's what I am looking for. So these two options are mutually 
exclusive. But you don't have that in Kconfig. I can run menuconfig and 
get this result in .config file

#
# Layerscape PPA
#
CONFIG_FSL_LS_PPA=y
CONFIG_FSL_PPA_ARMV8_PSCI=y
CONFIG_SYS_FSL_ERRATUM_A010539=y
CONFIG_ARMV8_MULTIENTRY=y
# CONFIG_ARMV8_SPIN_TABLE is not set
CONFIG_ARMV8_PSCI=y
CONFIG_ARMV8_PSCI_NR_CPUS=4
CONFIG_ARMV8_PSCI_CPUS_PER_CLUSTER=0
CONFIG_IDENT_STRING=""
# CONFIG_PRE_CONSOLE_BUFFER is not set
# CONFIG_VIDEO is not set

You can see both options can be enabled from menuconfig. Please see 
comments in other patches as well.

York
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/6] Add ARMv8 PSCI framework

2016-11-28 Thread Hongbo Zhang
Hi York,
This generic PSCI is controlled by CONFIG_ARMV8_PSCI, if enabled, any
platform can implement their own PSCI functions under this framework,
this is all similar with ARMv7's.

While PPA is controlled by CONFIG_FSL_LS_PPA, and the private PSCI
inside the PPA is controlled by FSL_PPA_ARMV8_PSCI,  this macro
depends on and selected by CONFIG_FSL_LS_PPA.

That is to say, they are using separate configs, and only one of them
can be enabled at one time.

On Tue, Nov 29, 2016 at 1:16 AM, york sun  wrote:
> On 11/25/2016 02:47 AM, Hongbo Zhang wrote:
>> v3-v4 changes:
>>  - Re-added the 1/6 from v2, and move the newly re-named macro into Kconfig
>>  - Add "Reviewed-by: Tom Rini " for patch 4/6 ~ 6/6.
>>
>> v2-v3 changes:
>>  - Drop the previous 1/6, since the previous CONFIG_ARMV8_PSCI in common 
>> parts
>> of codes also work for generic PSCI framework, so there are 5 patches in this
>> iteration.
>>  - Add "Reviewed-by: Tom Rini " for patches 1/5 and 2/5,
>> which were 2/6 and 3/6.
>>  - Move config values for ls1043 from armv8/Kconfig to s1043ardb_defconfig.
>>
>> v1-v2 changes:
>>  - The new config options are introduced in Kconfig when used for first time
>>  - Introduce new config options in armv8/Kconfig instead of LS1043 platform
>>  - Move previous patch 5/6 to current 2/6 place
>>
>> v1 notes:
>>
>> This patch set introduces ARMv8 PSCI framework, all the PSCI functions are
>> implemented a default dummy one, it is up to each platform to implement their
>> own specific ones.
>>
>> The first 1/6 patch is a prepare clean up for adding ARMv8 PSCI.
>> Patches 2/6 to 5/6 introduce new ARMv8 framework and set it up.
>> The last 6/6 adds a most simple implementation on NXP LS1043 platform, to
>> verify this framework.
>>
>> This patch set mainly introduces ARMv8 PSCI framework, for easier review and
>> merge, further PSCI implementation on LS1043 is coming later.
>>
>
> Hongbo,
>
> Can you educate me how this generic PSCI framework co-exist with PPA or
> other secure firmware?
>
> York
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/6] Add ARMv8 PSCI framework

2016-11-28 Thread york sun
On 11/25/2016 02:47 AM, Hongbo Zhang wrote:
> v3-v4 changes:
>  - Re-added the 1/6 from v2, and move the newly re-named macro into Kconfig
>  - Add "Reviewed-by: Tom Rini " for patch 4/6 ~ 6/6.
>
> v2-v3 changes:
>  - Drop the previous 1/6, since the previous CONFIG_ARMV8_PSCI in common parts
> of codes also work for generic PSCI framework, so there are 5 patches in this
> iteration.
>  - Add "Reviewed-by: Tom Rini " for patches 1/5 and 2/5,
> which were 2/6 and 3/6.
>  - Move config values for ls1043 from armv8/Kconfig to s1043ardb_defconfig.
>
> v1-v2 changes:
>  - The new config options are introduced in Kconfig when used for first time
>  - Introduce new config options in armv8/Kconfig instead of LS1043 platform
>  - Move previous patch 5/6 to current 2/6 place
>
> v1 notes:
>
> This patch set introduces ARMv8 PSCI framework, all the PSCI functions are
> implemented a default dummy one, it is up to each platform to implement their
> own specific ones.
>
> The first 1/6 patch is a prepare clean up for adding ARMv8 PSCI.
> Patches 2/6 to 5/6 introduce new ARMv8 framework and set it up.
> The last 6/6 adds a most simple implementation on NXP LS1043 platform, to
> verify this framework.
>
> This patch set mainly introduces ARMv8 PSCI framework, for easier review and
> merge, further PSCI implementation on LS1043 is coming later.
>

Hongbo,

Can you educate me how this generic PSCI framework co-exist with PPA or 
other secure firmware?

York
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 0/6] Add ARMv8 PSCI framework

2016-11-25 Thread Hongbo Zhang
v3-v4 changes:
 - Re-added the 1/6 from v2, and move the newly re-named macro into Kconfig
 - Add "Reviewed-by: Tom Rini " for patch 4/6 ~ 6/6.

v2-v3 changes:
 - Drop the previous 1/6, since the previous CONFIG_ARMV8_PSCI in common parts
of codes also work for generic PSCI framework, so there are 5 patches in this
iteration.
 - Add "Reviewed-by: Tom Rini " for patches 1/5 and 2/5,
which were 2/6 and 3/6.
 - Move config values for ls1043 from armv8/Kconfig to s1043ardb_defconfig.

v1-v2 changes:
 - The new config options are introduced in Kconfig when used for first time
 - Introduce new config options in armv8/Kconfig instead of LS1043 platform
 - Move previous patch 5/6 to current 2/6 place

v1 notes:

This patch set introduces ARMv8 PSCI framework, all the PSCI functions are
implemented a default dummy one, it is up to each platform to implement their
own specific ones.

The first 1/6 patch is a prepare clean up for adding ARMv8 PSCI.
Patches 2/6 to 5/6 introduce new ARMv8 framework and set it up.
The last 6/6 adds a most simple implementation on NXP LS1043 platform, to
verify this framework.

This patch set mainly introduces ARMv8 PSCI framework, for easier review and
merge, further PSCI implementation on LS1043 is coming later.

Hongbo Zhang (6):
  ARMv8: LS1043A: change macro CONFIG_ARMV8_PSCI definition
  ARMv8: Enable SMC instruction
  ARMv8: Add secure sections for PSCI text and data
  ARMv8: Add basic PSCI framework
  ARMv8: Setup PSCI memory and device tree
  ARMv8: LS1043A: Enable LS1043A default PSCI support

 arch/arm/config.mk   |   3 +-
 arch/arm/cpu/armv8/Kconfig   |  41 
 arch/arm/cpu/armv8/Makefile  |   1 +
 arch/arm/cpu/armv8/cpu-dt.c  |  11 +-
 arch/arm/cpu/armv8/cpu.c |  22 ++
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig|  20 ++
 arch/arm/cpu/armv8/fsl-layerscape/Makefile   |   1 +
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c  |   3 +-
 arch/arm/cpu/armv8/fsl-layerscape/fdt.c  |   3 +-
 arch/arm/cpu/armv8/fsl-layerscape/ls1043a_psci.S |  20 ++
 arch/arm/cpu/armv8/psci.S| 286 +++
 arch/arm/cpu/armv8/sec_firmware.c|   2 +-
 arch/arm/cpu/armv8/sec_firmware_asm.S|   2 +-
 arch/arm/cpu/armv8/u-boot.lds|  57 +
 arch/arm/include/asm/armv8/sec_firmware.h|   2 +-
 arch/arm/include/asm/macro.h |   2 +-
 arch/arm/include/asm/psci.h  |  15 ++
 arch/arm/include/asm/secure.h|   2 +-
 arch/arm/include/asm/system.h|  11 +
 arch/arm/lib/bootm-fdt.c |   3 +-
 arch/arm/lib/bootm.c |   3 +
 arch/arm/lib/psci-dt.c   |   5 +-
 board/freescale/ls1043ardb/Kconfig   |   9 +
 configs/ls1043ardb_defconfig |   3 +
 include/configs/ls1043ardb.h |   1 -
 25 files changed, 515 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/cpu/armv8/fsl-layerscape/ls1043a_psci.S
 create mode 100644 arch/arm/cpu/armv8/psci.S

-- 
2.1.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot