Skip to content

Commit 7278c21

Browse files
authored
Increase ACE OpenSBI hart stack size to 16 KiB (#146)
Signed-off-by: whensun <theodoruswensanfebruanto025@gmail.com>
1 parent 1ebdebf commit 7278c21

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎security-monitor/platform/generic/platform.c‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,13 @@ const struct sbi_platform_operations platform_ops = {
380380
.vendor_ext_provider = generic_vendor_ext_provider,
381381
};
382382

383+
/*
384+
* OpenSBI reserves 4 KiB of each hart stack region for scratch data.
385+
* ACE requires additional stack space during security monitor initialization.
386+
* A 16 KiB region provides 12 KiB of usable stack.
387+
*/
388+
#define ACE_OPENSBI_HART_STACK_SIZE (16 * 1024)
389+
383390
struct sbi_platform platform = {
384391
.opensbi_version = OPENSBI_VERSION,
385392
.platform_version =
@@ -389,7 +396,7 @@ struct sbi_platform platform = {
389396
.features = SBI_PLATFORM_DEFAULT_FEATURES,
390397
.hart_count = SBI_HARTMASK_MAX_BITS,
391398
.hart_index2id = generic_hart_index2id,
392-
.hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
399+
.hart_stack_size = ACE_OPENSBI_HART_STACK_SIZE,
393400
.heap_size = SBI_PLATFORM_DEFAULT_HEAP_SIZE(0),
394401
.platform_ops_addr = (unsigned long)&platform_ops
395402
};

0 commit comments

Comments
 (0)