Skip to content

Increase ACE OpenSBI hart stack size to 16 KiB - #146

Merged
wojciechozga merged 1 commit into
IBM:mainfrom
whensun:fix/ace-opensbi-hart-stack
Nov 5, 2026
Merged

wojciechozga merged 1 commit into
IBM:mainfrom
whensun:fix/ace-opensbi-hart-stack

Conversation

@whensun

@whensun whensun commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Description of the changes

This PR increases the ACE OpenSBI per-hart stack region from 8 KiB to 16 KiB to prevent stack exhaustion during security monitor initialization.

Previously, the default 8 KiB region reserved 4 KiB for OpenSBI scratch data, leaving only 4 KiB of usable stack space. During initialization with RISC-V Vector support, the observed stack usage reached 5,120 bytes, exceeding the available stack space and coinciding with intermittent security monitor startup panics.

This PR introduces:

  • An ACE-specific ACE_OPENSBI_HART_STACK_SIZE constant set to 16 KiB.
  • An increase in usable per-hart stack space from 4 KiB to 12 KiB.
  • A platform-specific configuration without modifying the default OpenSBI stack size.

The change provides additional stack space for ACE security monitor initialization while keeping the modification limited to the ACE platform configuration.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change
  • Refactorization

How to test this PR?

  1. Build ACE-RISCV with the updated OpenSBI hart stack configuration.
  2. Verify that the per-hart stack region is configured to 16 KiB.
  3. Run the security monitor with RISC-V Vector support enabled.
  4. Verify that security monitor initialization completes without stack exhaustion or startup panics.

The stack exhaustion issue was observed during the development of Vector context-switch preservation in PR #145. The updated stack configuration was validated together with that implementation.

@whensun
whensun force-pushed the fix/ace-opensbi-hart-stack branch from 298ce2a to 7516bfe Compare November 4, 2026 02:53
@wojciechozga
wojciechozga merged commit 7278c21 into IBM:main Nov 5, 2026
3 checks passed
@wojciechozga

Copy link
Copy Markdown
Member

Thank you for this contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants