intel: stratix10: Enable uboot entrypoint support
This patch will provide an entrypoint for uboot's spl into BL31. BL31 will also handle secondary cpu state during uboot's cold boot Signed-off-by: Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com> Change-Id: I661bdb782c2d793d5fc3c7f78dd7ff746e33b7a3
This commit is contained in:
parent
b1acebf4fb
commit
2db1e7663d
|
@ -8,6 +8,7 @@
|
|||
#include <asm_macros.S>
|
||||
#include <cpu_macros.S>
|
||||
#include <platform_def.h>
|
||||
#include <el3_common_macros.S>
|
||||
|
||||
.globl plat_secondary_cold_boot_setup
|
||||
.globl platform_is_primary_cpu
|
||||
|
@ -17,6 +18,7 @@
|
|||
.globl plat_crash_console_putc
|
||||
.globl plat_crash_console_flush
|
||||
.globl platform_mem_init
|
||||
.globl plat_secondary_cpus_bl31_entry
|
||||
|
||||
.globl plat_get_my_entrypoint
|
||||
|
||||
|
@ -33,7 +35,6 @@ func plat_secondary_cold_boot_setup
|
|||
/* Wait until the it gets reset signal from rstmgr gets populated */
|
||||
poll_mailbox:
|
||||
wfi
|
||||
|
||||
mov_imm x0, PLAT_SEC_ENTRY
|
||||
ldr x1, [x0]
|
||||
mov_imm x2, PLAT_CPUID_RELEASE
|
||||
|
@ -114,3 +115,14 @@ func platform_mem_init
|
|||
mov x0, #0
|
||||
ret
|
||||
endfunc platform_mem_init
|
||||
|
||||
func plat_secondary_cpus_bl31_entry
|
||||
el3_entrypoint_common \
|
||||
_init_sctlr=0 \
|
||||
_warm_boot_mailbox=!PROGRAMMABLE_RESET_ADDRESS \
|
||||
_secondary_cold_boot=!COLD_BOOT_SINGLE_CPU \
|
||||
_init_memory=1 \
|
||||
_init_c_runtime=1 \
|
||||
_exception_vectors=runtime_exceptions \
|
||||
_pie_fixup_size=BL31_LIMIT - BL31_BASE
|
||||
endfunc plat_secondary_cpus_bl31_entry
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
#define PLAT_CPUID_RELEASE 0xffe1b000
|
||||
#define PLAT_SEC_ENTRY 0xffe1b008
|
||||
|
||||
/* sysmgr.boot_scratch_cold4 & 5 used for CPU release address for SPL */
|
||||
#define PLAT_CPU_RELEASE_ADDR 0xffd12210
|
||||
|
||||
/* Define next boot image name and offset */
|
||||
#define PLAT_NS_IMAGE_OFFSET 0x50000
|
||||
#define PLAT_HANDOFF_OFFSET 0xFFE3F000
|
||||
|
|
|
@ -61,5 +61,6 @@ uint32_t socfpga_get_spsr_for_bl33_entry(void);
|
|||
|
||||
unsigned long socfpga_get_ns_image_entrypoint(void);
|
||||
|
||||
void plat_secondary_cpus_bl31_entry(void);
|
||||
|
||||
#endif /* SOCFPGA_PRIVATE_H */
|
||||
|
|
|
@ -100,6 +100,10 @@ void bl31_platform_setup(void)
|
|||
gicv2_distif_init();
|
||||
gicv2_pcpu_distif_init();
|
||||
gicv2_cpuif_enable();
|
||||
|
||||
/* Signal secondary CPUs to jump to BL31 (BL2 = U-boot SPL) */
|
||||
mmio_write_64(PLAT_CPU_RELEASE_ADDR,
|
||||
(uint64_t)plat_secondary_cpus_bl31_entry);
|
||||
}
|
||||
|
||||
const mmap_region_t plat_stratix10_mmap[] = {
|
||||
|
|
Loading…
Reference in New Issue