.. | .. |
---|
24 | 24 | # error "Invalid value for CONFIG_PHYSICAL_ALIGN" |
---|
25 | 25 | #endif |
---|
26 | 26 | |
---|
27 | | -#ifdef CONFIG_KERNEL_BZIP2 |
---|
| 27 | +#if defined(CONFIG_KERNEL_BZIP2) |
---|
28 | 28 | # define BOOT_HEAP_SIZE 0x400000 |
---|
29 | | -#else /* !CONFIG_KERNEL_BZIP2 */ |
---|
| 29 | +#elif defined(CONFIG_KERNEL_ZSTD) |
---|
| 30 | +/* |
---|
| 31 | + * Zstd needs to allocate the ZSTD_DCtx in order to decompress the kernel. |
---|
| 32 | + * The ZSTD_DCtx is ~160KB, so set the heap size to 192KB because it is a |
---|
| 33 | + * round number and to allow some slack. |
---|
| 34 | + */ |
---|
| 35 | +# define BOOT_HEAP_SIZE 0x30000 |
---|
| 36 | +#else |
---|
30 | 37 | # define BOOT_HEAP_SIZE 0x10000 |
---|
31 | 38 | #endif |
---|
32 | 39 | |
---|