Martin Roth | f3e2679 | 2016-12-22 10:21:11 -0700 | [diff] [blame] | 1 | comment "Important: Run 'make distclean' before switching boards" |
| 2 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 3 | choice |
| 4 | prompt "Mainboard vendor" |
| 5 | default VENDOR_EMULATION |
| 6 | |
Stefan Reinauer | 139e106 | 2015-04-03 20:11:13 +0200 | [diff] [blame] | 7 | source "src/mainboard/*/Kconfig.name" |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 8 | |
| 9 | endchoice |
| 10 | |
Stefan Reinauer | 139e106 | 2015-04-03 20:11:13 +0200 | [diff] [blame] | 11 | source "src/mainboard/*/Kconfig" |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 12 | |
Angel Pons | 7671bce | 2020-03-01 13:07:19 +0100 | [diff] [blame] | 13 | config MAINBOARD_VENDOR |
| 14 | string "Mainboard vendor name" |
| 15 | |
Rudolf Marek | ae012486 | 2012-03-25 19:19:03 +0200 | [diff] [blame] | 16 | config BOARD_ROMSIZE_KB_64 |
| 17 | bool |
Uwe Hermann | d65509d | 2009-10-16 17:37:20 +0000 | [diff] [blame] | 18 | config BOARD_ROMSIZE_KB_128 |
| 19 | bool |
| 20 | config BOARD_ROMSIZE_KB_256 |
| 21 | bool |
| 22 | config BOARD_ROMSIZE_KB_512 |
| 23 | bool |
| 24 | config BOARD_ROMSIZE_KB_1024 |
| 25 | bool |
| 26 | config BOARD_ROMSIZE_KB_2048 |
| 27 | bool |
| 28 | config BOARD_ROMSIZE_KB_4096 |
| 29 | bool |
Angel Pons | 50a4454 | 2019-12-14 16:16:31 +0100 | [diff] [blame] | 30 | config BOARD_ROMSIZE_KB_5120 |
| 31 | bool |
Kacper Słomiński | 0d4f95b | 2019-01-17 22:36:32 +0100 | [diff] [blame] | 32 | config BOARD_ROMSIZE_KB_6144 |
| 33 | bool |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 34 | config BOARD_ROMSIZE_KB_8192 |
| 35 | bool |
Jonathan Neuschäfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 36 | config BOARD_ROMSIZE_KB_10240 |
| 37 | bool |
Vladimir Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 38 | config BOARD_ROMSIZE_KB_12288 |
| 39 | bool |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 40 | config BOARD_ROMSIZE_KB_16384 |
| 41 | bool |
Lee Leahy | 6735871 | 2016-06-08 12:47:07 -0700 | [diff] [blame] | 42 | config BOARD_ROMSIZE_KB_32768 |
| 43 | bool |
| 44 | config BOARD_ROMSIZE_KB_65536 |
| 45 | bool |
Uwe Hermann | d65509d | 2009-10-16 17:37:20 +0000 | [diff] [blame] | 46 | |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 47 | # TODO: No help text possible for choice fields? |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 48 | choice |
| 49 | prompt "ROM chip size" |
Angel Pons | 3e57673 | 2020-03-01 13:28:36 +0100 | [diff] [blame] | 50 | 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äfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 60 | default COREBOOT_ROMSIZE_KB_10240 if BOARD_ROMSIZE_KB_10240 |
Vladimir Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 61 | default COREBOOT_ROMSIZE_KB_12288 if BOARD_ROMSIZE_KB_12288 |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 62 | default COREBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384 |
Lee Leahy | 6735871 | 2016-06-08 12:47:07 -0700 | [diff] [blame] | 63 | default COREBOOT_ROMSIZE_KB_32768 if BOARD_ROMSIZE_KB_32768 |
| 64 | default COREBOOT_ROMSIZE_KB_65536 if BOARD_ROMSIZE_KB_65536 |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 65 | 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 Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 70 | |
Rudolf Marek | ae012486 | 2012-03-25 19:19:03 +0200 | [diff] [blame] | 71 | config COREBOOT_ROMSIZE_KB_64 |
| 72 | bool "64 KB" |
| 73 | help |
| 74 | Choose this option if you have a 64 KB ROM chip. |
| 75 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 76 | config COREBOOT_ROMSIZE_KB_128 |
| 77 | bool "128 KB" |
| 78 | help |
| 79 | Choose this option if you have a 128 KB ROM chip. |
| 80 | |
| 81 | config COREBOOT_ROMSIZE_KB_256 |
| 82 | bool "256 KB" |
| 83 | help |
| 84 | Choose this option if you have a 256 KB ROM chip. |
| 85 | |
| 86 | config COREBOOT_ROMSIZE_KB_512 |
| 87 | bool "512 KB" |
| 88 | help |
| 89 | Choose this option if you have a 512 KB ROM chip. |
| 90 | |
| 91 | config 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 | |
| 96 | config 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 Magherusan | 7e92ff3 | 2009-08-17 14:33:03 +0000 | [diff] [blame] | 101 | config 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 Pons | 50a4454 | 2019-12-14 16:16:31 +0100 | [diff] [blame] | 106 | config 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ński | 0d4f95b | 2019-01-17 22:36:32 +0100 | [diff] [blame] | 111 | config 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-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 116 | config 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äfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 121 | config 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 Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 126 | config 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-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 131 | config 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 Leahy | 6735871 | 2016-06-08 12:47:07 -0700 | [diff] [blame] | 136 | config 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 | |
| 141 | config 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 Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 146 | endchoice |
| 147 | |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 148 | # Map the config names to an integer (KB). |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 149 | config COREBOOT_ROMSIZE_KB |
| 150 | int |
Angel Pons | 3e57673 | 2020-03-01 13:28:36 +0100 | [diff] [blame] | 151 | 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äfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 161 | default 10240 if COREBOOT_ROMSIZE_KB_10240 |
Vladimir Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 162 | default 12288 if COREBOOT_ROMSIZE_KB_12288 |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 163 | default 16384 if COREBOOT_ROMSIZE_KB_16384 |
Lee Leahy | 6735871 | 2016-06-08 12:47:07 -0700 | [diff] [blame] | 164 | default 32768 if COREBOOT_ROMSIZE_KB_32768 |
| 165 | default 65536 if COREBOOT_ROMSIZE_KB_65536 |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 166 | |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 167 | # Map the config names to a hex value (bytes). |
Patrick Georgi | 88f55b2 | 2009-09-25 18:43:02 +0000 | [diff] [blame] | 168 | config ROM_SIZE |
| 169 | hex |
Angel Pons | 3e57673 | 2020-03-01 13:28:36 +0100 | [diff] [blame] | 170 | 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 Georgi | 88f55b2 | 2009-09-25 18:43:02 +0000 | [diff] [blame] | 185 | |
Peter Stuge | 51eafde | 2010-10-13 06:23:02 +0000 | [diff] [blame] | 186 | config 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 | |
| 200 | config 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 Huber | 9faae2b | 2018-11-14 00:00:35 +0100 | [diff] [blame] | 203 | |
| 204 | config HAVE_POWER_STATE_AFTER_FAILURE |
| 205 | bool |
| 206 | |
| 207 | if HAVE_POWER_STATE_AFTER_FAILURE |
| 208 | |
| 209 | config HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE |
| 210 | bool |
| 211 | |
| 212 | config POWER_STATE_DEFAULT_ON_AFTER_FAILURE |
| 213 | bool |
| 214 | help |
| 215 | Selected by platforms or mainboards that want a "default on" |
| 216 | behaviour. |
| 217 | |
| 218 | choice |
| 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 | |
| 228 | config 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 | |
| 234 | config 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 | |
| 240 | config 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 | |
| 248 | endchoice |
| 249 | |
| 250 | config 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 | |
| 256 | endif # HAVE_POWER_STATE_AFTER_FAILURE |