[PATCH] include: sbi_platform: Increase default stack size

Vivian Wang wangruikang at iscas.ac.cn
Sat Jun 13 11:14:44 PDT 2026


On 6/13/26 21:20, Anup Patel wrote:
> On Sun, May 24, 2026 at 11:28 AM Vivian Wang <wangruikang at iscas.ac.cn> wrote:
>> sbi_misaligned_v_ld_emulator() has a local buffer (namely mask) which is
>> 8192 bytes in size, so the default stack size is not enough. Double it
>> to 16384.
> Increasing the stack size in only a temporary fix and only deferring
> the problem to some other day.

Just for context, Bo Gan has already posted a solution for emulation to
use a small fixed (relative to VLEN) amount of stack for the mask [1]
(depending on other fixes [2]), so this "some other day" should happen
soon (knocking on wood).

My personal preference is to not to further complicate the code in the
mean time, so I don't think the heap allocation solution is really
necessary. But if bumping the stack size is not acceptable then heap
allocation is probably the way to go, although that would still be a
temporary solution.

[1]:
https://lore.kernel.org/opensbi/20260609060024.706-1-ganboing@gmail.com/
[2]:
https://lore.kernel.org/opensbi/20260605113214.242-1-ganboing@gmail.com/




More information about the opensbi mailing list