diff options
Diffstat (limited to 'services/std_svc/psci/psci_private.h')
-rw-r--r-- | services/std_svc/psci/psci_private.h | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/services/std_svc/psci/psci_private.h b/services/std_svc/psci/psci_private.h index 747a2d4..f534087 100644 --- a/services/std_svc/psci/psci_private.h +++ b/services/std_svc/psci/psci_private.h @@ -33,23 +33,15 @@ #include <arch.h> #include <bakery_lock.h> +#include <platform_def.h> /* for PLATFORM_NUM_AFFS */ #include <psci.h> -/******************************************************************************* - * The following two data structures hold the generic information to bringup - * a suspended/hotplugged out cpu - ******************************************************************************/ -typedef struct eret_params { - unsigned long entrypoint; - unsigned long spsr; -} eret_params_t; - -typedef struct ns_entry_info { - eret_params_t eret_info; - unsigned long context_id; - unsigned int scr; - unsigned int sctlr; -} ns_entry_info_t; +/* Number of affinity instances whose state this psci imp. can track */ +#ifdef PLATFORM_NUM_AFFS +#define PSCI_NUM_AFFS PLATFORM_NUM_AFFS +#else +#define PSCI_NUM_AFFS (2 * PLATFORM_CORE_COUNT) +#endif /******************************************************************************* * The following two data structures hold the topology tree which in turn tracks @@ -60,7 +52,7 @@ typedef struct aff_map_node { unsigned short ref_count; unsigned char state; unsigned char level; - unsigned int data; + unsigned int power_state; bakery_lock_t lock; } aff_map_node_t; @@ -69,14 +61,6 @@ typedef struct aff_limits_node { int max; } aff_limits_node_t; -/******************************************************************************* - * This data structure holds secure world context that needs to be preserved - * across cpu_suspend calls which enter the power down state. - ******************************************************************************/ -typedef struct suspend_context { - unsigned int power_state; -} __aligned(CACHE_WRITEBACK_GRANULE) suspend_context_t; - typedef aff_map_node_t (*mpidr_aff_map_nodes_t[MPIDR_MAX_AFFLVL]); typedef unsigned int (*afflvl_power_on_finisher_t)(unsigned long, aff_map_node_t *); @@ -84,8 +68,6 @@ typedef unsigned int (*afflvl_power_on_finisher_t)(unsigned long, /******************************************************************************* * Data prototypes ******************************************************************************/ -extern suspend_context_t psci_suspend_context[PSCI_NUM_AFFS]; -extern ns_entry_info_t psci_ns_entry_info[PSCI_NUM_AFFS]; extern const plat_pm_ops_t *psci_plat_pm_ops; extern aff_map_node_t psci_aff_map[PSCI_NUM_AFFS]; @@ -102,7 +84,6 @@ int get_max_afflvl(void); unsigned short psci_get_state(aff_map_node_t *node); unsigned short psci_get_phys_state(aff_map_node_t *node); void psci_set_state(aff_map_node_t *node, unsigned short state); -void psci_get_ns_entry_info(unsigned int index); unsigned long mpidr_set_aff_inst(unsigned long, unsigned char, int); int psci_validate_mpidr(unsigned long, int); int get_power_on_target_afflvl(unsigned long mpidr); @@ -110,9 +91,9 @@ void psci_afflvl_power_on_finish(unsigned long, int, int, afflvl_power_on_finisher_t *); -int psci_set_ns_entry_info(unsigned int index, - unsigned long entrypoint, - unsigned long context_id); +int psci_save_ns_entry(uint64_t mpidr, + uint64_t entrypoint, uint64_t context_id, + uint32_t caller_scr_el3, uint32_t caller_sctlr_el1); int psci_check_afflvl_range(int start_afflvl, int end_afflvl); void psci_acquire_afflvl_locks(unsigned long mpidr, int start_afflvl, |