diff options
author | Anup Patel <apatel@ventanamicro.com> | 2023-04-17 11:28:03 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-06-05 15:45:33 +0530 |
commit | 5cf9a540164a018a31a679578a27eb964af0340d (patch) | |
tree | 0fc0efdd1e8692b7592ab66dcc35a21a12e26000 /platform/fpga | |
parent | aad7a377051136c2e0f4adeea2689167a294d2b4 (diff) | |
download | opensbi-5cf9a540164a018a31a679578a27eb964af0340d.zip opensbi-5cf9a540164a018a31a679578a27eb964af0340d.tar.gz opensbi-5cf9a540164a018a31a679578a27eb964af0340d.tar.bz2 |
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>
Diffstat (limited to 'platform/fpga')
-rw-r--r-- | platform/fpga/ariane/platform.c | 1 | ||||
-rw-r--r-- | platform/fpga/openpiton/platform.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/platform/fpga/ariane/platform.c b/platform/fpga/ariane/platform.c index 1e341c2..975528f 100644 --- a/platform/fpga/ariane/platform.c +++ b/platform/fpga/ariane/platform.c @@ -185,5 +185,6 @@ const struct sbi_platform platform = { .features = SBI_PLATFORM_DEFAULT_FEATURES, .hart_count = ARIANE_HART_COUNT, .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE, + .heap_size = SBI_PLATFORM_DEFAULT_HEAP_SIZE(ARIANE_HART_COUNT), .platform_ops_addr = (unsigned long)&platform_ops }; diff --git a/platform/fpga/openpiton/platform.c b/platform/fpga/openpiton/platform.c index 57ae698..e59dc99 100644 --- a/platform/fpga/openpiton/platform.c +++ b/platform/fpga/openpiton/platform.c @@ -220,5 +220,7 @@ const struct sbi_platform platform = { .features = SBI_PLATFORM_DEFAULT_FEATURES, .hart_count = OPENPITON_DEFAULT_HART_COUNT, .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE, + .heap_size = + SBI_PLATFORM_DEFAULT_HEAP_SIZE(OPENPITON_DEFAULT_HART_COUNT), .platform_ops_addr = (unsigned long)&platform_ops }; |