blob: af685db17a00b607ada18264f237007aded6b923 [file] [log] [blame]
Martin Rothf3e26792016-12-22 10:21:11 -07001comment "Important: Run 'make distclean' before switching boards"
2
Patrick Georgi0588d192009-08-12 15:00:51 +00003choice
4 prompt "Mainboard vendor"
5 default VENDOR_EMULATION
6
Stefan Reinauer139e1062015-04-03 20:11:13 +02007source "src/mainboard/*/Kconfig.name"
Patrick Georgi0588d192009-08-12 15:00:51 +00008
9endchoice
10
Stefan Reinauer139e1062015-04-03 20:11:13 +020011source "src/mainboard/*/Kconfig"
Patrick Georgi0588d192009-08-12 15:00:51 +000012
Angel Pons7671bce2020-03-01 13:07:19 +010013config MAINBOARD_VENDOR
14 string "Mainboard vendor name"
15
Uwe Hermannd65509d2009-10-16 17:37:20 +000016config BOARD_ROMSIZE_KB_256
17 bool
18config BOARD_ROMSIZE_KB_512
19 bool
20config BOARD_ROMSIZE_KB_1024
21 bool
22config BOARD_ROMSIZE_KB_2048
23 bool
24config BOARD_ROMSIZE_KB_4096
25 bool
Angel Pons50a44542019-12-14 16:16:31 +010026config BOARD_ROMSIZE_KB_5120
27 bool
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +010028config BOARD_ROMSIZE_KB_6144
29 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000030config BOARD_ROMSIZE_KB_8192
31 bool
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020032config BOARD_ROMSIZE_KB_10240
33 bool
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010034config BOARD_ROMSIZE_KB_12288
35 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000036config BOARD_ROMSIZE_KB_16384
37 bool
Lee Leahy67358712016-06-08 12:47:07 -070038config BOARD_ROMSIZE_KB_32768
39 bool
40config BOARD_ROMSIZE_KB_65536
41 bool
Uwe Hermannd65509d2009-10-16 17:37:20 +000042
Uwe Hermann168b11b2009-10-07 16:15:40 +000043# TODO: No help text possible for choice fields?
Patrick Georgi0588d192009-08-12 15:00:51 +000044choice
45 prompt "ROM chip size"
Angel Pons3e576732020-03-01 13:28:36 +010046 default COREBOOT_ROMSIZE_KB_256 if BOARD_ROMSIZE_KB_256
47 default COREBOOT_ROMSIZE_KB_512 if BOARD_ROMSIZE_KB_512
48 default COREBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024
49 default COREBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048
50 default COREBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096
51 default COREBOOT_ROMSIZE_KB_5120 if BOARD_ROMSIZE_KB_5120
52 default COREBOOT_ROMSIZE_KB_6144 if BOARD_ROMSIZE_KB_6144
53 default COREBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020054 default COREBOOT_ROMSIZE_KB_10240 if BOARD_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010055 default COREBOOT_ROMSIZE_KB_12288 if BOARD_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000056 default COREBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384
Lee Leahy67358712016-06-08 12:47:07 -070057 default COREBOOT_ROMSIZE_KB_32768 if BOARD_ROMSIZE_KB_32768
58 default COREBOOT_ROMSIZE_KB_65536 if BOARD_ROMSIZE_KB_65536
Uwe Hermann168b11b2009-10-07 16:15:40 +000059 help
60 Select the size of the ROM chip you intend to flash coreboot on.
61
62 The build system will take care of creating a coreboot.rom file
63 of the matching size.
Patrick Georgi0588d192009-08-12 15:00:51 +000064
Patrick Georgi0588d192009-08-12 15:00:51 +000065config COREBOOT_ROMSIZE_KB_256
66 bool "256 KB"
67 help
68 Choose this option if you have a 256 KB ROM chip.
69
70config COREBOOT_ROMSIZE_KB_512
71 bool "512 KB"
72 help
73 Choose this option if you have a 512 KB ROM chip.
74
75config COREBOOT_ROMSIZE_KB_1024
76 bool "1024 KB (1 MB)"
77 help
78 Choose this option if you have a 1024 KB (1 MB) ROM chip.
79
80config COREBOOT_ROMSIZE_KB_2048
81 bool "2048 KB (2 MB)"
82 help
83 Choose this option if you have a 2048 KB (2 MB) ROM chip.
84
Cristi Magherusan7e92ff32009-08-17 14:33:03 +000085config COREBOOT_ROMSIZE_KB_4096
86 bool "4096 KB (4 MB)"
87 help
88 Choose this option if you have a 4096 KB (4 MB) ROM chip.
89
Angel Pons50a44542019-12-14 16:16:31 +010090config COREBOOT_ROMSIZE_KB_5120
91 bool "5120 KB (5 MB)"
92 help
93 Choose this option if you have a 5120 KB (5 MB) ROM chip.
94
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +010095config COREBOOT_ROMSIZE_KB_6144
96 bool "6144 KB (6 MB)"
97 help
98 Choose this option if you have a 6144 KB (6 MB) ROM chip.
99
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000100config COREBOOT_ROMSIZE_KB_8192
101 bool "8192 KB (8 MB)"
102 help
103 Choose this option if you have a 8192 KB (8 MB) ROM chip.
104
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200105config COREBOOT_ROMSIZE_KB_10240
106 bool "10240 KB (10 MB)"
107 help
108 Choose this option if you have a 10240 KB (10 MB) ROM chip.
109
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100110config COREBOOT_ROMSIZE_KB_12288
111 bool "12288 KB (12 MB)"
112 help
113 Choose this option if you have a 12288 KB (12 MB) ROM chip.
114
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000115config COREBOOT_ROMSIZE_KB_16384
116 bool "16384 KB (16 MB)"
117 help
118 Choose this option if you have a 16384 KB (16 MB) ROM chip.
119
Lee Leahy67358712016-06-08 12:47:07 -0700120config COREBOOT_ROMSIZE_KB_32768
121 bool "32768 KB (32 MB)"
122 help
123 Choose this option if you have a 32768 KB (32 MB) ROM chip.
124
125config COREBOOT_ROMSIZE_KB_65536
126 bool "65536 KB (64 MB)"
127 help
128 Choose this option if you have a 65536 KB (64 MB) ROM chip.
129
Patrick Georgi0588d192009-08-12 15:00:51 +0000130endchoice
131
Uwe Hermann168b11b2009-10-07 16:15:40 +0000132# Map the config names to an integer (KB).
Patrick Georgi0588d192009-08-12 15:00:51 +0000133config COREBOOT_ROMSIZE_KB
134 int
Angel Pons3e576732020-03-01 13:28:36 +0100135 default 256 if COREBOOT_ROMSIZE_KB_256
136 default 512 if COREBOOT_ROMSIZE_KB_512
137 default 1024 if COREBOOT_ROMSIZE_KB_1024
138 default 2048 if COREBOOT_ROMSIZE_KB_2048
139 default 4096 if COREBOOT_ROMSIZE_KB_4096
140 default 5120 if COREBOOT_ROMSIZE_KB_5120
141 default 6144 if COREBOOT_ROMSIZE_KB_6144
142 default 8192 if COREBOOT_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200143 default 10240 if COREBOOT_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100144 default 12288 if COREBOOT_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000145 default 16384 if COREBOOT_ROMSIZE_KB_16384
Lee Leahy67358712016-06-08 12:47:07 -0700146 default 32768 if COREBOOT_ROMSIZE_KB_32768
147 default 65536 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi0588d192009-08-12 15:00:51 +0000148
Uwe Hermann168b11b2009-10-07 16:15:40 +0000149# Map the config names to a hex value (bytes).
Patrick Georgi88f55b22009-09-25 18:43:02 +0000150config ROM_SIZE
151 hex
Angel Pons3e576732020-03-01 13:28:36 +0100152 default 0x00040000 if COREBOOT_ROMSIZE_KB_256
153 default 0x00080000 if COREBOOT_ROMSIZE_KB_512
154 default 0x00100000 if COREBOOT_ROMSIZE_KB_1024
155 default 0x00200000 if COREBOOT_ROMSIZE_KB_2048
156 default 0x00400000 if COREBOOT_ROMSIZE_KB_4096
157 default 0x00500000 if COREBOOT_ROMSIZE_KB_5120
158 default 0x00600000 if COREBOOT_ROMSIZE_KB_6144
159 default 0x00800000 if COREBOOT_ROMSIZE_KB_8192
160 default 0x00a00000 if COREBOOT_ROMSIZE_KB_10240
161 default 0x00c00000 if COREBOOT_ROMSIZE_KB_12288
162 default 0x01000000 if COREBOOT_ROMSIZE_KB_16384
163 default 0x02000000 if COREBOOT_ROMSIZE_KB_32768
164 default 0x04000000 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi88f55b22009-09-25 18:43:02 +0000165
Peter Stuge51eafde2010-10-13 06:23:02 +0000166config ENABLE_POWER_BUTTON
167 bool "Enable the power button" if POWER_BUTTON_IS_OPTIONAL
168 default y if POWER_BUTTON_DEFAULT_ENABLE
169 default n if POWER_BUTTON_DEFAULT_DISABLE
170 help
171 The selected mainboard can optionally have the power button tied
172 to ground with a jumper so that the button appears to be
173 constantly depressed. If this option is enabled and the jumper is
174 installed then the board will turn on, but turn off again after a
175 short timeout, usually 4 seconds.
176
177 Select Y here if you have removed the jumper and want to use an
178 actual power button. Select N if you have the jumper installed.
179
180config ENABLE_POWER_BUTTON
181 def_bool y if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_ENABLE
182 def_bool n if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_DISABLE
Nico Huber9faae2b2018-11-14 00:00:35 +0100183
184config HAVE_POWER_STATE_AFTER_FAILURE
185 bool
186
187if HAVE_POWER_STATE_AFTER_FAILURE
188
189config HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
190 bool
191
192config POWER_STATE_DEFAULT_ON_AFTER_FAILURE
193 bool
194 help
195 Selected by platforms or mainboards that want a "default on"
196 behaviour.
197
198choice
199 prompt "System Power State after Failure"
200 default POWER_STATE_ON_AFTER_FAILURE \
201 if POWER_STATE_DEFAULT_ON_AFTER_FAILURE
202 default POWER_STATE_OFF_AFTER_FAILURE
203 help
204 Provides a default for the power state the system should
205 go into after G3 (power loss). On many boards this can be
206 overridden by an NVRAM option.
207
208config POWER_STATE_OFF_AFTER_FAILURE
209 bool "S5 Soft Off"
210 help
211 Choose this option if you want to put system into
212 S5 after reapplying power after failure.
213
214config POWER_STATE_ON_AFTER_FAILURE
215 bool "S0 Full On"
216 help
217 Choose this option if you want to keep system in
218 S0 after reapplying power after failure.
219
220config POWER_STATE_PREVIOUS_AFTER_FAILURE
221 bool "Keep Previous State"
222 depends on HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
223 help
224 Choose this option if you want to keep system in the
225 same power state as before failure after reapplying
226 power.
227
228endchoice
229
230config MAINBOARD_POWER_FAILURE_STATE
231 int
232 default 2 if POWER_STATE_PREVIOUS_AFTER_FAILURE
233 default 1 if POWER_STATE_ON_AFTER_FAILURE
234 default 0
235
236endif # HAVE_POWER_STATE_AFTER_FAILURE