2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
8 #include <asm_macros.S>
9 #include <drivers/arm/gicv3.h>
10 #include <platform_def.h>
12 .globl plat_secondary_cold_boot_setup
13 .globl plat_is_my_cpu_primary
14 .globl versal_calc_core_pos
15 .globl platform_mem_init
16 .globl plat_my_core_pos
18 /* -----------------------------------------------------
19 * void plat_secondary_cold_boot_setup (void);
21 * This function performs any platform specific actions
22 * needed for a secondary cpu after a cold reset e.g
23 * mark the cpu's presence, mechanism to place it in a
25 * TODO: Should we read the PSYS register to make sure
26 * that the request has gone through.
27 * -----------------------------------------------------
29 func plat_secondary_cold_boot_setup
33 * There is no sane reason to come out of this wfi. This
34 * cpu will be powered on and reset by the cpu_on pm api
38 endfunc plat_secondary_cold_boot_setup
40 func plat_is_my_cpu_primary
43 cmp x0, #VERSAL_PRIMARY_CPU
46 endfunc plat_is_my_cpu_primary
48 /* -----------------------------------------------------
49 * unsigned int plat_my_core_pos(void)
50 * This function uses the versal_calc_core_pos()
51 * definition to get the index of the calling CPU.
52 * -----------------------------------------------------
56 b versal_calc_core_pos
57 endfunc plat_my_core_pos
59 func versal_calc_core_pos
60 and x1, x0, #MPIDR_CPU_MASK
61 and x0, x0, #MPIDR_CLUSTER_MASK
62 add x0, x1, x0, LSR #6
64 endfunc versal_calc_core_pos
66 /* ---------------------------------------------------------------------
67 * We don't need to carry out any memory initialization on VERSAL
68 * platform. The Secure RAM is accessible straight away.
69 * ---------------------------------------------------------------------
71 func platform_mem_init
73 endfunc platform_mem_init