summaryrefslogtreecommitdiff
path: root/config/coreboot/default/patches/0028-Kconfig-Decrease-default-HEAP_SIZE-from-1-MiB-to-512.patch
blob: 31e86e862a2fcd76a9e67d6578a5dc2c58881778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 7eda35a9b63d070ede24b32253855ce07c6c7d13 Mon Sep 17 00:00:00 2001
From: Bill XIE <persmule@hardenedlinux.org>
Date: Tue, 24 Oct 2023 13:56:16 +0800
Subject: [PATCH 1/2] Kconfig: Decrease default HEAP_SIZE from 1 MiB to 512 KiB

Commit 44a48ce7a46c ("Kconfig: Bring HEAP_SIZE to a common, large
value") breaks S3 resume from TSEG stage cache on many platforms,
including GM45 and Ivy Bridge, so limit it to 512 KiB.

Please test this against other platforms before merging!

Tested: Setting it to 0x80000 results a working S3 resume on Thinkpad
	X200 and T430, with log in cbmem for S3 resume, while 0xa0000
	breaks it. coreboot log during failed resume when (HEAP_SIZE
	>= 0xa0000) cannot be obtained from EHCI debug, while log in
	cbmem shows that ramstage is failed to be found in TSEG stage
	cache, as shown in https://ticket.coreboot.org/issues/512 .

Resolves: https://ticket.coreboot.org/issues/512
Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: Ib1de1eb8487df5bdf004e544d40667833a291515
---
 src/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Kconfig b/src/Kconfig
index ae8024089e..6db0736715 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -751,7 +751,7 @@ config RTC
 
 config HEAP_SIZE
 	hex
-	default 0x100000
+	default 0x80000
 
 config STACK_SIZE
 	hex
-- 
2.39.2