diff options
author | danh-arm <dan.handley@arm.com> | 2014-08-19 11:48:38 +0100 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2014-08-19 11:48:38 +0100 |
commit | f139a39a612e152706120529c640410e05fcc976 (patch) | |
tree | 9f52641daefbb25d4dc7c9af1e4bca74c23957c1 /services/std_svc/psci/psci_common.c | |
parent | a1d80440c44ce70e5fec4d8c60b5f6688b6cf8ff (diff) | |
parent | d5f130930624ceb95cde40de999a880aa2b00493 (diff) |
Merge pull request #191 from danh-arm/jc/tf-issues/218
Add support for PSCI SYSTEM_OFF and SYSTEM_RESET APIs v2
Diffstat (limited to 'services/std_svc/psci/psci_common.c')
-rw-r--r-- | services/std_svc/psci/psci_common.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c index 56f3daf2..2fd1764c 100644 --- a/services/std_svc/psci/psci_common.c +++ b/services/std_svc/psci/psci_common.c @@ -446,3 +446,33 @@ void psci_register_spd_pm_hook(const spd_pm_ops_t *pm) { psci_spd_pm = pm; } + +/******************************************************************************* + * This function prints the state of all affinity instances present in the + * system + ******************************************************************************/ +void psci_print_affinity_map(void) +{ +#if LOG_LEVEL >= LOG_LEVEL_INFO + aff_map_node_t *node; + unsigned int idx; + /* This array maps to the PSCI_STATE_X definitions in psci.h */ + static const char *psci_state_str[] = { + "ON", + "OFF", + "ON_PENDING", + "SUSPEND" + }; + + INFO("PSCI Affinity Map:\n"); + for (idx = 0; idx < PSCI_NUM_AFFS ; idx++) { + node = &psci_aff_map[idx]; + if (!(node->state & PSCI_AFF_PRESENT)) { + continue; + } + INFO(" AffInst: Level %u, MPID 0x%lx, State %s\n", + node->level, node->mpidr, + psci_state_str[psci_get_state(node)]); + } +#endif +} |