Skip to content

Commit

Permalink
riscv: alloc space exhausted
Browse files Browse the repository at this point in the history
When trying to run qemu-riscv64_smode_defconfig with 32 harts booting
fails. The debug UART shows a message

    alloc space exhausted

32 is the current maximum number of harts for machine virt in QEMU 7.0.

Raise the default for SYS_MALLOC_F_LEN to 16 KiB.

Move the setting to /Kconfig where we define SYS_MALLOC_F_LEN for
other architectures too.

Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Rick Chen <[email protected]>
  • Loading branch information
xypron authored and Leo Yu-Chi Liang committed Apr 6, 2022
1 parent 22e324c commit 776e8ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ config SYS_MALLOC_F_LEN
hex "Size of malloc() pool before relocation"
depends on SYS_MALLOC_F
default 0x1000 if AM33XX
default 0x4000 if SANDBOX
default 0x4000 if SANDBOX || RISCV
default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \
ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
Expand Down
3 changes: 0 additions & 3 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@ config ANDES_PLIC
The Andes PLIC block holds memory-mapped claim and pending registers
associated with software interrupt.

config SYS_MALLOC_F_LEN
default 0x1000

config SMP
bool "Symmetric Multi-Processing"
depends on SBI_V01 || !RISCV_SMODE
Expand Down

0 comments on commit 776e8ac

Please sign in to comment.