1*532ed618SSoby Mathew /* 2*532ed618SSoby Mathew * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. 3*532ed618SSoby Mathew * 4*532ed618SSoby Mathew * Redistribution and use in source and binary forms, with or without 5*532ed618SSoby Mathew * modification, are permitted provided that the following conditions are met: 6*532ed618SSoby Mathew * 7*532ed618SSoby Mathew * Redistributions of source code must retain the above copyright notice, this 8*532ed618SSoby Mathew * list of conditions and the following disclaimer. 9*532ed618SSoby Mathew * 10*532ed618SSoby Mathew * Redistributions in binary form must reproduce the above copyright notice, 11*532ed618SSoby Mathew * this list of conditions and the following disclaimer in the documentation 12*532ed618SSoby Mathew * and/or other materials provided with the distribution. 13*532ed618SSoby Mathew * 14*532ed618SSoby Mathew * Neither the name of ARM nor the names of its contributors may be used 15*532ed618SSoby Mathew * to endorse or promote products derived from this software without specific 16*532ed618SSoby Mathew * prior written permission. 17*532ed618SSoby Mathew * 18*532ed618SSoby Mathew * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19*532ed618SSoby Mathew * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20*532ed618SSoby Mathew * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21*532ed618SSoby Mathew * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22*532ed618SSoby Mathew * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23*532ed618SSoby Mathew * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24*532ed618SSoby Mathew * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25*532ed618SSoby Mathew * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26*532ed618SSoby Mathew * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27*532ed618SSoby Mathew * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28*532ed618SSoby Mathew * POSSIBILITY OF SUCH DAMAGE. 29*532ed618SSoby Mathew */ 30*532ed618SSoby Mathew 31*532ed618SSoby Mathew #ifndef __PSCI_H__ 32*532ed618SSoby Mathew #define __PSCI_H__ 33*532ed618SSoby Mathew 34*532ed618SSoby Mathew #include <bakery_lock.h> 35*532ed618SSoby Mathew #include <platform_def.h> /* for PLAT_NUM_PWR_DOMAINS */ 36*532ed618SSoby Mathew #if ENABLE_PLAT_COMPAT 37*532ed618SSoby Mathew #include <psci_compat.h> 38*532ed618SSoby Mathew #endif 39*532ed618SSoby Mathew 40*532ed618SSoby Mathew /******************************************************************************* 41*532ed618SSoby Mathew * Number of power domains whose state this PSCI implementation can track 42*532ed618SSoby Mathew ******************************************************************************/ 43*532ed618SSoby Mathew #ifdef PLAT_NUM_PWR_DOMAINS 44*532ed618SSoby Mathew #define PSCI_NUM_PWR_DOMAINS PLAT_NUM_PWR_DOMAINS 45*532ed618SSoby Mathew #else 46*532ed618SSoby Mathew #define PSCI_NUM_PWR_DOMAINS (2 * PLATFORM_CORE_COUNT) 47*532ed618SSoby Mathew #endif 48*532ed618SSoby Mathew 49*532ed618SSoby Mathew #define PSCI_NUM_NON_CPU_PWR_DOMAINS (PSCI_NUM_PWR_DOMAINS - \ 50*532ed618SSoby Mathew PLATFORM_CORE_COUNT) 51*532ed618SSoby Mathew 52*532ed618SSoby Mathew /* This is the power level corresponding to a CPU */ 53*532ed618SSoby Mathew #define PSCI_CPU_PWR_LVL 0 54*532ed618SSoby Mathew 55*532ed618SSoby Mathew /* 56*532ed618SSoby Mathew * The maximum power level supported by PSCI. Since PSCI CPU_SUSPEND 57*532ed618SSoby Mathew * uses the old power_state parameter format which has 2 bits to specify the 58*532ed618SSoby Mathew * power level, this constant is defined to be 3. 59*532ed618SSoby Mathew */ 60*532ed618SSoby Mathew #define PSCI_MAX_PWR_LVL 3 61*532ed618SSoby Mathew 62*532ed618SSoby Mathew /******************************************************************************* 63*532ed618SSoby Mathew * Defines for runtime services function ids 64*532ed618SSoby Mathew ******************************************************************************/ 65*532ed618SSoby Mathew #define PSCI_VERSION 0x84000000 66*532ed618SSoby Mathew #define PSCI_CPU_SUSPEND_AARCH32 0x84000001 67*532ed618SSoby Mathew #define PSCI_CPU_SUSPEND_AARCH64 0xc4000001 68*532ed618SSoby Mathew #define PSCI_CPU_OFF 0x84000002 69*532ed618SSoby Mathew #define PSCI_CPU_ON_AARCH32 0x84000003 70*532ed618SSoby Mathew #define PSCI_CPU_ON_AARCH64 0xc4000003 71*532ed618SSoby Mathew #define PSCI_AFFINITY_INFO_AARCH32 0x84000004 72*532ed618SSoby Mathew #define PSCI_AFFINITY_INFO_AARCH64 0xc4000004 73*532ed618SSoby Mathew #define PSCI_MIG_AARCH32 0x84000005 74*532ed618SSoby Mathew #define PSCI_MIG_AARCH64 0xc4000005 75*532ed618SSoby Mathew #define PSCI_MIG_INFO_TYPE 0x84000006 76*532ed618SSoby Mathew #define PSCI_MIG_INFO_UP_CPU_AARCH32 0x84000007 77*532ed618SSoby Mathew #define PSCI_MIG_INFO_UP_CPU_AARCH64 0xc4000007 78*532ed618SSoby Mathew #define PSCI_SYSTEM_OFF 0x84000008 79*532ed618SSoby Mathew #define PSCI_SYSTEM_RESET 0x84000009 80*532ed618SSoby Mathew #define PSCI_FEATURES 0x8400000A 81*532ed618SSoby Mathew #define PSCI_SYSTEM_SUSPEND_AARCH32 0x8400000E 82*532ed618SSoby Mathew #define PSCI_SYSTEM_SUSPEND_AARCH64 0xc400000E 83*532ed618SSoby Mathew #define PSCI_STAT_RESIDENCY_AARCH32 0x84000010 84*532ed618SSoby Mathew #define PSCI_STAT_RESIDENCY_AARCH64 0xc4000010 85*532ed618SSoby Mathew #define PSCI_STAT_COUNT_AARCH32 0x84000011 86*532ed618SSoby Mathew #define PSCI_STAT_COUNT_AARCH64 0xc4000011 87*532ed618SSoby Mathew 88*532ed618SSoby Mathew /* Macro to help build the psci capabilities bitfield */ 89*532ed618SSoby Mathew #define define_psci_cap(x) (1 << (x & 0x1f)) 90*532ed618SSoby Mathew 91*532ed618SSoby Mathew /* 92*532ed618SSoby Mathew * Number of PSCI calls (above) implemented 93*532ed618SSoby Mathew */ 94*532ed618SSoby Mathew #if ENABLE_PSCI_STAT 95*532ed618SSoby Mathew #define PSCI_NUM_CALLS 22 96*532ed618SSoby Mathew #else 97*532ed618SSoby Mathew #define PSCI_NUM_CALLS 18 98*532ed618SSoby Mathew #endif 99*532ed618SSoby Mathew 100*532ed618SSoby Mathew /******************************************************************************* 101*532ed618SSoby Mathew * PSCI Migrate and friends 102*532ed618SSoby Mathew ******************************************************************************/ 103*532ed618SSoby Mathew #define PSCI_TOS_UP_MIG_CAP 0 104*532ed618SSoby Mathew #define PSCI_TOS_NOT_UP_MIG_CAP 1 105*532ed618SSoby Mathew #define PSCI_TOS_NOT_PRESENT_MP 2 106*532ed618SSoby Mathew 107*532ed618SSoby Mathew /******************************************************************************* 108*532ed618SSoby Mathew * PSCI CPU_SUSPEND 'power_state' parameter specific defines 109*532ed618SSoby Mathew ******************************************************************************/ 110*532ed618SSoby Mathew #define PSTATE_ID_SHIFT 0 111*532ed618SSoby Mathew 112*532ed618SSoby Mathew #if PSCI_EXTENDED_STATE_ID 113*532ed618SSoby Mathew #define PSTATE_VALID_MASK 0xB0000000 114*532ed618SSoby Mathew #define PSTATE_TYPE_SHIFT 30 115*532ed618SSoby Mathew #define PSTATE_ID_MASK 0xfffffff 116*532ed618SSoby Mathew #else 117*532ed618SSoby Mathew #define PSTATE_VALID_MASK 0xFCFE0000 118*532ed618SSoby Mathew #define PSTATE_TYPE_SHIFT 16 119*532ed618SSoby Mathew #define PSTATE_PWR_LVL_SHIFT 24 120*532ed618SSoby Mathew #define PSTATE_ID_MASK 0xffff 121*532ed618SSoby Mathew #define PSTATE_PWR_LVL_MASK 0x3 122*532ed618SSoby Mathew 123*532ed618SSoby Mathew #define psci_get_pstate_pwrlvl(pstate) (((pstate) >> PSTATE_PWR_LVL_SHIFT) & \ 124*532ed618SSoby Mathew PSTATE_PWR_LVL_MASK) 125*532ed618SSoby Mathew #define psci_make_powerstate(state_id, type, pwrlvl) \ 126*532ed618SSoby Mathew (((state_id) & PSTATE_ID_MASK) << PSTATE_ID_SHIFT) |\ 127*532ed618SSoby Mathew (((type) & PSTATE_TYPE_MASK) << PSTATE_TYPE_SHIFT) |\ 128*532ed618SSoby Mathew (((pwrlvl) & PSTATE_PWR_LVL_MASK) << PSTATE_PWR_LVL_SHIFT) 129*532ed618SSoby Mathew #endif /* __PSCI_EXTENDED_STATE_ID__ */ 130*532ed618SSoby Mathew 131*532ed618SSoby Mathew #define PSTATE_TYPE_STANDBY 0x0 132*532ed618SSoby Mathew #define PSTATE_TYPE_POWERDOWN 0x1 133*532ed618SSoby Mathew #define PSTATE_TYPE_MASK 0x1 134*532ed618SSoby Mathew 135*532ed618SSoby Mathew #define psci_get_pstate_id(pstate) (((pstate) >> PSTATE_ID_SHIFT) & \ 136*532ed618SSoby Mathew PSTATE_ID_MASK) 137*532ed618SSoby Mathew #define psci_get_pstate_type(pstate) (((pstate) >> PSTATE_TYPE_SHIFT) & \ 138*532ed618SSoby Mathew PSTATE_TYPE_MASK) 139*532ed618SSoby Mathew #define psci_check_power_state(pstate) ((pstate) & PSTATE_VALID_MASK) 140*532ed618SSoby Mathew 141*532ed618SSoby Mathew /******************************************************************************* 142*532ed618SSoby Mathew * PSCI CPU_FEATURES feature flag specific defines 143*532ed618SSoby Mathew ******************************************************************************/ 144*532ed618SSoby Mathew /* Features flags for CPU SUSPEND power state parameter format. Bits [1:1] */ 145*532ed618SSoby Mathew #define FF_PSTATE_SHIFT 1 146*532ed618SSoby Mathew #define FF_PSTATE_ORIG 0 147*532ed618SSoby Mathew #define FF_PSTATE_EXTENDED 1 148*532ed618SSoby Mathew #if PSCI_EXTENDED_STATE_ID 149*532ed618SSoby Mathew #define FF_PSTATE FF_PSTATE_EXTENDED 150*532ed618SSoby Mathew #else 151*532ed618SSoby Mathew #define FF_PSTATE FF_PSTATE_ORIG 152*532ed618SSoby Mathew #endif 153*532ed618SSoby Mathew 154*532ed618SSoby Mathew /* Features flags for CPU SUSPEND OS Initiated mode support. Bits [0:0] */ 155*532ed618SSoby Mathew #define FF_MODE_SUPPORT_SHIFT 0 156*532ed618SSoby Mathew #define FF_SUPPORTS_OS_INIT_MODE 1 157*532ed618SSoby Mathew 158*532ed618SSoby Mathew /******************************************************************************* 159*532ed618SSoby Mathew * PSCI version 160*532ed618SSoby Mathew ******************************************************************************/ 161*532ed618SSoby Mathew #define PSCI_MAJOR_VER (1 << 16) 162*532ed618SSoby Mathew #define PSCI_MINOR_VER 0x0 163*532ed618SSoby Mathew 164*532ed618SSoby Mathew /******************************************************************************* 165*532ed618SSoby Mathew * PSCI error codes 166*532ed618SSoby Mathew ******************************************************************************/ 167*532ed618SSoby Mathew #define PSCI_E_SUCCESS 0 168*532ed618SSoby Mathew #define PSCI_E_NOT_SUPPORTED -1 169*532ed618SSoby Mathew #define PSCI_E_INVALID_PARAMS -2 170*532ed618SSoby Mathew #define PSCI_E_DENIED -3 171*532ed618SSoby Mathew #define PSCI_E_ALREADY_ON -4 172*532ed618SSoby Mathew #define PSCI_E_ON_PENDING -5 173*532ed618SSoby Mathew #define PSCI_E_INTERN_FAIL -6 174*532ed618SSoby Mathew #define PSCI_E_NOT_PRESENT -7 175*532ed618SSoby Mathew #define PSCI_E_DISABLED -8 176*532ed618SSoby Mathew #define PSCI_E_INVALID_ADDRESS -9 177*532ed618SSoby Mathew 178*532ed618SSoby Mathew #define PSCI_INVALID_MPIDR ~((u_register_t)0) 179*532ed618SSoby Mathew 180*532ed618SSoby Mathew #ifndef __ASSEMBLY__ 181*532ed618SSoby Mathew 182*532ed618SSoby Mathew #include <stdint.h> 183*532ed618SSoby Mathew #include <types.h> 184*532ed618SSoby Mathew 185*532ed618SSoby Mathew /* 186*532ed618SSoby Mathew * These are the states reported by the PSCI_AFFINITY_INFO API for the specified 187*532ed618SSoby Mathew * CPU. The definitions of these states can be found in Section 5.7.1 in the 188*532ed618SSoby Mathew * PSCI specification (ARM DEN 0022C). 189*532ed618SSoby Mathew */ 190*532ed618SSoby Mathew typedef enum { 191*532ed618SSoby Mathew AFF_STATE_ON = 0, 192*532ed618SSoby Mathew AFF_STATE_OFF = 1, 193*532ed618SSoby Mathew AFF_STATE_ON_PENDING = 2 194*532ed618SSoby Mathew } aff_info_state_t; 195*532ed618SSoby Mathew 196*532ed618SSoby Mathew /* 197*532ed618SSoby Mathew * Macro to represent invalid affinity level within PSCI. 198*532ed618SSoby Mathew */ 199*532ed618SSoby Mathew #define PSCI_INVALID_PWR_LVL (PLAT_MAX_PWR_LVL + 1) 200*532ed618SSoby Mathew 201*532ed618SSoby Mathew /* 202*532ed618SSoby Mathew * Type for representing the local power state at a particular level. 203*532ed618SSoby Mathew */ 204*532ed618SSoby Mathew typedef uint8_t plat_local_state_t; 205*532ed618SSoby Mathew 206*532ed618SSoby Mathew /* The local state macro used to represent RUN state. */ 207*532ed618SSoby Mathew #define PSCI_LOCAL_STATE_RUN 0 208*532ed618SSoby Mathew 209*532ed618SSoby Mathew /* 210*532ed618SSoby Mathew * Macro to test whether the plat_local_state is RUN state 211*532ed618SSoby Mathew */ 212*532ed618SSoby Mathew #define is_local_state_run(plat_local_state) \ 213*532ed618SSoby Mathew ((plat_local_state) == PSCI_LOCAL_STATE_RUN) 214*532ed618SSoby Mathew 215*532ed618SSoby Mathew /* 216*532ed618SSoby Mathew * Macro to test whether the plat_local_state is RETENTION state 217*532ed618SSoby Mathew */ 218*532ed618SSoby Mathew #define is_local_state_retn(plat_local_state) \ 219*532ed618SSoby Mathew (((plat_local_state) > PSCI_LOCAL_STATE_RUN) && \ 220*532ed618SSoby Mathew ((plat_local_state) <= PLAT_MAX_RET_STATE)) 221*532ed618SSoby Mathew 222*532ed618SSoby Mathew /* 223*532ed618SSoby Mathew * Macro to test whether the plat_local_state is OFF state 224*532ed618SSoby Mathew */ 225*532ed618SSoby Mathew #define is_local_state_off(plat_local_state) \ 226*532ed618SSoby Mathew (((plat_local_state) > PLAT_MAX_RET_STATE) && \ 227*532ed618SSoby Mathew ((plat_local_state) <= PLAT_MAX_OFF_STATE)) 228*532ed618SSoby Mathew 229*532ed618SSoby Mathew /***************************************************************************** 230*532ed618SSoby Mathew * This data structure defines the representation of the power state parameter 231*532ed618SSoby Mathew * for its exchange between the generic PSCI code and the platform port. For 232*532ed618SSoby Mathew * example, it is used by the platform port to specify the requested power 233*532ed618SSoby Mathew * states during a power management operation. It is used by the generic code to 234*532ed618SSoby Mathew * inform the platform about the target power states that each level should 235*532ed618SSoby Mathew * enter. 236*532ed618SSoby Mathew ****************************************************************************/ 237*532ed618SSoby Mathew typedef struct psci_power_state { 238*532ed618SSoby Mathew /* 239*532ed618SSoby Mathew * The pwr_domain_state[] stores the local power state at each level 240*532ed618SSoby Mathew * for the CPU. 241*532ed618SSoby Mathew */ 242*532ed618SSoby Mathew plat_local_state_t pwr_domain_state[PLAT_MAX_PWR_LVL + 1]; 243*532ed618SSoby Mathew } psci_power_state_t; 244*532ed618SSoby Mathew 245*532ed618SSoby Mathew /******************************************************************************* 246*532ed618SSoby Mathew * Structure used to store per-cpu information relevant to the PSCI service. 247*532ed618SSoby Mathew * It is populated in the per-cpu data array. In return we get a guarantee that 248*532ed618SSoby Mathew * this information will not reside on a cache line shared with another cpu. 249*532ed618SSoby Mathew ******************************************************************************/ 250*532ed618SSoby Mathew typedef struct psci_cpu_data { 251*532ed618SSoby Mathew /* State as seen by PSCI Affinity Info API */ 252*532ed618SSoby Mathew aff_info_state_t aff_info_state; 253*532ed618SSoby Mathew 254*532ed618SSoby Mathew /* 255*532ed618SSoby Mathew * Highest power level which takes part in a power management 256*532ed618SSoby Mathew * operation. 257*532ed618SSoby Mathew */ 258*532ed618SSoby Mathew unsigned char target_pwrlvl; 259*532ed618SSoby Mathew 260*532ed618SSoby Mathew /* The local power state of this CPU */ 261*532ed618SSoby Mathew plat_local_state_t local_state; 262*532ed618SSoby Mathew } psci_cpu_data_t; 263*532ed618SSoby Mathew 264*532ed618SSoby Mathew /******************************************************************************* 265*532ed618SSoby Mathew * Structure populated by platform specific code to export routines which 266*532ed618SSoby Mathew * perform common low level power management functions 267*532ed618SSoby Mathew ******************************************************************************/ 268*532ed618SSoby Mathew typedef struct plat_psci_ops { 269*532ed618SSoby Mathew void (*cpu_standby)(plat_local_state_t cpu_state); 270*532ed618SSoby Mathew int (*pwr_domain_on)(u_register_t mpidr); 271*532ed618SSoby Mathew void (*pwr_domain_off)(const psci_power_state_t *target_state); 272*532ed618SSoby Mathew void (*pwr_domain_suspend)(const psci_power_state_t *target_state); 273*532ed618SSoby Mathew void (*pwr_domain_on_finish)(const psci_power_state_t *target_state); 274*532ed618SSoby Mathew void (*pwr_domain_suspend_finish)( 275*532ed618SSoby Mathew const psci_power_state_t *target_state); 276*532ed618SSoby Mathew void (*pwr_domain_pwr_down_wfi)( 277*532ed618SSoby Mathew const psci_power_state_t *target_state) __dead2; 278*532ed618SSoby Mathew void (*system_off)(void) __dead2; 279*532ed618SSoby Mathew void (*system_reset)(void) __dead2; 280*532ed618SSoby Mathew int (*validate_power_state)(unsigned int power_state, 281*532ed618SSoby Mathew psci_power_state_t *req_state); 282*532ed618SSoby Mathew int (*validate_ns_entrypoint)(uintptr_t ns_entrypoint); 283*532ed618SSoby Mathew void (*get_sys_suspend_power_state)( 284*532ed618SSoby Mathew psci_power_state_t *req_state); 285*532ed618SSoby Mathew int (*get_pwr_lvl_state_idx)(plat_local_state_t pwr_domain_state, 286*532ed618SSoby Mathew int pwrlvl); 287*532ed618SSoby Mathew int (*translate_power_state_by_mpidr)(u_register_t mpidr, 288*532ed618SSoby Mathew unsigned int power_state, 289*532ed618SSoby Mathew psci_power_state_t *output_state); 290*532ed618SSoby Mathew } plat_psci_ops_t; 291*532ed618SSoby Mathew 292*532ed618SSoby Mathew /******************************************************************************* 293*532ed618SSoby Mathew * Optional structure populated by the Secure Payload Dispatcher to be given a 294*532ed618SSoby Mathew * chance to perform any bookkeeping before PSCI executes a power management 295*532ed618SSoby Mathew * operation. It also allows PSCI to determine certain properties of the SP e.g. 296*532ed618SSoby Mathew * migrate capability etc. 297*532ed618SSoby Mathew ******************************************************************************/ 298*532ed618SSoby Mathew typedef struct spd_pm_ops { 299*532ed618SSoby Mathew void (*svc_on)(u_register_t target_cpu); 300*532ed618SSoby Mathew int32_t (*svc_off)(u_register_t __unused); 301*532ed618SSoby Mathew void (*svc_suspend)(u_register_t max_off_pwrlvl); 302*532ed618SSoby Mathew void (*svc_on_finish)(u_register_t __unused); 303*532ed618SSoby Mathew void (*svc_suspend_finish)(u_register_t max_off_pwrlvl); 304*532ed618SSoby Mathew int32_t (*svc_migrate)(u_register_t from_cpu, u_register_t to_cpu); 305*532ed618SSoby Mathew int32_t (*svc_migrate_info)(u_register_t *resident_cpu); 306*532ed618SSoby Mathew void (*svc_system_off)(void); 307*532ed618SSoby Mathew void (*svc_system_reset)(void); 308*532ed618SSoby Mathew } spd_pm_ops_t; 309*532ed618SSoby Mathew 310*532ed618SSoby Mathew /******************************************************************************* 311*532ed618SSoby Mathew * Function & Data prototypes 312*532ed618SSoby Mathew ******************************************************************************/ 313*532ed618SSoby Mathew unsigned int psci_version(void); 314*532ed618SSoby Mathew int psci_cpu_on(u_register_t target_cpu, 315*532ed618SSoby Mathew uintptr_t entrypoint, 316*532ed618SSoby Mathew u_register_t context_id); 317*532ed618SSoby Mathew int psci_cpu_suspend(unsigned int power_state, 318*532ed618SSoby Mathew uintptr_t entrypoint, 319*532ed618SSoby Mathew u_register_t context_id); 320*532ed618SSoby Mathew int psci_system_suspend(uintptr_t entrypoint, u_register_t context_id); 321*532ed618SSoby Mathew int psci_cpu_off(void); 322*532ed618SSoby Mathew int psci_affinity_info(u_register_t target_affinity, 323*532ed618SSoby Mathew unsigned int lowest_affinity_level); 324*532ed618SSoby Mathew int psci_migrate(u_register_t target_cpu); 325*532ed618SSoby Mathew int psci_migrate_info_type(void); 326*532ed618SSoby Mathew long psci_migrate_info_up_cpu(void); 327*532ed618SSoby Mathew int psci_features(unsigned int psci_fid); 328*532ed618SSoby Mathew void __dead2 psci_power_down_wfi(void); 329*532ed618SSoby Mathew void psci_entrypoint(void); 330*532ed618SSoby Mathew void psci_register_spd_pm_hook(const spd_pm_ops_t *); 331*532ed618SSoby Mathew uintptr_t psci_smc_handler(uint32_t smc_fid, 332*532ed618SSoby Mathew u_register_t x1, 333*532ed618SSoby Mathew u_register_t x2, 334*532ed618SSoby Mathew u_register_t x3, 335*532ed618SSoby Mathew u_register_t x4, 336*532ed618SSoby Mathew void *cookie, 337*532ed618SSoby Mathew void *handle, 338*532ed618SSoby Mathew u_register_t flags); 339*532ed618SSoby Mathew 340*532ed618SSoby Mathew /* PSCI setup function */ 341*532ed618SSoby Mathew int psci_setup(void); 342*532ed618SSoby Mathew 343*532ed618SSoby Mathew #endif /*__ASSEMBLY__*/ 344*532ed618SSoby Mathew 345*532ed618SSoby Mathew #endif /* __PSCI_H__ */ 346