[U-Boot] [PATCH v2 2/4] ARM: armv7: guard memory reserve for PSCI with #ifdef CONFIG_ARMV7_PSCI

Jon Masters jcm at redhat.com
Fri Sep 23 07:09:49 CEST 2016


On 08/30/2016 03:22 AM, Masahiro Yamada wrote:
> If CONFIG_ARMV7_NONSEC is enabled, the linker script requires
> CONFIG_ARMV7_PSCI_NR_CPUS regardless of CONFIG_ARMV7_PSCI.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/cpu/u-boot.lds | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
> index 36c9fd0..0a5fae6 100644
> --- a/arch/arm/cpu/u-boot.lds
> +++ b/arch/arm/cpu/u-boot.lds
> @@ -83,10 +83,10 @@ SECTIONS
>  #endif
>  	{
>  		KEEP(*(.__secure_stack_start))
> -
> +#ifdef CONFIG_ARMV7_PSCI
>  		/* Skip addreses for stack */
>  		. = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
> -
> +#endif
>  		/* Align end of stack section to page boundary */
>  		. = ALIGN(CONSTANT(COMMONPAGESIZE));
>  
> 

In the Fedora U-Boot ELF builds being tested for 32-bit U-Boot on KVM
(AArch32 on ARMv8 hardware, as a means of decommissioning older v7
builders and replacing them with VMs on v8 hosts) this results in the
following for a vexpress_ca15_tc2 U-Boot build target:

  2 .secure_text  00000130  8082d000  8082d000  0003d000  2**5
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .secure_stack 00000000  8082e000  8082e000  0004e000  2**0
                  ALLOC
  4 .__secure_end 00000004  8082e000  8082e000  0003e000  2**0
                  CONTENTS, ALLOC, LOAD, DATA

Which QEMU then refuses to load because there's no space allocated for
the secure_stack. What do you think we should do about this? I haven't
been tracking the PSCI implementation (which is pretty cool btw, woot!)
work you've been doing and we don't really need it for the VM case
anyway, just need the resulting build to link correctly. So sure,
probably I/we need to understand the status of the PSCI work too.

Jon.

-- 
Computer Architect | Sent from my Fedora powered laptop


More information about the U-Boot mailing list