blob: 77fcba16e60a1316a13f34c3bdbb572b97ad6a02 [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
Rudolf Marekae012482012-03-25 19:19:03 +020016config BOARD_ROMSIZE_KB_64
17 bool
Uwe Hermannd65509d2009-10-16 17:37:20 +000018config BOARD_ROMSIZE_KB_128
19 bool
20config BOARD_ROMSIZE_KB_256
21 bool
22config BOARD_ROMSIZE_KB_512
23 bool
24config BOARD_ROMSIZE_KB_1024
25 bool
26config BOARD_ROMSIZE_KB_2048
27 bool
28config BOARD_ROMSIZE_KB_4096
29 bool
Angel Pons50a44542019-12-14 16:16:31 +010030config BOARD_ROMSIZE_KB_5120
31 bool
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +010032config BOARD_ROMSIZE_KB_6144
33 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000034config BOARD_ROMSIZE_KB_8192
35 bool
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020036config BOARD_ROMSIZE_KB_10240
37 bool
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010038config BOARD_ROMSIZE_KB_12288
39 bool
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000040config BOARD_ROMSIZE_KB_16384
41 bool
Lee Leahy67358712016-06-08 12:47:07 -070042config BOARD_ROMSIZE_KB_32768
43 bool
44config BOARD_ROMSIZE_KB_65536
45 bool
Uwe Hermannd65509d2009-10-16 17:37:20 +000046
Uwe Hermann168b11b2009-10-07 16:15:40 +000047# TODO: No help text possible for choice fields?
Patrick Georgi0588d192009-08-12 15:00:51 +000048choice
49 prompt "ROM chip size"
Angel Pons3e576732020-03-01 13:28:36 +010050 default COREBOOT_ROMSIZE_KB_64 if BOARD_ROMSIZE_KB_64
51 default COREBOOT_ROMSIZE_KB_128 if BOARD_ROMSIZE_KB_128
52 default COREBOOT_ROMSIZE_KB_256 if BOARD_ROMSIZE_KB_256
53 default COREBOOT_ROMSIZE_KB_512 if BOARD_ROMSIZE_KB_512
54 default COREBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024
55 default COREBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048
56 default COREBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096
57 default COREBOOT_ROMSIZE_KB_5120 if BOARD_ROMSIZE_KB_5120
58 default COREBOOT_ROMSIZE_KB_6144 if BOARD_ROMSIZE_KB_6144
59 default COREBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +020060 default COREBOOT_ROMSIZE_KB_10240 if BOARD_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +010061 default COREBOOT_ROMSIZE_KB_12288 if BOARD_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +000062 default COREBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384
Lee Leahy67358712016-06-08 12:47:07 -070063 default COREBOOT_ROMSIZE_KB_32768 if BOARD_ROMSIZE_KB_32768
64 default COREBOOT_ROMSIZE_KB_65536 if BOARD_ROMSIZE_KB_65536
Uwe Hermann168b11b2009-10-07 16:15:40 +000065 help
66 Select the size of the ROM chip you intend to flash coreboot on.
67
68 The build system will take care of creating a coreboot.rom file
69 of the matching size.
Patrick Georgi0588d192009-08-12 15:00:51 +000070
Rudolf Marekae012482012-03-25 19:19:03 +020071config COREBOOT_ROMSIZE_KB_64
72 bool "64 KB"
73 help
74 Choose this option if you have a 64 KB ROM chip.
75
Patrick Georgi0588d192009-08-12 15:00:51 +000076config COREBOOT_ROMSIZE_KB_128
77 bool "128 KB"
78 help
79 Choose this option if you have a 128 KB ROM chip.
80
81config COREBOOT_ROMSIZE_KB_256
82 bool "256 KB"
83 help
84 Choose this option if you have a 256 KB ROM chip.
85
86config COREBOOT_ROMSIZE_KB_512
87 bool "512 KB"
88 help
89 Choose this option if you have a 512 KB ROM chip.
90
91config COREBOOT_ROMSIZE_KB_1024
92 bool "1024 KB (1 MB)"
93 help
94 Choose this option if you have a 1024 KB (1 MB) ROM chip.
95
96config COREBOOT_ROMSIZE_KB_2048
97 bool "2048 KB (2 MB)"
98 help
99 Choose this option if you have a 2048 KB (2 MB) ROM chip.
100
Cristi Magherusan7e92ff32009-08-17 14:33:03 +0000101config COREBOOT_ROMSIZE_KB_4096
102 bool "4096 KB (4 MB)"
103 help
104 Choose this option if you have a 4096 KB (4 MB) ROM chip.
105
Angel Pons50a44542019-12-14 16:16:31 +0100106config COREBOOT_ROMSIZE_KB_5120
107 bool "5120 KB (5 MB)"
108 help
109 Choose this option if you have a 5120 KB (5 MB) ROM chip.
110
Kacper Słomiński0d4f95b2019-01-17 22:36:32 +0100111config COREBOOT_ROMSIZE_KB_6144
112 bool "6144 KB (6 MB)"
113 help
114 Choose this option if you have a 6144 KB (6 MB) ROM chip.
115
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000116config COREBOOT_ROMSIZE_KB_8192
117 bool "8192 KB (8 MB)"
118 help
119 Choose this option if you have a 8192 KB (8 MB) ROM chip.
120
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200121config COREBOOT_ROMSIZE_KB_10240
122 bool "10240 KB (10 MB)"
123 help
124 Choose this option if you have a 10240 KB (10 MB) ROM chip.
125
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100126config COREBOOT_ROMSIZE_KB_12288
127 bool "12288 KB (12 MB)"
128 help
129 Choose this option if you have a 12288 KB (12 MB) ROM chip.
130
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000131config COREBOOT_ROMSIZE_KB_16384
132 bool "16384 KB (16 MB)"
133 help
134 Choose this option if you have a 16384 KB (16 MB) ROM chip.
135
Lee Leahy67358712016-06-08 12:47:07 -0700136config COREBOOT_ROMSIZE_KB_32768
137 bool "32768 KB (32 MB)"
138 help
139 Choose this option if you have a 32768 KB (32 MB) ROM chip.
140
141config COREBOOT_ROMSIZE_KB_65536
142 bool "65536 KB (64 MB)"
143 help
144 Choose this option if you have a 65536 KB (64 MB) ROM chip.
145
Patrick Georgi0588d192009-08-12 15:00:51 +0000146endchoice
147
Uwe Hermann168b11b2009-10-07 16:15:40 +0000148# Map the config names to an integer (KB).
Patrick Georgi0588d192009-08-12 15:00:51 +0000149config COREBOOT_ROMSIZE_KB
150 int
Angel Pons3e576732020-03-01 13:28:36 +0100151 default 64 if COREBOOT_ROMSIZE_KB_64
152 default 128 if COREBOOT_ROMSIZE_KB_128
153 default 256 if COREBOOT_ROMSIZE_KB_256
154 default 512 if COREBOOT_ROMSIZE_KB_512
155 default 1024 if COREBOOT_ROMSIZE_KB_1024
156 default 2048 if COREBOOT_ROMSIZE_KB_2048
157 default 4096 if COREBOOT_ROMSIZE_KB_4096
158 default 5120 if COREBOOT_ROMSIZE_KB_5120
159 default 6144 if COREBOOT_ROMSIZE_KB_6144
160 default 8192 if COREBOOT_ROMSIZE_KB_8192
Jonathan Neuschäferd61c6702017-10-03 20:59:10 +0200161 default 10240 if COREBOOT_ROMSIZE_KB_10240
Vladimir Serbinenko01d06dc2014-01-15 15:52:31 +0100162 default 12288 if COREBOOT_ROMSIZE_KB_12288
Cristian Măgherușan-Stanciu46b033e2011-06-19 21:07:20 +0000163 default 16384 if COREBOOT_ROMSIZE_KB_16384
Lee Leahy67358712016-06-08 12:47:07 -0700164 default 32768 if COREBOOT_ROMSIZE_KB_32768
165 default 65536 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi0588d192009-08-12 15:00:51 +0000166
Uwe Hermann168b11b2009-10-07 16:15:40 +0000167# Map the config names to a hex value (bytes).
Patrick Georgi88f55b22009-09-25 18:43:02 +0000168config ROM_SIZE
169 hex
Angel Pons3e576732020-03-01 13:28:36 +0100170 default 0x00010000 if COREBOOT_ROMSIZE_KB_64
171 default 0x00020000 if COREBOOT_ROMSIZE_KB_128
172 default 0x00040000 if COREBOOT_ROMSIZE_KB_256
173 default 0x00080000 if COREBOOT_ROMSIZE_KB_512
174 default 0x00100000 if COREBOOT_ROMSIZE_KB_1024
175 default 0x00200000 if COREBOOT_ROMSIZE_KB_2048
176 default 0x00400000 if COREBOOT_ROMSIZE_KB_4096
177 default 0x00500000 if COREBOOT_ROMSIZE_KB_5120
178 default 0x00600000 if COREBOOT_ROMSIZE_KB_6144
179 default 0x00800000 if COREBOOT_ROMSIZE_KB_8192
180 default 0x00a00000 if COREBOOT_ROMSIZE_KB_10240
181 default 0x00c00000 if COREBOOT_ROMSIZE_KB_12288
182 default 0x01000000 if COREBOOT_ROMSIZE_KB_16384
183 default 0x02000000 if COREBOOT_ROMSIZE_KB_32768
184 default 0x04000000 if COREBOOT_ROMSIZE_KB_65536
Patrick Georgi88f55b22009-09-25 18:43:02 +0000185
Peter Stuge51eafde2010-10-13 06:23:02 +0000186config ENABLE_POWER_BUTTON
187 bool "Enable the power button" if POWER_BUTTON_IS_OPTIONAL
188 default y if POWER_BUTTON_DEFAULT_ENABLE
189 default n if POWER_BUTTON_DEFAULT_DISABLE
190 help
191 The selected mainboard can optionally have the power button tied
192 to ground with a jumper so that the button appears to be
193 constantly depressed. If this option is enabled and the jumper is
194 installed then the board will turn on, but turn off again after a
195 short timeout, usually 4 seconds.
196
197 Select Y here if you have removed the jumper and want to use an
198 actual power button. Select N if you have the jumper installed.
199
200config ENABLE_POWER_BUTTON
201 def_bool y if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_ENABLE
202 def_bool n if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_DISABLE
Nico Huber9faae2b2018-11-14 00:00:35 +0100203
204config HAVE_POWER_STATE_AFTER_FAILURE
205 bool
206
207if HAVE_POWER_STATE_AFTER_FAILURE
208
209config HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
210 bool
211
212config POWER_STATE_DEFAULT_ON_AFTER_FAILURE
213 bool
214 help
215 Selected by platforms or mainboards that want a "default on"
216 behaviour.
217
218choice
219 prompt "System Power State after Failure"
220 default POWER_STATE_ON_AFTER_FAILURE \
221 if POWER_STATE_DEFAULT_ON_AFTER_FAILURE
222 default POWER_STATE_OFF_AFTER_FAILURE
223 help
224 Provides a default for the power state the system should
225 go into after G3 (power loss). On many boards this can be
226 overridden by an NVRAM option.
227
228config POWER_STATE_OFF_AFTER_FAILURE
229 bool "S5 Soft Off"
230 help
231 Choose this option if you want to put system into
232 S5 after reapplying power after failure.
233
234config POWER_STATE_ON_AFTER_FAILURE
235 bool "S0 Full On"
236 help
237 Choose this option if you want to keep system in
238 S0 after reapplying power after failure.
239
240config POWER_STATE_PREVIOUS_AFTER_FAILURE
241 bool "Keep Previous State"
242 depends on HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE
243 help
244 Choose this option if you want to keep system in the
245 same power state as before failure after reapplying
246 power.
247
248endchoice
249
250config MAINBOARD_POWER_FAILURE_STATE
251 int
252 default 2 if POWER_STATE_PREVIOUS_AFTER_FAILURE
253 default 1 if POWER_STATE_ON_AFTER_FAILURE
254 default 0
255
256endif # HAVE_POWER_STATE_AFTER_FAILURE