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 | 9cddae1 | 2021-07-23 11:01:50 +0200 | [diff] [blame] | 13 | config MAINBOARD_DIR |
| 14 | string |
| 15 | |
Angel Pons | 2c03ffc | 2021-07-23 11:11:02 +0200 | [diff] [blame] | 16 | config MAINBOARD_PART_NUMBER |
Sam McNally | 1347571 | 2022-10-17 14:57:43 +1100 | [diff] [blame] | 17 | string "Mainboard part number" |
Angel Pons | 2c03ffc | 2021-07-23 11:11:02 +0200 | [diff] [blame] | 18 | |
Angel Pons | 7671bce | 2020-03-01 13:07:19 +0100 | [diff] [blame] | 19 | config MAINBOARD_VENDOR |
| 20 | string "Mainboard vendor name" |
| 21 | |
Angel Pons | ee3d09b | 2021-07-23 11:44:04 +0200 | [diff] [blame] | 22 | config VARIANT_DIR |
| 23 | string |
| 24 | |
Uwe Hermann | d65509d | 2009-10-16 17:37:20 +0000 | [diff] [blame] | 25 | config BOARD_ROMSIZE_KB_256 |
| 26 | bool |
| 27 | config BOARD_ROMSIZE_KB_512 |
| 28 | bool |
| 29 | config BOARD_ROMSIZE_KB_1024 |
| 30 | bool |
| 31 | config BOARD_ROMSIZE_KB_2048 |
| 32 | bool |
| 33 | config BOARD_ROMSIZE_KB_4096 |
| 34 | bool |
Angel Pons | 50a4454 | 2019-12-14 16:16:31 +0100 | [diff] [blame] | 35 | config BOARD_ROMSIZE_KB_5120 |
| 36 | bool |
Kacper Słomiński | 0d4f95b | 2019-01-17 22:36:32 +0100 | [diff] [blame] | 37 | config BOARD_ROMSIZE_KB_6144 |
| 38 | bool |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 39 | config BOARD_ROMSIZE_KB_8192 |
| 40 | bool |
Jonathan Neuschäfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 41 | config BOARD_ROMSIZE_KB_10240 |
| 42 | bool |
Vladimir Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 43 | config BOARD_ROMSIZE_KB_12288 |
| 44 | bool |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 45 | config BOARD_ROMSIZE_KB_16384 |
| 46 | bool |
Maciej Pijanowski | 71981cc | 2024-01-18 22:36:06 +0100 | [diff] [blame] | 47 | config BOARD_ROMSIZE_KB_24576 |
| 48 | bool |
Lee Leahy | 6735871 | 2016-06-08 12:47:07 -0700 | [diff] [blame] | 49 | config BOARD_ROMSIZE_KB_32768 |
| 50 | bool |
| 51 | config BOARD_ROMSIZE_KB_65536 |
| 52 | bool |
Uwe Hermann | d65509d | 2009-10-16 17:37:20 +0000 | [diff] [blame] | 53 | |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 54 | # TODO: No help text possible for choice fields? |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 55 | choice |
| 56 | prompt "ROM chip size" |
Angel Pons | 3e57673 | 2020-03-01 13:28:36 +0100 | [diff] [blame] | 57 | default COREBOOT_ROMSIZE_KB_256 if BOARD_ROMSIZE_KB_256 |
| 58 | default COREBOOT_ROMSIZE_KB_512 if BOARD_ROMSIZE_KB_512 |
| 59 | default COREBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024 |
| 60 | default COREBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048 |
| 61 | default COREBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096 |
| 62 | default COREBOOT_ROMSIZE_KB_5120 if BOARD_ROMSIZE_KB_5120 |
| 63 | default COREBOOT_ROMSIZE_KB_6144 if BOARD_ROMSIZE_KB_6144 |
| 64 | default COREBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192 |
Jonathan Neuschäfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 65 | default COREBOOT_ROMSIZE_KB_10240 if BOARD_ROMSIZE_KB_10240 |
Vladimir Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 66 | 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] | 67 | default COREBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384 |
Maciej Pijanowski | 71981cc | 2024-01-18 22:36:06 +0100 | [diff] [blame] | 68 | default COREBOOT_ROMSIZE_KB_24576 if BOARD_ROMSIZE_KB_24576 |
Lee Leahy | 6735871 | 2016-06-08 12:47:07 -0700 | [diff] [blame] | 69 | default COREBOOT_ROMSIZE_KB_32768 if BOARD_ROMSIZE_KB_32768 |
| 70 | default COREBOOT_ROMSIZE_KB_65536 if BOARD_ROMSIZE_KB_65536 |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 71 | help |
| 72 | Select the size of the ROM chip you intend to flash coreboot on. |
| 73 | |
| 74 | The build system will take care of creating a coreboot.rom file |
| 75 | of the matching size. |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 76 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 77 | config COREBOOT_ROMSIZE_KB_256 |
| 78 | bool "256 KB" |
| 79 | help |
| 80 | Choose this option if you have a 256 KB ROM chip. |
| 81 | |
| 82 | config COREBOOT_ROMSIZE_KB_512 |
| 83 | bool "512 KB" |
| 84 | help |
| 85 | Choose this option if you have a 512 KB ROM chip. |
| 86 | |
| 87 | config COREBOOT_ROMSIZE_KB_1024 |
| 88 | bool "1024 KB (1 MB)" |
| 89 | help |
| 90 | Choose this option if you have a 1024 KB (1 MB) ROM chip. |
| 91 | |
| 92 | config COREBOOT_ROMSIZE_KB_2048 |
| 93 | bool "2048 KB (2 MB)" |
| 94 | help |
| 95 | Choose this option if you have a 2048 KB (2 MB) ROM chip. |
| 96 | |
Cristi Magherusan | 7e92ff3 | 2009-08-17 14:33:03 +0000 | [diff] [blame] | 97 | config COREBOOT_ROMSIZE_KB_4096 |
| 98 | bool "4096 KB (4 MB)" |
| 99 | help |
| 100 | Choose this option if you have a 4096 KB (4 MB) ROM chip. |
| 101 | |
Angel Pons | 50a4454 | 2019-12-14 16:16:31 +0100 | [diff] [blame] | 102 | config COREBOOT_ROMSIZE_KB_5120 |
| 103 | bool "5120 KB (5 MB)" |
| 104 | help |
| 105 | Choose this option if you have a 5120 KB (5 MB) ROM chip. |
| 106 | |
Kacper Słomiński | 0d4f95b | 2019-01-17 22:36:32 +0100 | [diff] [blame] | 107 | config COREBOOT_ROMSIZE_KB_6144 |
| 108 | bool "6144 KB (6 MB)" |
| 109 | help |
| 110 | Choose this option if you have a 6144 KB (6 MB) ROM chip. |
| 111 | |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 112 | config COREBOOT_ROMSIZE_KB_8192 |
| 113 | bool "8192 KB (8 MB)" |
| 114 | help |
| 115 | Choose this option if you have a 8192 KB (8 MB) ROM chip. |
| 116 | |
Jonathan Neuschäfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 117 | config COREBOOT_ROMSIZE_KB_10240 |
| 118 | bool "10240 KB (10 MB)" |
| 119 | help |
| 120 | Choose this option if you have a 10240 KB (10 MB) ROM chip. |
| 121 | |
Vladimir Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 122 | config COREBOOT_ROMSIZE_KB_12288 |
| 123 | bool "12288 KB (12 MB)" |
| 124 | help |
| 125 | Choose this option if you have a 12288 KB (12 MB) ROM chip. |
| 126 | |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 127 | config COREBOOT_ROMSIZE_KB_16384 |
| 128 | bool "16384 KB (16 MB)" |
| 129 | help |
| 130 | Choose this option if you have a 16384 KB (16 MB) ROM chip. |
| 131 | |
Maciej Pijanowski | 71981cc | 2024-01-18 22:36:06 +0100 | [diff] [blame] | 132 | config COREBOOT_ROMSIZE_KB_24576 |
| 133 | bool "24576 KB (24 MB)" |
| 134 | help |
| 135 | Choose this option if you have a 24576 KB (24 MB) ROM chip. |
| 136 | |
Lee Leahy | 6735871 | 2016-06-08 12:47:07 -0700 | [diff] [blame] | 137 | config COREBOOT_ROMSIZE_KB_32768 |
| 138 | bool "32768 KB (32 MB)" |
| 139 | help |
| 140 | Choose this option if you have a 32768 KB (32 MB) ROM chip. |
| 141 | |
| 142 | config COREBOOT_ROMSIZE_KB_65536 |
| 143 | bool "65536 KB (64 MB)" |
| 144 | help |
| 145 | Choose this option if you have a 65536 KB (64 MB) ROM chip. |
| 146 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 147 | endchoice |
| 148 | |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 149 | # Map the config names to an integer (KB). |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 150 | config COREBOOT_ROMSIZE_KB |
| 151 | int |
Angel Pons | 3e57673 | 2020-03-01 13:28:36 +0100 | [diff] [blame] | 152 | default 256 if COREBOOT_ROMSIZE_KB_256 |
| 153 | default 512 if COREBOOT_ROMSIZE_KB_512 |
| 154 | default 1024 if COREBOOT_ROMSIZE_KB_1024 |
| 155 | default 2048 if COREBOOT_ROMSIZE_KB_2048 |
| 156 | default 4096 if COREBOOT_ROMSIZE_KB_4096 |
| 157 | default 5120 if COREBOOT_ROMSIZE_KB_5120 |
| 158 | default 6144 if COREBOOT_ROMSIZE_KB_6144 |
| 159 | default 8192 if COREBOOT_ROMSIZE_KB_8192 |
Jonathan Neuschäfer | d61c670 | 2017-10-03 20:59:10 +0200 | [diff] [blame] | 160 | default 10240 if COREBOOT_ROMSIZE_KB_10240 |
Vladimir Serbinenko | 01d06dc | 2014-01-15 15:52:31 +0100 | [diff] [blame] | 161 | default 12288 if COREBOOT_ROMSIZE_KB_12288 |
Cristian Măgherușan-Stanciu | 46b033e | 2011-06-19 21:07:20 +0000 | [diff] [blame] | 162 | default 16384 if COREBOOT_ROMSIZE_KB_16384 |
Maciej Pijanowski | 71981cc | 2024-01-18 22:36:06 +0100 | [diff] [blame] | 163 | default 24576 if COREBOOT_ROMSIZE_KB_24576 |
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 0x00040000 if COREBOOT_ROMSIZE_KB_256 |
| 171 | default 0x00080000 if COREBOOT_ROMSIZE_KB_512 |
| 172 | default 0x00100000 if COREBOOT_ROMSIZE_KB_1024 |
| 173 | default 0x00200000 if COREBOOT_ROMSIZE_KB_2048 |
| 174 | default 0x00400000 if COREBOOT_ROMSIZE_KB_4096 |
| 175 | default 0x00500000 if COREBOOT_ROMSIZE_KB_5120 |
| 176 | default 0x00600000 if COREBOOT_ROMSIZE_KB_6144 |
| 177 | default 0x00800000 if COREBOOT_ROMSIZE_KB_8192 |
| 178 | default 0x00a00000 if COREBOOT_ROMSIZE_KB_10240 |
| 179 | default 0x00c00000 if COREBOOT_ROMSIZE_KB_12288 |
| 180 | default 0x01000000 if COREBOOT_ROMSIZE_KB_16384 |
Maciej Pijanowski | 71981cc | 2024-01-18 22:36:06 +0100 | [diff] [blame] | 181 | default 0x01800000 if COREBOOT_ROMSIZE_KB_24576 |
Angel Pons | 3e57673 | 2020-03-01 13:28:36 +0100 | [diff] [blame] | 182 | default 0x02000000 if COREBOOT_ROMSIZE_KB_32768 |
| 183 | default 0x04000000 if COREBOOT_ROMSIZE_KB_65536 |
Patrick Georgi | 88f55b2 | 2009-09-25 18:43:02 +0000 | [diff] [blame] | 184 | |
Peter Stuge | 51eafde | 2010-10-13 06:23:02 +0000 | [diff] [blame] | 185 | config ENABLE_POWER_BUTTON |
| 186 | bool "Enable the power button" if POWER_BUTTON_IS_OPTIONAL |
| 187 | default y if POWER_BUTTON_DEFAULT_ENABLE |
| 188 | default n if POWER_BUTTON_DEFAULT_DISABLE |
| 189 | help |
| 190 | The selected mainboard can optionally have the power button tied |
| 191 | to ground with a jumper so that the button appears to be |
| 192 | constantly depressed. If this option is enabled and the jumper is |
| 193 | installed then the board will turn on, but turn off again after a |
| 194 | short timeout, usually 4 seconds. |
| 195 | |
| 196 | Select Y here if you have removed the jumper and want to use an |
| 197 | actual power button. Select N if you have the jumper installed. |
| 198 | |
| 199 | config ENABLE_POWER_BUTTON |
| 200 | def_bool y if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_ENABLE |
| 201 | def_bool n if !POWER_BUTTON_IS_OPTIONAL && POWER_BUTTON_FORCE_DISABLE |
Nico Huber | 9faae2b | 2018-11-14 00:00:35 +0100 | [diff] [blame] | 202 | |
| 203 | config HAVE_POWER_STATE_AFTER_FAILURE |
| 204 | bool |
| 205 | |
| 206 | if HAVE_POWER_STATE_AFTER_FAILURE |
| 207 | |
| 208 | config HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE |
| 209 | bool |
| 210 | |
| 211 | config POWER_STATE_DEFAULT_ON_AFTER_FAILURE |
| 212 | bool |
| 213 | help |
| 214 | Selected by platforms or mainboards that want a "default on" |
| 215 | behaviour. |
| 216 | |
| 217 | choice |
| 218 | prompt "System Power State after Failure" |
| 219 | default POWER_STATE_ON_AFTER_FAILURE \ |
| 220 | if POWER_STATE_DEFAULT_ON_AFTER_FAILURE |
| 221 | default POWER_STATE_OFF_AFTER_FAILURE |
| 222 | help |
| 223 | Provides a default for the power state the system should |
| 224 | go into after G3 (power loss). On many boards this can be |
| 225 | overridden by an NVRAM option. |
| 226 | |
| 227 | config POWER_STATE_OFF_AFTER_FAILURE |
| 228 | bool "S5 Soft Off" |
| 229 | help |
| 230 | Choose this option if you want to put system into |
| 231 | S5 after reapplying power after failure. |
| 232 | |
| 233 | config POWER_STATE_ON_AFTER_FAILURE |
| 234 | bool "S0 Full On" |
| 235 | help |
| 236 | Choose this option if you want to keep system in |
| 237 | S0 after reapplying power after failure. |
| 238 | |
| 239 | config POWER_STATE_PREVIOUS_AFTER_FAILURE |
| 240 | bool "Keep Previous State" |
| 241 | depends on HAVE_POWER_STATE_PREVIOUS_AFTER_FAILURE |
| 242 | help |
| 243 | Choose this option if you want to keep system in the |
| 244 | same power state as before failure after reapplying |
| 245 | power. |
| 246 | |
| 247 | endchoice |
| 248 | |
| 249 | config MAINBOARD_POWER_FAILURE_STATE |
| 250 | int |
| 251 | default 2 if POWER_STATE_PREVIOUS_AFTER_FAILURE |
| 252 | default 1 if POWER_STATE_ON_AFTER_FAILURE |
| 253 | default 0 |
| 254 | |
| 255 | endif # HAVE_POWER_STATE_AFTER_FAILURE |