fix: allocate hafnium manifest from bss section
Hafnium manifest structure has grown in size with addition of
FF-A fields. It is currently ~26KB. Init allocates the Hafnium
manifest from stack and leads to a stack corruption. CPU stacks
are 4KB in size. This change declares the Hafnium manifest from
BSS rather than stack.
Fixing the above exhibits a side effect with initrd begin and end
param values which must remain zero in context of the SPMC as no
ramdisk is provided.
Change-Id: I2b99e9879f9f90a699d395862692a0304e6a4487
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/src/boot_flow/spmc.c b/src/boot_flow/spmc.c
index 3f29eca..3343cf0 100644
--- a/src/boot_flow/spmc.c
+++ b/src/boot_flow/spmc.c
@@ -32,14 +32,17 @@
/**
* The value returned by this function is not meaningful in context of the SPMC
- * as there is no initrd.
+ * as there is no initrd. Initrd begin and end values are cleared such that the
+ * check done in one_time_init (initrd_begin is non null) is false, hinting a
+ * ramdisk is not present.
*/
bool plat_boot_flow_get_initrd_range(const struct fdt *fdt, paddr_t *begin,
paddr_t *end)
{
(void)fdt;
- (void)begin;
- (void)end;
+
+ *begin = pa_init(0);
+ *end = pa_init(0);
return true;
}