summaryrefslogtreecommitdiff
path: root/config/coreboot/default/patches/0029-Kconfig-Restore-HEAP_SIZE-overrides-greater-than-512.patch
blob: 2bfd87835ff5651ee3876bf68abe2ad74a4fc52a (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
From 012a72b4acfe19f4456f203f2378f98d00646122 Mon Sep 17 00:00:00 2001
From: Bill XIE <persmule@hardenedlinux.org>
Date: Tue, 31 Oct 2023 00:12:02 +0800
Subject: [PATCH 2/2] Kconfig: Restore HEAP_SIZE overrides greater than 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.

Now the default value becomes 512 KiB, but a few platforms have
greater value before commit 44a48ce7a46c. This commit is to restore
them.

Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: I78cd56b0683dd2ef94319a98a720f2da58151626
---
 src/Kconfig                     | 1 +
 src/northbridge/amd/pi/Kconfig  | 4 ++++
 src/soc/amd/picasso/Kconfig     | 4 ++++
 src/soc/amd/stoneyridge/Kconfig | 4 ++++
 4 files changed, 13 insertions(+)

diff --git a/src/Kconfig b/src/Kconfig
index 6db0736715..24bd1469e0 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -751,6 +751,7 @@ config RTC
 
 config HEAP_SIZE
 	hex
+	default 0x100000 if FLATTENED_DEVICE_TREE
 	default 0x80000
 
 config STACK_SIZE
diff --git a/src/northbridge/amd/pi/Kconfig b/src/northbridge/amd/pi/Kconfig
index 4ffe82a15f..4518db149b 100644
--- a/src/northbridge/amd/pi/Kconfig
+++ b/src/northbridge/amd/pi/Kconfig
@@ -29,4 +29,8 @@ config HW_MEM_HOLE_SIZEK
 	hex
 	default 0x200000
 
+config HEAP_SIZE
+	hex
+	default 0xc0000
+
 endif # NORTHBRIDGE_AMD_PI
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index c33f287067..796fe4eb13 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -264,6 +264,10 @@ config S3_VGA_ROM_RUN
 	bool
 	default n
 
+config HEAP_SIZE
+	hex
+	default 0xc0000
+
 config SERIRQ_CONTINUOUS_MODE
 	bool
 	default n
diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig
index 6ff135e6a8..9af7455bae 100644
--- a/src/soc/amd/stoneyridge/Kconfig
+++ b/src/soc/amd/stoneyridge/Kconfig
@@ -152,6 +152,10 @@ config S3_VGA_ROM_RUN
 	bool
 	default n
 
+config HEAP_SIZE
+	hex
+	default 0xc0000
+
 config EHCI_BAR
 	hex
 	default 0xfef00000
-- 
2.39.2