diff options
| author | Anup Patel <[email protected]> | 2023-12-11 13:33:58 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-12-19 15:56:37 +0530 |
| commit | 80169b25f8a9a7cb8becceff9a414900919527c6 (patch) | |
| tree | e7f84a2d2d2c42c172bc366ac1e3b10fb14e65a3 | |
| parent | 416ceb3cd72db8d24373274316e2f5d5d3800bf3 (diff) | |
platform: generic: Fine tune fw_platform_calculate_heap_size()
Let's use SBI_TLB_INFO_SIZE instead of hard-coded 0x40 in
fw_platform_calculate_heap_size() to fine tune the heap size
required for per-hart TLB fifos.
Signed-off-by: Anup Patel <[email protected]>
| -rw-r--r-- | platform/generic/platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/generic/platform.c b/platform/generic/platform.c index 08ae92ae..85072275 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -16,6 +16,7 @@ #include <sbi/sbi_platform.h> #include <sbi/sbi_string.h> #include <sbi/sbi_system.h> +#include <sbi/sbi_tlb.h> #include <sbi_utils/fdt/fdt_domain.h> #include <sbi_utils/fdt/fdt_fixup.h> #include <sbi_utils/fdt/fdt_helper.h> @@ -63,7 +64,7 @@ static u32 fw_platform_calculate_heap_size(u32 hart_count) heap_size = SBI_PLATFORM_DEFAULT_HEAP_SIZE(hart_count); /* For TLB fifo */ - heap_size += 0x40 * (hart_count) * (hart_count); + heap_size += SBI_TLB_INFO_SIZE * (hart_count) * (hart_count); return BIT_ALIGN(heap_size, HEAP_BASE_ALIGN); } |
