Re: [PATCH] include: sbi_platform: Increase default stack size
Anup Patel <[email protected]> Sat, 13 Jun 2026 18:50:38 +0530
| Newsgroups | org.infradead.lists.opensbi |
|---|---|
| Message-ID | <CAK9=C2XGzAM+Qh3hXX78G6KjW7XxKOAd3Gwz9GBM6OdviYLPyw@mail.gmail.com> |
On Sun, May 24, 2026 at 11:28 AM Vivian Wang <[email protected]> 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. We are preferring large data to be allocated from heap space and use scratch space only for small / per-hart data. The per-hart stack is also limited in size so stack can't be used for large data. My recomendation is to allocate mask[] from heap space on-demand for each hart and store the pointer in the scratch space. This on-demand allocation can be done by sbi_misaligned_v_ld_emulator() or sbi_misaligned_v_st_emulator() but the scratch offset is allocated once in cold boot path. If we run-out heap space then we keep adjusting the heap size estimate for generic platform. (Refer, fw_platform_calculate_heap_size() in generic platform) I will try to send-out a small untested series soon. Regards, Anup -- opensbi mailing list [email protected] http://lists.infradead.org/mailman/listinfo/opensbi