mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-10-24 04:32:05 +01:00
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:
1 parent
aad7a37705
commit
5cf9a54016
9 files changed
+58
-14
No files matched your search
@@ -115,7 +115,7 @@ unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1,
|
||||
}
|
||||
|
||||
platform.hart_count = hart_count;
|
||||
|
||||
platform.heap_size = SBI_PLATFORM_DEFAULT_HEAP_SIZE(hart_count);
|
||||
platform_has_mlevel_imsic = fdt_check_imsic_mlevel(fdt);
|
||||
|
||||
/* Return original FDT pointer */
|
||||
@@ -315,5 +315,6 @@ struct sbi_platform platform = {
|
||||
.hart_count = SBI_HARTMASK_MAX_BITS,
|
||||
.hart_index2id = generic_hart_index2id,
|
||||
.hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
|
||||
.heap_size = SBI_PLATFORM_DEFAULT_HEAP_SIZE(0),
|
||||
.platform_ops_addr = (unsigned long)&platform_ops
|
||||
};
|
||||
Reference in new issue
Block a user