arm-trusted-firmware/lib/psci
Graeme Gregory a86865ac42 PSCI: fix limit of 256 CPUs caused by cast to unsigned char
In psci_setup.c psci_init_pwr_domain_node() takes an unsigned
char as node_idx which limits it to initialising only the first
256 CPUs. As the calling function does not check for a limit of
256 I think this is a bug so change the unsigned char to
uint16_t and change the cast from the calling site in
populate_power_domain_tree().

Also update the non_cpu_pwr_domain_node structure lock_index
to uint16_t and update the function signature for psci_lock_init()
appropriately.

Finally add a define PSCI_MAX_CPUS_INDEX to psci_private.h and add
a CASSERT to psci_setup.c to make sure PLATFORM_CORE_COUNT cannot
exceed the index value.

Signed-off-by: Graeme Gregory <graeme@nuviainc.com>
Change-Id: I9e26842277db7483fd698b46bbac62aa86e71b45
2020-12-22 07:39:51 +00:00
..
aarch32 Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
aarch64 Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
psci_common.c Increase type widths to satisfy width requirements 2020-10-12 10:55:03 -05:00
psci_lib.mk mem_protect: Add mem_protect API 2017-09-25 13:32:20 +01:00
psci_main.c Unify type of "cpu_idx" across PSCI module. 2020-01-10 17:11:51 +00:00
psci_mem_protect.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
psci_off.c Unify type of "cpu_idx" across PSCI module. 2020-01-10 17:11:51 +00:00
psci_on.c Unify type of "cpu_idx" across PSCI module. 2020-01-10 17:11:51 +00:00
psci_private.h PSCI: fix limit of 256 CPUs caused by cast to unsigned char 2020-12-22 07:39:51 +00:00
psci_setup.c PSCI: fix limit of 256 CPUs caused by cast to unsigned char 2020-12-22 07:39:51 +00:00
psci_stat.c Unify type of "cpu_idx" across PSCI module. 2020-01-10 17:11:51 +00:00
psci_suspend.c Unify type of "cpu_idx" across PSCI module. 2020-01-10 17:11:51 +00:00
psci_system_off.c Don't return error information from console_flush 2020-10-09 10:21:50 -05:00