fix(hftest): define stacks for all secondary cores
The hftest common libraries was reusing the same stack section
for all secondary cores.
This means some tests would fail unexpectidly.
Adding a function to common.c and service_common.c, which have
the same purpose in the target they are used in, to retrieve
the buffers for the secondary core stacks defined globally.
Signed-off-by: J-Alves <joao.alves@arm.com>
Signed-off-by: K-Meakin <karl.meakin@arm.com>
Change-Id: If93aed330a88c3b52e5771d09911296f2c6214ed
diff --git a/test/hftest/service_common.c b/test/hftest/service_common.c
index b277b38..f0ab701 100644
--- a/test/hftest/service_common.c
+++ b/test/hftest/service_common.c
@@ -29,6 +29,14 @@
static struct hftest_context global_context;
+static alignas(PAGE_SIZE) uint8_t secondary_ec_stack[MAX_CPUS][PAGE_SIZE];
+
+uint8_t *hftest_get_secondary_ec_stack(size_t id)
+{
+ assert(id < MAX_CPUS);
+ return secondary_ec_stack[id];
+}
+
struct hftest_context *hftest_get_context(void)
{
return &global_context;