1 /*
2  * Copyright (c) 2021 Arm Limited (or its affiliates). All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #include <kernel.h>
6 
7 #ifdef CONFIG_SOC_FVP_AEMV8R_EL2_INIT
8 
z_arm64_el2_plat_init(void)9 void z_arm64_el2_plat_init(void)
10 {
11 	uint64_t reg;
12 
13 	/*
14 	 * The purpose of VMPIDR_EL2 is that holds the value of the
15 	 * Virtualization Multiprocessor ID and this is the value returned
16 	 * by EL1 reads of MPIDR_EL1.
17 	 * Normally The VMPIDR_EL2 is configurated by TB-R.
18 	 */
19 	reg = read_mpidr_el1();
20 	write_vmpidr_el2(reg);
21 }
22 
23 #endif
24 
25 #ifdef CONFIG_SOC_FVP_AEMV8R_SIMULATE_CPU_PM
26 
27 /*
28  * fvp can work on the mode that all core run together when it start.
29  * So an implementation for FVP is needed.
30  */
pm_cpu_on(unsigned long cpuid,uintptr_t entry_point)31 int pm_cpu_on(unsigned long cpuid, uintptr_t entry_point)
32 {
33 	return 0;
34 }
35 
36 #endif
37