Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

psci.h

Blame
  • Forked from Reform / reform-boundary-uboot
    Source project has a limited visibility.
    • Chen-Yu Tsai's avatar
      980d6a55
      ARM: Add an empty secure stack section · 980d6a55
      Chen-Yu Tsai authored
      
      Until now we've been using memory beyond psci_text_end as stack space
      for the secure monitor or PSCI implementation, even if space was not
      allocated for it.
      
      This was partially fixed in ("ARM: allocate extra space for PSCI stack
      in secure section during link phase"). However, calculating stack space
      from psci_text_end in one place, while allocating the space in another
      is error prone.
      
      This patch adds a separate empty secure stack section, with space for
      CONFIG_ARMV7_PSCI_NR_CPUS stacks, each 1 KB. There's also
      __secure_stack_start and __secure_stack_end symbols. The linker script
      handles calculating the correct VMAs for the stack section. For
      platforms that relocate/copy the secure monitor before using it, the
      space is not allocated in the executable, saving space.
      
      For platforms that do not define CONFIG_ARMV7_PSCI_NR_CPUS, a whole page
      of stack space for 4 CPUs is allocated, matching the previous behavior.
      
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      980d6a55
      History
      ARM: Add an empty secure stack section
      Chen-Yu Tsai authored
      
      Until now we've been using memory beyond psci_text_end as stack space
      for the secure monitor or PSCI implementation, even if space was not
      allocated for it.
      
      This was partially fixed in ("ARM: allocate extra space for PSCI stack
      in secure section during link phase"). However, calculating stack space
      from psci_text_end in one place, while allocating the space in another
      is error prone.
      
      This patch adds a separate empty secure stack section, with space for
      CONFIG_ARMV7_PSCI_NR_CPUS stacks, each 1 KB. There's also
      __secure_stack_start and __secure_stack_end symbols. The linker script
      handles calculating the correct VMAs for the stack section. For
      platforms that relocate/copy the secure monitor before using it, the
      space is not allocated in the executable, saving space.
      
      For platforms that do not define CONFIG_ARMV7_PSCI_NR_CPUS, a whole page
      of stack space for 4 CPUs is allocated, matching the previous behavior.
      
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>