xref: /aosp_15_r20/external/arm-trusted-firmware/lib/psci/psci_private.h (revision 54fd6939e177f8ff529b10183254802c76df6d08)
1*54fd6939SJiyong Park /*
2*54fd6939SJiyong Park  * Copyright (c) 2013-2020, ARM Limited and Contributors. All rights reserved.
3*54fd6939SJiyong Park  *
4*54fd6939SJiyong Park  * SPDX-License-Identifier: BSD-3-Clause
5*54fd6939SJiyong Park  */
6*54fd6939SJiyong Park 
7*54fd6939SJiyong Park #ifndef PSCI_PRIVATE_H
8*54fd6939SJiyong Park #define PSCI_PRIVATE_H
9*54fd6939SJiyong Park 
10*54fd6939SJiyong Park #include <stdbool.h>
11*54fd6939SJiyong Park 
12*54fd6939SJiyong Park #include <arch.h>
13*54fd6939SJiyong Park #include <arch_helpers.h>
14*54fd6939SJiyong Park #include <common/bl_common.h>
15*54fd6939SJiyong Park #include <lib/bakery_lock.h>
16*54fd6939SJiyong Park #include <lib/el3_runtime/cpu_data.h>
17*54fd6939SJiyong Park #include <lib/psci/psci.h>
18*54fd6939SJiyong Park #include <lib/spinlock.h>
19*54fd6939SJiyong Park 
20*54fd6939SJiyong Park /*
21*54fd6939SJiyong Park  * The PSCI capability which are provided by the generic code but does not
22*54fd6939SJiyong Park  * depend on the platform or spd capabilities.
23*54fd6939SJiyong Park  */
24*54fd6939SJiyong Park #define PSCI_GENERIC_CAP	\
25*54fd6939SJiyong Park 			(define_psci_cap(PSCI_VERSION) |		\
26*54fd6939SJiyong Park 			define_psci_cap(PSCI_AFFINITY_INFO_AARCH64) |	\
27*54fd6939SJiyong Park 			define_psci_cap(PSCI_FEATURES))
28*54fd6939SJiyong Park 
29*54fd6939SJiyong Park /*
30*54fd6939SJiyong Park  * The PSCI capabilities mask for 64 bit functions.
31*54fd6939SJiyong Park  */
32*54fd6939SJiyong Park #define PSCI_CAP_64BIT_MASK	\
33*54fd6939SJiyong Park 			(define_psci_cap(PSCI_CPU_SUSPEND_AARCH64) |	\
34*54fd6939SJiyong Park 			define_psci_cap(PSCI_CPU_ON_AARCH64) |		\
35*54fd6939SJiyong Park 			define_psci_cap(PSCI_AFFINITY_INFO_AARCH64) |	\
36*54fd6939SJiyong Park 			define_psci_cap(PSCI_MIG_AARCH64) |		\
37*54fd6939SJiyong Park 			define_psci_cap(PSCI_MIG_INFO_UP_CPU_AARCH64) |	\
38*54fd6939SJiyong Park 			define_psci_cap(PSCI_NODE_HW_STATE_AARCH64) |	\
39*54fd6939SJiyong Park 			define_psci_cap(PSCI_SYSTEM_SUSPEND_AARCH64) |	\
40*54fd6939SJiyong Park 			define_psci_cap(PSCI_STAT_RESIDENCY_AARCH64) |	\
41*54fd6939SJiyong Park 			define_psci_cap(PSCI_STAT_COUNT_AARCH64) |	\
42*54fd6939SJiyong Park 			define_psci_cap(PSCI_SYSTEM_RESET2_AARCH64) |	\
43*54fd6939SJiyong Park 			define_psci_cap(PSCI_MEM_CHK_RANGE_AARCH64))
44*54fd6939SJiyong Park 
45*54fd6939SJiyong Park /* Internally PSCI uses a uint16_t for various cpu indexes so
46*54fd6939SJiyong Park  * define a limit to number of CPUs that can be initialised.
47*54fd6939SJiyong Park  */
48*54fd6939SJiyong Park #define PSCI_MAX_CPUS_INDEX	0xFFFFU
49*54fd6939SJiyong Park 
50*54fd6939SJiyong Park /*
51*54fd6939SJiyong Park  * Helper functions to get/set the fields of PSCI per-cpu data.
52*54fd6939SJiyong Park  */
psci_set_aff_info_state(aff_info_state_t aff_state)53*54fd6939SJiyong Park static inline void psci_set_aff_info_state(aff_info_state_t aff_state)
54*54fd6939SJiyong Park {
55*54fd6939SJiyong Park 	set_cpu_data(psci_svc_cpu_data.aff_info_state, aff_state);
56*54fd6939SJiyong Park }
57*54fd6939SJiyong Park 
psci_get_aff_info_state(void)58*54fd6939SJiyong Park static inline aff_info_state_t psci_get_aff_info_state(void)
59*54fd6939SJiyong Park {
60*54fd6939SJiyong Park 	return get_cpu_data(psci_svc_cpu_data.aff_info_state);
61*54fd6939SJiyong Park }
62*54fd6939SJiyong Park 
psci_get_aff_info_state_by_idx(unsigned int idx)63*54fd6939SJiyong Park static inline aff_info_state_t psci_get_aff_info_state_by_idx(unsigned int idx)
64*54fd6939SJiyong Park {
65*54fd6939SJiyong Park 	return get_cpu_data_by_index(idx,
66*54fd6939SJiyong Park 				     psci_svc_cpu_data.aff_info_state);
67*54fd6939SJiyong Park }
68*54fd6939SJiyong Park 
psci_set_aff_info_state_by_idx(unsigned int idx,aff_info_state_t aff_state)69*54fd6939SJiyong Park static inline void psci_set_aff_info_state_by_idx(unsigned int idx,
70*54fd6939SJiyong Park 						  aff_info_state_t aff_state)
71*54fd6939SJiyong Park {
72*54fd6939SJiyong Park 	set_cpu_data_by_index(idx,
73*54fd6939SJiyong Park 			      psci_svc_cpu_data.aff_info_state, aff_state);
74*54fd6939SJiyong Park }
75*54fd6939SJiyong Park 
psci_get_suspend_pwrlvl(void)76*54fd6939SJiyong Park static inline unsigned int psci_get_suspend_pwrlvl(void)
77*54fd6939SJiyong Park {
78*54fd6939SJiyong Park 	return get_cpu_data(psci_svc_cpu_data.target_pwrlvl);
79*54fd6939SJiyong Park }
80*54fd6939SJiyong Park 
psci_set_suspend_pwrlvl(unsigned int target_lvl)81*54fd6939SJiyong Park static inline void psci_set_suspend_pwrlvl(unsigned int target_lvl)
82*54fd6939SJiyong Park {
83*54fd6939SJiyong Park 	set_cpu_data(psci_svc_cpu_data.target_pwrlvl, target_lvl);
84*54fd6939SJiyong Park }
85*54fd6939SJiyong Park 
psci_set_cpu_local_state(plat_local_state_t state)86*54fd6939SJiyong Park static inline void psci_set_cpu_local_state(plat_local_state_t state)
87*54fd6939SJiyong Park {
88*54fd6939SJiyong Park 	set_cpu_data(psci_svc_cpu_data.local_state, state);
89*54fd6939SJiyong Park }
90*54fd6939SJiyong Park 
psci_get_cpu_local_state(void)91*54fd6939SJiyong Park static inline plat_local_state_t psci_get_cpu_local_state(void)
92*54fd6939SJiyong Park {
93*54fd6939SJiyong Park 	return get_cpu_data(psci_svc_cpu_data.local_state);
94*54fd6939SJiyong Park }
95*54fd6939SJiyong Park 
psci_get_cpu_local_state_by_idx(unsigned int idx)96*54fd6939SJiyong Park static inline plat_local_state_t psci_get_cpu_local_state_by_idx(
97*54fd6939SJiyong Park 		unsigned int idx)
98*54fd6939SJiyong Park {
99*54fd6939SJiyong Park 	return get_cpu_data_by_index(idx,
100*54fd6939SJiyong Park 				     psci_svc_cpu_data.local_state);
101*54fd6939SJiyong Park }
102*54fd6939SJiyong Park 
103*54fd6939SJiyong Park /* Helper function to identify a CPU standby request in PSCI Suspend call */
is_cpu_standby_req(unsigned int is_power_down_state,unsigned int retn_lvl)104*54fd6939SJiyong Park static inline bool is_cpu_standby_req(unsigned int is_power_down_state,
105*54fd6939SJiyong Park 				      unsigned int retn_lvl)
106*54fd6939SJiyong Park {
107*54fd6939SJiyong Park 	return (is_power_down_state == 0U) && (retn_lvl == 0U);
108*54fd6939SJiyong Park }
109*54fd6939SJiyong Park 
110*54fd6939SJiyong Park /*******************************************************************************
111*54fd6939SJiyong Park  * The following two data structures implement the power domain tree. The tree
112*54fd6939SJiyong Park  * is used to track the state of all the nodes i.e. power domain instances
113*54fd6939SJiyong Park  * described by the platform. The tree consists of nodes that describe CPU power
114*54fd6939SJiyong Park  * domains i.e. leaf nodes and all other power domains which are parents of a
115*54fd6939SJiyong Park  * CPU power domain i.e. non-leaf nodes.
116*54fd6939SJiyong Park  ******************************************************************************/
117*54fd6939SJiyong Park typedef struct non_cpu_pwr_domain_node {
118*54fd6939SJiyong Park 	/*
119*54fd6939SJiyong Park 	 * Index of the first CPU power domain node level 0 which has this node
120*54fd6939SJiyong Park 	 * as its parent.
121*54fd6939SJiyong Park 	 */
122*54fd6939SJiyong Park 	unsigned int cpu_start_idx;
123*54fd6939SJiyong Park 
124*54fd6939SJiyong Park 	/*
125*54fd6939SJiyong Park 	 * Number of CPU power domains which are siblings of the domain indexed
126*54fd6939SJiyong Park 	 * by 'cpu_start_idx' i.e. all the domains in the range 'cpu_start_idx
127*54fd6939SJiyong Park 	 * -> cpu_start_idx + ncpus' have this node as their parent.
128*54fd6939SJiyong Park 	 */
129*54fd6939SJiyong Park 	unsigned int ncpus;
130*54fd6939SJiyong Park 
131*54fd6939SJiyong Park 	/*
132*54fd6939SJiyong Park 	 * Index of the parent power domain node.
133*54fd6939SJiyong Park 	 * TODO: Figure out whether to whether using pointer is more efficient.
134*54fd6939SJiyong Park 	 */
135*54fd6939SJiyong Park 	unsigned int parent_node;
136*54fd6939SJiyong Park 
137*54fd6939SJiyong Park 	plat_local_state_t local_state;
138*54fd6939SJiyong Park 
139*54fd6939SJiyong Park 	unsigned char level;
140*54fd6939SJiyong Park 
141*54fd6939SJiyong Park 	/* For indexing the psci_lock array*/
142*54fd6939SJiyong Park 	uint16_t lock_index;
143*54fd6939SJiyong Park } non_cpu_pd_node_t;
144*54fd6939SJiyong Park 
145*54fd6939SJiyong Park typedef struct cpu_pwr_domain_node {
146*54fd6939SJiyong Park 	u_register_t mpidr;
147*54fd6939SJiyong Park 
148*54fd6939SJiyong Park 	/*
149*54fd6939SJiyong Park 	 * Index of the parent power domain node.
150*54fd6939SJiyong Park 	 * TODO: Figure out whether to whether using pointer is more efficient.
151*54fd6939SJiyong Park 	 */
152*54fd6939SJiyong Park 	unsigned int parent_node;
153*54fd6939SJiyong Park 
154*54fd6939SJiyong Park 	/*
155*54fd6939SJiyong Park 	 * A CPU power domain does not require state coordination like its
156*54fd6939SJiyong Park 	 * parent power domains. Hence this node does not include a bakery
157*54fd6939SJiyong Park 	 * lock. A spinlock is required by the CPU_ON handler to prevent a race
158*54fd6939SJiyong Park 	 * when multiple CPUs try to turn ON the same target CPU.
159*54fd6939SJiyong Park 	 */
160*54fd6939SJiyong Park 	spinlock_t cpu_lock;
161*54fd6939SJiyong Park } cpu_pd_node_t;
162*54fd6939SJiyong Park 
163*54fd6939SJiyong Park /*******************************************************************************
164*54fd6939SJiyong Park  * The following are helpers and declarations of locks.
165*54fd6939SJiyong Park  ******************************************************************************/
166*54fd6939SJiyong Park #if HW_ASSISTED_COHERENCY
167*54fd6939SJiyong Park /*
168*54fd6939SJiyong Park  * On systems where participant CPUs are cache-coherent, we can use spinlocks
169*54fd6939SJiyong Park  * instead of bakery locks.
170*54fd6939SJiyong Park  */
171*54fd6939SJiyong Park #define DEFINE_PSCI_LOCK(_name)		spinlock_t _name
172*54fd6939SJiyong Park #define DECLARE_PSCI_LOCK(_name)	extern DEFINE_PSCI_LOCK(_name)
173*54fd6939SJiyong Park 
174*54fd6939SJiyong Park /* One lock is required per non-CPU power domain node */
175*54fd6939SJiyong Park DECLARE_PSCI_LOCK(psci_locks[PSCI_NUM_NON_CPU_PWR_DOMAINS]);
176*54fd6939SJiyong Park 
177*54fd6939SJiyong Park /*
178*54fd6939SJiyong Park  * On systems with hardware-assisted coherency, make PSCI cache operations NOP,
179*54fd6939SJiyong Park  * as PSCI participants are cache-coherent, and there's no need for explicit
180*54fd6939SJiyong Park  * cache maintenance operations or barriers to coordinate their state.
181*54fd6939SJiyong Park  */
psci_flush_dcache_range(uintptr_t __unused addr,size_t __unused size)182*54fd6939SJiyong Park static inline void psci_flush_dcache_range(uintptr_t __unused addr,
183*54fd6939SJiyong Park 					   size_t __unused size)
184*54fd6939SJiyong Park {
185*54fd6939SJiyong Park 	/* Empty */
186*54fd6939SJiyong Park }
187*54fd6939SJiyong Park 
188*54fd6939SJiyong Park #define psci_flush_cpu_data(member)
189*54fd6939SJiyong Park #define psci_inv_cpu_data(member)
190*54fd6939SJiyong Park 
psci_dsbish(void)191*54fd6939SJiyong Park static inline void psci_dsbish(void)
192*54fd6939SJiyong Park {
193*54fd6939SJiyong Park 	/* Empty */
194*54fd6939SJiyong Park }
195*54fd6939SJiyong Park 
psci_lock_get(non_cpu_pd_node_t * non_cpu_pd_node)196*54fd6939SJiyong Park static inline void psci_lock_get(non_cpu_pd_node_t *non_cpu_pd_node)
197*54fd6939SJiyong Park {
198*54fd6939SJiyong Park 	spin_lock(&psci_locks[non_cpu_pd_node->lock_index]);
199*54fd6939SJiyong Park }
200*54fd6939SJiyong Park 
psci_lock_release(non_cpu_pd_node_t * non_cpu_pd_node)201*54fd6939SJiyong Park static inline void psci_lock_release(non_cpu_pd_node_t *non_cpu_pd_node)
202*54fd6939SJiyong Park {
203*54fd6939SJiyong Park 	spin_unlock(&psci_locks[non_cpu_pd_node->lock_index]);
204*54fd6939SJiyong Park }
205*54fd6939SJiyong Park 
206*54fd6939SJiyong Park #else /* if HW_ASSISTED_COHERENCY == 0 */
207*54fd6939SJiyong Park /*
208*54fd6939SJiyong Park  * Use bakery locks for state coordination as not all PSCI participants are
209*54fd6939SJiyong Park  * cache coherent.
210*54fd6939SJiyong Park  */
211*54fd6939SJiyong Park #define DEFINE_PSCI_LOCK(_name)		DEFINE_BAKERY_LOCK(_name)
212*54fd6939SJiyong Park #define DECLARE_PSCI_LOCK(_name)	DECLARE_BAKERY_LOCK(_name)
213*54fd6939SJiyong Park 
214*54fd6939SJiyong Park /* One lock is required per non-CPU power domain node */
215*54fd6939SJiyong Park DECLARE_PSCI_LOCK(psci_locks[PSCI_NUM_NON_CPU_PWR_DOMAINS]);
216*54fd6939SJiyong Park 
217*54fd6939SJiyong Park /*
218*54fd6939SJiyong Park  * If not all PSCI participants are cache-coherent, perform cache maintenance
219*54fd6939SJiyong Park  * and issue barriers wherever required to coordinate state.
220*54fd6939SJiyong Park  */
psci_flush_dcache_range(uintptr_t addr,size_t size)221*54fd6939SJiyong Park static inline void psci_flush_dcache_range(uintptr_t addr, size_t size)
222*54fd6939SJiyong Park {
223*54fd6939SJiyong Park 	flush_dcache_range(addr, size);
224*54fd6939SJiyong Park }
225*54fd6939SJiyong Park 
226*54fd6939SJiyong Park #define psci_flush_cpu_data(member)		flush_cpu_data(member)
227*54fd6939SJiyong Park #define psci_inv_cpu_data(member)		inv_cpu_data(member)
228*54fd6939SJiyong Park 
psci_dsbish(void)229*54fd6939SJiyong Park static inline void psci_dsbish(void)
230*54fd6939SJiyong Park {
231*54fd6939SJiyong Park 	dsbish();
232*54fd6939SJiyong Park }
233*54fd6939SJiyong Park 
psci_lock_get(non_cpu_pd_node_t * non_cpu_pd_node)234*54fd6939SJiyong Park static inline void psci_lock_get(non_cpu_pd_node_t *non_cpu_pd_node)
235*54fd6939SJiyong Park {
236*54fd6939SJiyong Park 	bakery_lock_get(&psci_locks[non_cpu_pd_node->lock_index]);
237*54fd6939SJiyong Park }
238*54fd6939SJiyong Park 
psci_lock_release(non_cpu_pd_node_t * non_cpu_pd_node)239*54fd6939SJiyong Park static inline void psci_lock_release(non_cpu_pd_node_t *non_cpu_pd_node)
240*54fd6939SJiyong Park {
241*54fd6939SJiyong Park 	bakery_lock_release(&psci_locks[non_cpu_pd_node->lock_index]);
242*54fd6939SJiyong Park }
243*54fd6939SJiyong Park 
244*54fd6939SJiyong Park #endif /* HW_ASSISTED_COHERENCY */
245*54fd6939SJiyong Park 
psci_lock_init(non_cpu_pd_node_t * non_cpu_pd_node,uint16_t idx)246*54fd6939SJiyong Park static inline void psci_lock_init(non_cpu_pd_node_t *non_cpu_pd_node,
247*54fd6939SJiyong Park 				  uint16_t idx)
248*54fd6939SJiyong Park {
249*54fd6939SJiyong Park 	non_cpu_pd_node[idx].lock_index = idx;
250*54fd6939SJiyong Park }
251*54fd6939SJiyong Park 
252*54fd6939SJiyong Park /*******************************************************************************
253*54fd6939SJiyong Park  * Data prototypes
254*54fd6939SJiyong Park  ******************************************************************************/
255*54fd6939SJiyong Park extern const plat_psci_ops_t *psci_plat_pm_ops;
256*54fd6939SJiyong Park extern non_cpu_pd_node_t psci_non_cpu_pd_nodes[PSCI_NUM_NON_CPU_PWR_DOMAINS];
257*54fd6939SJiyong Park extern cpu_pd_node_t psci_cpu_pd_nodes[PLATFORM_CORE_COUNT];
258*54fd6939SJiyong Park extern unsigned int psci_caps;
259*54fd6939SJiyong Park extern unsigned int psci_plat_core_count;
260*54fd6939SJiyong Park 
261*54fd6939SJiyong Park /*******************************************************************************
262*54fd6939SJiyong Park  * SPD's power management hooks registered with PSCI
263*54fd6939SJiyong Park  ******************************************************************************/
264*54fd6939SJiyong Park extern const spd_pm_ops_t *psci_spd_pm;
265*54fd6939SJiyong Park 
266*54fd6939SJiyong Park /*******************************************************************************
267*54fd6939SJiyong Park  * Function prototypes
268*54fd6939SJiyong Park  ******************************************************************************/
269*54fd6939SJiyong Park /* Private exported functions from psci_common.c */
270*54fd6939SJiyong Park int psci_validate_power_state(unsigned int power_state,
271*54fd6939SJiyong Park 			      psci_power_state_t *state_info);
272*54fd6939SJiyong Park void psci_query_sys_suspend_pwrstate(psci_power_state_t *state_info);
273*54fd6939SJiyong Park int psci_validate_mpidr(u_register_t mpidr);
274*54fd6939SJiyong Park void psci_init_req_local_pwr_states(void);
275*54fd6939SJiyong Park void psci_get_target_local_pwr_states(unsigned int end_pwrlvl,
276*54fd6939SJiyong Park 				      psci_power_state_t *target_state);
277*54fd6939SJiyong Park int psci_validate_entry_point(entry_point_info_t *ep,
278*54fd6939SJiyong Park 			uintptr_t entrypoint, u_register_t context_id);
279*54fd6939SJiyong Park void psci_get_parent_pwr_domain_nodes(unsigned int cpu_idx,
280*54fd6939SJiyong Park 				      unsigned int end_lvl,
281*54fd6939SJiyong Park 				      unsigned int *node_index);
282*54fd6939SJiyong Park void psci_do_state_coordination(unsigned int end_pwrlvl,
283*54fd6939SJiyong Park 				psci_power_state_t *state_info);
284*54fd6939SJiyong Park void psci_acquire_pwr_domain_locks(unsigned int end_pwrlvl,
285*54fd6939SJiyong Park 				   const unsigned int *parent_nodes);
286*54fd6939SJiyong Park void psci_release_pwr_domain_locks(unsigned int end_pwrlvl,
287*54fd6939SJiyong Park 				   const unsigned int *parent_nodes);
288*54fd6939SJiyong Park int psci_validate_suspend_req(const psci_power_state_t *state_info,
289*54fd6939SJiyong Park 			      unsigned int is_power_down_state);
290*54fd6939SJiyong Park unsigned int psci_find_max_off_lvl(const psci_power_state_t *state_info);
291*54fd6939SJiyong Park unsigned int psci_find_target_suspend_lvl(const psci_power_state_t *state_info);
292*54fd6939SJiyong Park void psci_set_pwr_domains_to_run(unsigned int end_pwrlvl);
293*54fd6939SJiyong Park void psci_print_power_domain_map(void);
294*54fd6939SJiyong Park unsigned int psci_is_last_on_cpu(void);
295*54fd6939SJiyong Park int psci_spd_migrate_info(u_register_t *mpidr);
296*54fd6939SJiyong Park void psci_do_pwrdown_sequence(unsigned int power_level);
297*54fd6939SJiyong Park 
298*54fd6939SJiyong Park /*
299*54fd6939SJiyong Park  * CPU power down is directly called only when HW_ASSISTED_COHERENCY is
300*54fd6939SJiyong Park  * available. Otherwise, this needs post-call stack maintenance, which is
301*54fd6939SJiyong Park  * handled in assembly.
302*54fd6939SJiyong Park  */
303*54fd6939SJiyong Park void prepare_cpu_pwr_dwn(unsigned int power_level);
304*54fd6939SJiyong Park 
305*54fd6939SJiyong Park /* Private exported functions from psci_on.c */
306*54fd6939SJiyong Park int psci_cpu_on_start(u_register_t target_cpu,
307*54fd6939SJiyong Park 		      const entry_point_info_t *ep);
308*54fd6939SJiyong Park 
309*54fd6939SJiyong Park void psci_cpu_on_finish(unsigned int cpu_idx, const psci_power_state_t *state_info);
310*54fd6939SJiyong Park 
311*54fd6939SJiyong Park /* Private exported functions from psci_off.c */
312*54fd6939SJiyong Park int psci_do_cpu_off(unsigned int end_pwrlvl);
313*54fd6939SJiyong Park 
314*54fd6939SJiyong Park /* Private exported functions from psci_suspend.c */
315*54fd6939SJiyong Park void psci_cpu_suspend_start(const entry_point_info_t *ep,
316*54fd6939SJiyong Park 			unsigned int end_pwrlvl,
317*54fd6939SJiyong Park 			psci_power_state_t *state_info,
318*54fd6939SJiyong Park 			unsigned int is_power_down_state);
319*54fd6939SJiyong Park 
320*54fd6939SJiyong Park void psci_cpu_suspend_finish(unsigned int cpu_idx, const psci_power_state_t *state_info);
321*54fd6939SJiyong Park 
322*54fd6939SJiyong Park /* Private exported functions from psci_helpers.S */
323*54fd6939SJiyong Park void psci_do_pwrdown_cache_maintenance(unsigned int pwr_level);
324*54fd6939SJiyong Park void psci_do_pwrup_cache_maintenance(void);
325*54fd6939SJiyong Park 
326*54fd6939SJiyong Park /* Private exported functions from psci_system_off.c */
327*54fd6939SJiyong Park void __dead2 psci_system_off(void);
328*54fd6939SJiyong Park void __dead2 psci_system_reset(void);
329*54fd6939SJiyong Park u_register_t psci_system_reset2(uint32_t reset_type, u_register_t cookie);
330*54fd6939SJiyong Park 
331*54fd6939SJiyong Park /* Private exported functions from psci_stat.c */
332*54fd6939SJiyong Park void psci_stats_update_pwr_down(unsigned int end_pwrlvl,
333*54fd6939SJiyong Park 			const psci_power_state_t *state_info);
334*54fd6939SJiyong Park void psci_stats_update_pwr_up(unsigned int end_pwrlvl,
335*54fd6939SJiyong Park 			const psci_power_state_t *state_info);
336*54fd6939SJiyong Park u_register_t psci_stat_residency(u_register_t target_cpu,
337*54fd6939SJiyong Park 			unsigned int power_state);
338*54fd6939SJiyong Park u_register_t psci_stat_count(u_register_t target_cpu,
339*54fd6939SJiyong Park 			unsigned int power_state);
340*54fd6939SJiyong Park 
341*54fd6939SJiyong Park /* Private exported functions from psci_mem_protect.c */
342*54fd6939SJiyong Park u_register_t psci_mem_protect(unsigned int enable);
343*54fd6939SJiyong Park u_register_t psci_mem_chk_range(uintptr_t base, u_register_t length);
344*54fd6939SJiyong Park 
345*54fd6939SJiyong Park #endif /* PSCI_PRIVATE_H */
346