hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/include/asm/boot.h
....@@ -24,9 +24,16 @@
2424 # error "Invalid value for CONFIG_PHYSICAL_ALIGN"
2525 #endif
2626
27
-#ifdef CONFIG_KERNEL_BZIP2
27
+#if defined(CONFIG_KERNEL_BZIP2)
2828 # 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
3037 # define BOOT_HEAP_SIZE 0x10000
3138 #endif
3239