Merge "Update test_psci_stat.c to support more pwr levels"
diff --git a/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c b/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c
index 4732796..2a1e9e7 100644
--- a/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c
+++ b/tftf/tests/runtime_services/standard_service/psci/api_tests/psci_stat/test_psci_stat.c
@@ -30,12 +30,16 @@
u_register_t residency;
} psci_stat_data_t;
-/* Assuming 3 power levels as maximum */
+/* Assuming 4 power levels as maximum */
#define MAX_STAT_STATES (PLAT_MAX_PWR_STATES_PER_LVL * \
PLAT_MAX_PWR_STATES_PER_LVL * \
+ PLAT_MAX_PWR_STATES_PER_LVL * \
PLAT_MAX_PWR_STATES_PER_LVL)
-CASSERT(PLAT_MAX_PWR_LEVEL <= 2, assert_maximum_defined_stat_array_size_exceeded);
+/* Based on PSCI_MAX_PWR_LVL in tf-a
+ * See: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/include/lib/psci/psci.h#n38
+ */
+CASSERT(PLAT_MAX_PWR_LEVEL <= 3, assert_maximum_defined_stat_array_size_exceeded);
/*
* The data structure holding stat information as queried by each CPU.