platform: Allow platforms to specify heap size

We extend struct sbi_platform and struct sbi_scratch to allow platforms
specify the heap size to the OpenSBI firmwares. The OpenSBI firmwares
will use this information to determine the location of heap and provide
heap base address in per-HART scratch space.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
This commit is contained in:
Anup Patel
2023-04-17 11:28:03 +05:30
committed by Anup Patel
parent aad7a37705
commit 5cf9a54016
9 changed files with 58 additions and 14 deletions

View File

@@ -244,5 +244,7 @@ const struct sbi_platform platform = {
.features = SBI_PLATFORM_DEFAULT_FEATURES,
.hart_count = UX600_HART_COUNT,
.hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.heap_size =
SBI_PLATFORM_DEFAULT_HEAP_SIZE(UX600_HART_COUNT),
.platform_ops_addr = (unsigned long)&platform_ops
};