Stefan Reinauer | 1b34226 | 2011-01-05 02:27:53 +0000 | [diff] [blame] | 1 | menu "Console" |
Hung-Te Lin | ad173ea | 2013-02-06 21:24:12 +0800 | [diff] [blame] | 2 | |
Nico Huber | f86baf3 | 2019-01-15 00:05:46 +0100 | [diff] [blame] | 3 | config NO_BOOTBLOCK_CONSOLE |
| 4 | bool |
Arthur Heymans | a2bc254 | 2021-05-29 08:10:49 +0200 | [diff] [blame] | 5 | depends on SEPARATE_ROMSTAGE |
Nico Huber | f86baf3 | 2019-01-15 00:05:46 +0100 | [diff] [blame] | 6 | |
Gabe Black | fbb11cf | 2013-06-06 00:21:20 -0700 | [diff] [blame] | 7 | config BOOTBLOCK_CONSOLE |
| 8 | bool "Enable early (bootblock) console output." |
Arthur Heymans | 494b031 | 2019-11-28 16:22:06 +0100 | [diff] [blame] | 9 | depends on !NO_BOOTBLOCK_CONSOLE |
Nico Huber | 1d748c5 | 2019-01-13 13:14:04 +0100 | [diff] [blame] | 10 | default y |
Gabe Black | fbb11cf | 2013-06-06 00:21:20 -0700 | [diff] [blame] | 11 | help |
| 12 | Use console during the bootblock if supported |
| 13 | |
Lee Leahy | 049b462 | 2016-07-31 11:53:28 -0700 | [diff] [blame] | 14 | config POSTCAR_CONSOLE |
| 15 | bool "Enable console output during postcar." |
| 16 | depends on POSTCAR_STAGE |
Kyösti Mälkki | 9fc12e0 | 2019-08-09 07:09:48 +0300 | [diff] [blame] | 17 | default y |
Lee Leahy | 049b462 | 2016-07-31 11:53:28 -0700 | [diff] [blame] | 18 | help |
| 19 | Use console during the postcar if supported |
| 20 | |
Kyösti Mälkki | 361cd81 | 2013-08-12 23:29:57 +0300 | [diff] [blame] | 21 | config SQUELCH_EARLY_SMP |
| 22 | bool "Squelch AP CPUs from early console." |
| 23 | default y |
Lee Leahy | f2ad50f | 2016-02-08 16:19:56 -0800 | [diff] [blame] | 24 | depends on SMP |
Kyösti Mälkki | 361cd81 | 2013-08-12 23:29:57 +0300 | [diff] [blame] | 25 | help |
| 26 | When selected only the BSP CPU will output to early console. |
| 27 | |
| 28 | Console drivers have unpredictable behaviour if multiple threads |
| 29 | attempt to share the same resources without a spinlock. |
| 30 | |
| 31 | If unsure, say Y. |
| 32 | |
Hung-Te Lin | ad173ea | 2013-02-06 21:24:12 +0800 | [diff] [blame] | 33 | config CONSOLE_SERIAL |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 34 | bool "Serial port console output" |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 35 | default y |
Nico Huber | 755db95 | 2018-11-11 01:42:17 +0100 | [diff] [blame] | 36 | depends on DRIVERS_UART |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 37 | help |
Kyösti Mälkki | afa7b13 | 2014-02-13 17:16:22 +0200 | [diff] [blame] | 38 | Send coreboot debug output to a serial port. |
David Hendricks | 6a503b6 | 2012-12-31 17:28:43 -0800 | [diff] [blame] | 39 | |
Kyösti Mälkki | afa7b13 | 2014-02-13 17:16:22 +0200 | [diff] [blame] | 40 | The type of serial port driver selected based on your configuration is |
| 41 | shown on the following menu line. Supporting multiple different types |
| 42 | of UARTs in one build is not supported. |
Stefan Reinauer | 4885daa | 2011-04-26 23:47:04 +0000 | [diff] [blame] | 43 | |
Nico Huber | da8c12b | 2019-01-11 10:38:02 +0100 | [diff] [blame] | 44 | config FIXED_UART_FOR_CONSOLE |
| 45 | bool |
| 46 | help |
| 47 | Select to remove the prompt from UART_FOR_CONSOLE in case a |
| 48 | specific UART has to be used (e.g. when the platform code |
| 49 | performs dangerous configurations). |
| 50 | |
Raul E Rangel | 6ec3dd2 | 2022-01-21 13:34:21 -0700 | [diff] [blame] | 51 | if CONSOLE_SERIAL || CONSOLE_CBMEM_DUMP_TO_UART |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 52 | |
Kyösti Mälkki | afa7b13 | 2014-02-13 17:16:22 +0200 | [diff] [blame] | 53 | comment "I/O mapped, 8250-compatible" |
| 54 | depends on DRIVERS_UART_8250IO |
| 55 | |
| 56 | comment "memory mapped, 8250-compatible" |
| 57 | depends on DRIVERS_UART_8250MEM |
| 58 | |
| 59 | comment "device-specific UART" |
Hung-Te Lin | ad173ea | 2013-02-06 21:24:12 +0800 | [diff] [blame] | 60 | depends on HAVE_UART_SPECIAL |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 61 | |
Bryant Ou | 0ee920b | 2020-09-14 23:41:41 -0700 | [diff] [blame] | 62 | config OVERRIDE_UART_FOR_CONSOLE |
| 63 | bool |
| 64 | help |
| 65 | Set to "y" when the platform overrides the index of uart port by providing |
| 66 | a get_uart_for_console routine. |
| 67 | |
| 68 | if !OVERRIDE_UART_FOR_CONSOLE |
| 69 | |
Kyösti Mälkki | 70342a7 | 2014-03-14 22:28:29 +0200 | [diff] [blame] | 70 | config UART_FOR_CONSOLE |
Nico Huber | a96e66a | 2018-11-11 02:51:14 +0100 | [diff] [blame] | 71 | int |
| 72 | prompt "Index for UART port to use for console" if !FIXED_UART_FOR_CONSOLE |
Kyösti Mälkki | 70342a7 | 2014-03-14 22:28:29 +0200 | [diff] [blame] | 73 | default 0 |
Martin Roth | ac76ed9 | 2015-11-19 11:40:43 -0700 | [diff] [blame] | 74 | help |
| 75 | Select an I/O port to use for serial console: |
| 76 | 0 = 0x3f8, 1 = 0x2f8, 2 = 0x3e8, 3 = 0x2e8 |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 77 | |
Kyösti Mälkki | 70342a7 | 2014-03-14 22:28:29 +0200 | [diff] [blame] | 78 | # FIXME: Early programming in romstage is incorrect as we should |
| 79 | # program different LDN to actually change the physical port. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 80 | config TTYS0_BASE |
| 81 | hex |
Gabe Black | 77ffa0d | 2013-09-30 21:25:49 -0700 | [diff] [blame] | 82 | depends on DRIVERS_UART |
Kyösti Mälkki | 70342a7 | 2014-03-14 22:28:29 +0200 | [diff] [blame] | 83 | default 0x3f8 if UART_FOR_CONSOLE = 0 |
| 84 | default 0x2f8 if UART_FOR_CONSOLE = 1 |
| 85 | default 0x3e8 if UART_FOR_CONSOLE = 2 |
| 86 | default 0x2e8 if UART_FOR_CONSOLE = 3 |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 87 | help |
Kyösti Mälkki | 70342a7 | 2014-03-14 22:28:29 +0200 | [diff] [blame] | 88 | Map the COM port number to the respective I/O port. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 89 | |
Martin Roth | ac76ed9 | 2015-11-19 11:40:43 -0700 | [diff] [blame] | 90 | comment "Serial port base address = 0x3f8" |
Martin Roth | 3c2e287 | 2019-07-11 12:54:12 -0600 | [diff] [blame] | 91 | depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 0 |
Martin Roth | ac76ed9 | 2015-11-19 11:40:43 -0700 | [diff] [blame] | 92 | comment "Serial port base address = 0x2f8" |
Martin Roth | 3c2e287 | 2019-07-11 12:54:12 -0600 | [diff] [blame] | 93 | depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 1 |
Martin Roth | ac76ed9 | 2015-11-19 11:40:43 -0700 | [diff] [blame] | 94 | comment "Serial port base address = 0x3e8" |
Martin Roth | 3c2e287 | 2019-07-11 12:54:12 -0600 | [diff] [blame] | 95 | depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 2 |
Martin Roth | ac76ed9 | 2015-11-19 11:40:43 -0700 | [diff] [blame] | 96 | comment "Serial port base address = 0x2e8" |
Martin Roth | 3c2e287 | 2019-07-11 12:54:12 -0600 | [diff] [blame] | 97 | depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 3 |
Martin Roth | ac76ed9 | 2015-11-19 11:40:43 -0700 | [diff] [blame] | 98 | |
Bryant Ou | 0ee920b | 2020-09-14 23:41:41 -0700 | [diff] [blame] | 99 | endif |
| 100 | |
Julien Viard de Galbert | 235daa4 | 2018-02-20 11:45:48 +0100 | [diff] [blame] | 101 | config UART_OVERRIDE_BAUDRATE |
Patrick Georgi | 0bb8346 | 2019-11-22 20:58:58 +0100 | [diff] [blame] | 102 | bool |
Julien Viard de Galbert | 235daa4 | 2018-02-20 11:45:48 +0100 | [diff] [blame] | 103 | help |
| 104 | Set to "y" when the platform overrides the baudrate by providing |
| 105 | a get_uart_baudrate routine. |
| 106 | |
| 107 | if !UART_OVERRIDE_BAUDRATE |
| 108 | |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 109 | choice |
Uwe Hermann | a081a3b | 2009-10-26 23:52:34 +0000 | [diff] [blame] | 110 | prompt "Baud rate" |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 111 | default CONSOLE_SERIAL_115200 |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 112 | |
Lee Leahy | cda71b8 | 2016-02-20 05:39:10 -0800 | [diff] [blame] | 113 | config CONSOLE_SERIAL_921600 |
| 114 | bool "921600" |
| 115 | help |
| 116 | Set serial port Baud rate to 921600. |
| 117 | config CONSOLE_SERIAL_460800 |
| 118 | bool "460800" |
| 119 | help |
| 120 | Set serial port Baud rate to 460800. |
| 121 | config CONSOLE_SERIAL_230400 |
| 122 | bool "230400" |
| 123 | help |
| 124 | Set serial port Baud rate to 230400. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 125 | config CONSOLE_SERIAL_115200 |
| 126 | bool "115200" |
| 127 | help |
Uwe Hermann | a081a3b | 2009-10-26 23:52:34 +0000 | [diff] [blame] | 128 | Set serial port Baud rate to 115200. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 129 | config CONSOLE_SERIAL_57600 |
| 130 | bool "57600" |
| 131 | help |
Uwe Hermann | a081a3b | 2009-10-26 23:52:34 +0000 | [diff] [blame] | 132 | Set serial port Baud rate to 57600. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 133 | config CONSOLE_SERIAL_38400 |
| 134 | bool "38400" |
| 135 | help |
Uwe Hermann | a081a3b | 2009-10-26 23:52:34 +0000 | [diff] [blame] | 136 | Set serial port Baud rate to 38400. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 137 | config CONSOLE_SERIAL_19200 |
| 138 | bool "19200" |
| 139 | help |
Uwe Hermann | a081a3b | 2009-10-26 23:52:34 +0000 | [diff] [blame] | 140 | Set serial port Baud rate to 19200. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 141 | config CONSOLE_SERIAL_9600 |
| 142 | bool "9600" |
| 143 | help |
Uwe Hermann | a081a3b | 2009-10-26 23:52:34 +0000 | [diff] [blame] | 144 | Set serial port Baud rate to 9600. |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 145 | |
| 146 | endchoice |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 147 | |
Stefan Reinauer | 509f772 | 2012-12-07 17:31:37 -0800 | [diff] [blame] | 148 | #FIXME(dhendrix): Change name to SERIAL_BAUD? (Stefan sayz: yes!!) |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 149 | config TTYS0_BAUD |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 150 | int |
Lee Leahy | cda71b8 | 2016-02-20 05:39:10 -0800 | [diff] [blame] | 151 | default 921600 if CONSOLE_SERIAL_921600 |
| 152 | default 460800 if CONSOLE_SERIAL_460800 |
| 153 | default 230400 if CONSOLE_SERIAL_230400 |
Uwe Hermann | d12b703 | 2009-10-16 22:39:55 +0000 | [diff] [blame] | 154 | default 115200 if CONSOLE_SERIAL_115200 |
| 155 | default 57600 if CONSOLE_SERIAL_57600 |
| 156 | default 38400 if CONSOLE_SERIAL_38400 |
| 157 | default 19200 if CONSOLE_SERIAL_19200 |
| 158 | default 9600 if CONSOLE_SERIAL_9600 |
| 159 | help |
Uwe Hermann | a081a3b | 2009-10-26 23:52:34 +0000 | [diff] [blame] | 160 | Map the Baud rates to an integer. |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 161 | |
Julien Viard de Galbert | 235daa4 | 2018-02-20 11:45:48 +0100 | [diff] [blame] | 162 | endif |
| 163 | |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 164 | # TODO: Allow user-friendly selection of settings other than 8n1. |
Patrick Georgi | 0e9a925 | 2009-10-06 20:48:07 +0000 | [diff] [blame] | 165 | config TTYS0_LCS |
| 166 | int |
| 167 | default 3 |
Kyösti Mälkki | afa7b13 | 2014-02-13 17:16:22 +0200 | [diff] [blame] | 168 | depends on DRIVERS_UART_8250IO || DRIVERS_UART_8250MEM |
| 169 | |
| 170 | endif # CONSOLE_SERIAL |
Patrick Georgi | 0e9a925 | 2009-10-06 20:48:07 +0000 | [diff] [blame] | 171 | |
Vladimir Serbinenko | 45988da | 2013-03-30 02:02:13 +0100 | [diff] [blame] | 172 | config SPKMODEM |
| 173 | bool "spkmodem (console on speaker) console output" |
| 174 | default n |
Vladimir Serbinenko | d51a089 | 2016-03-04 09:20:20 +0100 | [diff] [blame] | 175 | depends on ARCH_X86 |
Vladimir Serbinenko | 45988da | 2013-03-30 02:02:13 +0100 | [diff] [blame] | 176 | help |
| 177 | Send coreboot debug output through speaker |
| 178 | |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 179 | config CONSOLE_USB |
| 180 | bool "USB dongle console output" |
| 181 | depends on USBDEBUG |
Nico Huber | 06125eb | 2018-10-03 12:02:09 +0200 | [diff] [blame] | 182 | default y |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 183 | help |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 184 | Send coreboot debug output to USB. |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 185 | |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 186 | Configuration for USB hardware is under menu Generic Drivers. |
Kyösti Mälkki | d2dac0a | 2013-08-23 23:33:16 +0300 | [diff] [blame] | 187 | |
Uwe Hermann | 168b11b | 2009-10-07 16:15:40 +0000 | [diff] [blame] | 188 | # TODO: Deps? |
| 189 | # TODO: Improve description. |
Rudolf Marek | 4aa93cc | 2010-07-16 20:02:09 +0000 | [diff] [blame] | 190 | config CONSOLE_NE2K |
| 191 | bool "Network console over NE2000 compatible Ethernet adapter" |
| 192 | default n |
Vladimir Serbinenko | d51a089 | 2016-03-04 09:20:20 +0100 | [diff] [blame] | 193 | depends on PCI |
Rudolf Marek | 4aa93cc | 2010-07-16 20:02:09 +0000 | [diff] [blame] | 194 | help |
| 195 | Send coreboot debug output to a Ethernet console, it works |
| 196 | same way as Linux netconsole, packets are received to UDP |
Martin Roth | 0949e73 | 2021-10-01 14:28:22 -0600 | [diff] [blame] | 197 | port 6666 on IP/MAC specified with options below. |
Rudolf Marek | 4aa93cc | 2010-07-16 20:02:09 +0000 | [diff] [blame] | 198 | Use following netcat command: nc -u -l -p 6666 |
| 199 | |
| 200 | config CONSOLE_NE2K_DST_MAC |
| 201 | depends on CONSOLE_NE2K |
| 202 | string "Destination MAC address of remote system" |
| 203 | default "00:13:d4:76:a2:ac" |
| 204 | help |
| 205 | Type in either MAC address of logging system or MAC address |
| 206 | of the router. |
| 207 | |
| 208 | config CONSOLE_NE2K_DST_IP |
| 209 | depends on CONSOLE_NE2K |
| 210 | string "Destination IP of logging system" |
| 211 | default "10.0.1.27" |
| 212 | help |
Daniele Forsi | 53847a2 | 2014-07-22 18:00:56 +0200 | [diff] [blame] | 213 | This is IP address of the system running for example |
Rudolf Marek | 4aa93cc | 2010-07-16 20:02:09 +0000 | [diff] [blame] | 214 | netcat command to dump the packets. |
| 215 | |
| 216 | config CONSOLE_NE2K_SRC_IP |
| 217 | depends on CONSOLE_NE2K |
Stefan Reinauer | d6b4f1c | 2010-09-23 18:29:40 +0000 | [diff] [blame] | 218 | string "IP address of coreboot system" |
Rudolf Marek | 4aa93cc | 2010-07-16 20:02:09 +0000 | [diff] [blame] | 219 | default "10.0.1.253" |
| 220 | help |
Stefan Reinauer | d6b4f1c | 2010-09-23 18:29:40 +0000 | [diff] [blame] | 221 | This is the IP of the coreboot system |
Rudolf Marek | 4aa93cc | 2010-07-16 20:02:09 +0000 | [diff] [blame] | 222 | |
| 223 | config CONSOLE_NE2K_IO_PORT |
| 224 | depends on CONSOLE_NE2K |
| 225 | hex "NE2000 adapter fixed IO port address" |
| 226 | default 0xe00 |
| 227 | help |
| 228 | This is the IO port address for the IO port |
| 229 | on the card, please select some non-conflicting region, |
| 230 | 32 bytes of IO spaces will be used (and align on 32 bytes |
| 231 | boundary, qemu needs broader align) |
| 232 | |
Vadim Bendebury | c34b463 | 2011-09-28 13:51:30 -0700 | [diff] [blame] | 233 | config CONSOLE_CBMEM |
Vadim Bendebury | c34b463 | 2011-09-28 13:51:30 -0700 | [diff] [blame] | 234 | bool "Send console output to a CBMEM buffer" |
Paul Menzel | 60ef456 | 2014-03-08 10:46:52 +0100 | [diff] [blame] | 235 | default y |
Vadim Bendebury | c34b463 | 2011-09-28 13:51:30 -0700 | [diff] [blame] | 236 | help |
| 237 | Enable this to save the console output in a CBMEM buffer. This would |
| 238 | allow to see coreboot console output from Linux space. |
| 239 | |
Kyösti Mälkki | 8659e40 | 2014-12-21 08:55:47 +0200 | [diff] [blame] | 240 | if CONSOLE_CBMEM |
| 241 | |
Vadim Bendebury | c34b463 | 2011-09-28 13:51:30 -0700 | [diff] [blame] | 242 | config CONSOLE_CBMEM_BUFFER_SIZE |
Vadim Bendebury | c34b463 | 2011-09-28 13:51:30 -0700 | [diff] [blame] | 243 | hex "Room allocated for console output in CBMEM" |
Vladimir Serbinenko | eb67a04 | 2014-09-13 20:55:58 +0200 | [diff] [blame] | 244 | default 0x20000 |
Vadim Bendebury | c34b463 | 2011-09-28 13:51:30 -0700 | [diff] [blame] | 245 | help |
| 246 | Space allocated for console output storage in CBMEM. The default |
Vladimir Serbinenko | eb67a04 | 2014-09-13 20:55:58 +0200 | [diff] [blame] | 247 | value (128K or 0x20000 bytes) is large enough to accommodate |
Vadim Bendebury | c34b463 | 2011-09-28 13:51:30 -0700 | [diff] [blame] | 248 | even the BIOS_SPEW level. |
| 249 | |
Vadim Bendebury | 6e20e2f | 2015-04-10 18:04:04 -0700 | [diff] [blame] | 250 | config CONSOLE_CBMEM_DUMP_TO_UART |
| 251 | depends on !CONSOLE_SERIAL |
| 252 | bool "Dump CBMEM console on resets" |
| 253 | default n |
| 254 | help |
| 255 | Enable this to have CBMEM console buffer contents dumped on the |
| 256 | serial output in case serial console is disabled and the device |
| 257 | resets itself while trying to boot the payload. |
| 258 | |
Raul E Rangel | 80a7f4e | 2022-01-11 12:54:36 -0700 | [diff] [blame] | 259 | config CONSOLE_CBMEM_PRINT_PRE_BOOTBLOCK_CONTENTS |
| 260 | bool |
| 261 | help |
| 262 | Pre-bootblock stages (i.e., VBOOT_STARTS_BEFORE_BOOTBLOCK) might not |
| 263 | have the ability to log to the UART, so their console messages are |
| 264 | inaccessible until the boot processes gets into the payload or OS. |
| 265 | This feature will dump the pre-bootblock CBMEM console immediately |
| 266 | after the bootblock console is initialized. |
Kyösti Mälkki | 8659e40 | 2014-12-21 08:55:47 +0200 | [diff] [blame] | 267 | endif |
| 268 | |
Youness Alaoui | c4b4ff3 | 2017-05-11 10:36:29 -0400 | [diff] [blame] | 269 | config CONSOLE_SPI_FLASH |
| 270 | bool "SPI Flash console output" |
| 271 | default n |
Arthur Heymans | 6e8abc4 | 2021-04-30 16:00:38 +0200 | [diff] [blame] | 272 | depends on BOOT_DEVICE_SPI_FLASH |
Youness Alaoui | c4b4ff3 | 2017-05-11 10:36:29 -0400 | [diff] [blame] | 273 | select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if !COMMON_CBFS_SPI_WRAPPER |
| 274 | help |
| 275 | Send coreboot debug output to the SPI Flash in the FMAP CONSOLE area |
| 276 | |
| 277 | This option can cause premature wear on the SPI flash and should not |
| 278 | be used as a normal means of debugging. It is only to be enabled and |
| 279 | used when porting a new motherboard which has no other console |
| 280 | available (no UART, no POST, no cbmem access(non bootable)). Since |
| 281 | a non bootable machine will require the use of an external SPI Flash |
| 282 | programmer, the developer can grab the console log at the same time. |
| 283 | |
| 284 | The flash console will not be erased on reboot, so once it is full, |
| 285 | the flashconsole driver will stop writing to it. This is to avoid |
| 286 | wear on the flash, and to avoid erasing sectors (which may freeze |
| 287 | the SPI controller on skylake). |
| 288 | |
| 289 | The 'CONSOLE' area can be extracted from the FMAP with : |
| 290 | cbfstool rom.bin read -r CONSOLE -f console.log |
| 291 | |
| 292 | config CONSOLE_SPI_FLASH_BUFFER_SIZE |
| 293 | hex "Room allocated for console output in FMAP" |
| 294 | default 0x20000 |
| 295 | depends on CONSOLE_SPI_FLASH |
| 296 | help |
| 297 | Space allocated for console output storage in FMAP. The default |
| 298 | value (128K or 0x20000 bytes) is large enough to accommodate |
| 299 | even the BIOS_SPEW level. |
| 300 | |
Husni Faiz | 67300f8 | 2022-09-05 15:23:15 +0530 | [diff] [blame] | 301 | config CONSOLE_I2C_SMBUS |
| 302 | bool "SMBus console output" |
| 303 | depends on SOUTHBRIDGE_INTEL_COMMON_SMBUS |
| 304 | help |
| 305 | Send coreboot debug output to the SMBus. |
| 306 | The output can be read with an I2C slave device connected |
| 307 | the SMBus. Please refer to the technotes section of the |
| 308 | coreboot documentation for more details. |
| 309 | |
| 310 | if CONSOLE_I2C_SMBUS |
| 311 | comment "Set logging device address and data register address" |
| 312 | |
| 313 | config CONSOLE_I2C_SMBUS_SLAVE_ADDRESS |
| 314 | hex "I2C slave address of the logging device" |
Husni Faiz | b80535a | 2022-09-09 17:49:53 +0530 | [diff] [blame] | 315 | default 0x48 if SC16IS7XX_INIT |
Husni Faiz | 67300f8 | 2022-09-05 15:23:15 +0530 | [diff] [blame] | 316 | help |
| 317 | I2C address of the device which logs the data. |
| 318 | |
| 319 | config CONSOLE_I2C_SMBUS_SLAVE_DATA_REGISTER |
| 320 | hex "Data register address of the I2C logging device" |
Husni Faiz | b80535a | 2022-09-09 17:49:53 +0530 | [diff] [blame] | 321 | default 0x00 if SC16IS7XX_INIT |
Husni Faiz | 67300f8 | 2022-09-05 15:23:15 +0530 | [diff] [blame] | 322 | help |
| 323 | This an 8-bit data register. |
| 324 | |
Husni Faiz | b80535a | 2022-09-09 17:49:53 +0530 | [diff] [blame] | 325 | config SC16IS7XX_INIT |
| 326 | bool "Initialize SC16IS7XX I2C to UART converter chip" |
| 327 | help |
| 328 | SC16IS7XX is a slave I2C to UART converter chip. Enabling |
| 329 | this option will initialize the chip. |
| 330 | |
| 331 | The default I2C slave address value 0x48 is the address of |
| 332 | SC16IS7XX I2C to UART converter chip when the A1 and A0 pins |
| 333 | are set to Vcc. |
| 334 | |
| 335 | The default data register address value 0x00 is the data |
| 336 | register address of SC16IS7XX I2C to UART converter chip. |
| 337 | |
Husni Faiz | 67300f8 | 2022-09-05 15:23:15 +0530 | [diff] [blame] | 338 | endif # CONSOLE_I2C_SMBUS |
| 339 | |
Gerd Hoffmann | d7c6e44 | 2013-05-30 10:32:31 +0200 | [diff] [blame] | 340 | config CONSOLE_QEMU_DEBUGCON |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 341 | bool "QEMU debug console output" |
Angel Pons | d615230 | 2020-03-01 14:46:38 +0100 | [diff] [blame] | 342 | depends on CPU_QEMU_X86 |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 343 | default y |
| 344 | help |
| 345 | Send coreboot debug output to QEMU's isa-debugcon device: |
| 346 | |
| 347 | qemu-system-x86_64 \ |
| 348 | -chardev file,id=debugcon,path=/dir/file.log \ |
| 349 | -device isa-debugcon,iobase=0x402,chardev=debugcon |
| 350 | |
Gerd Hoffmann | d7c6e44 | 2013-05-30 10:32:31 +0200 | [diff] [blame] | 351 | config CONSOLE_QEMU_DEBUGCON_PORT |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 352 | hex "QEMU debug console port" |
Gerd Hoffmann | d7c6e44 | 2013-05-30 10:32:31 +0200 | [diff] [blame] | 353 | depends on CONSOLE_QEMU_DEBUGCON |
Gerd Hoffmann | 038aa29 | 2013-05-29 13:06:22 +0200 | [diff] [blame] | 354 | default 0x402 |
| 355 | |
Angel Pons | 12d48cd | 2020-10-03 12:22:04 +0200 | [diff] [blame] | 356 | config EM100PRO_SPI_CONSOLE |
| 357 | bool "EM100Pro SPI debug console output" |
| 358 | depends on HAVE_EM100PRO_SPI_CONSOLE_SUPPORT && !DEBUG_SPI_FLASH |
Martin Roth | 3a54318 | 2015-09-28 15:27:24 -0600 | [diff] [blame] | 359 | help |
| 360 | Enable support for the debug console on the Dediprog EM100Pro. |
| 361 | This is currently working only in ramstage due to how the spi |
| 362 | drivers are written. |
| 363 | |
Jeremy Soller | 52785ab | 2020-07-22 06:40:28 -0600 | [diff] [blame] | 364 | config CONSOLE_SYSTEM76_EC |
| 365 | bool "System76 EC console output" |
| 366 | default n |
| 367 | depends on EC_SYSTEM76_EC |
| 368 | help |
| 369 | Send coreboot debug output to a System76 embedded controller. |
| 370 | |
Fred Reitberger | a02176d | 2023-02-01 16:00:54 -0500 | [diff] [blame] | 371 | config CONSOLE_AMD_SIMNOW |
| 372 | bool "AMD SimNow console output" |
| 373 | default n |
| 374 | depends on SOC_AMD_COMMON && !POST_IO |
| 375 | select CONSOLE_POST |
| 376 | help |
| 377 | Send coreboot debug output to IO ports for SimNow |
| 378 | |
Julien Viard de Galbert | 4ecd42f | 2018-02-20 15:01:27 +0100 | [diff] [blame] | 379 | config CONSOLE_OVERRIDE_LOGLEVEL |
Patrick Georgi | 0bb8346 | 2019-11-22 20:58:58 +0100 | [diff] [blame] | 380 | bool |
Julien Viard de Galbert | 4ecd42f | 2018-02-20 15:01:27 +0100 | [diff] [blame] | 381 | help |
| 382 | Set to "y" when the platform overrides the loglevel by providing |
| 383 | a get_console_loglevel routine. |
| 384 | |
| 385 | if !CONSOLE_OVERRIDE_LOGLEVEL |
| 386 | |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 387 | choice |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 388 | prompt "Default console log level" |
Julius Werner | e64a585 | 2018-10-15 17:19:58 -0700 | [diff] [blame] | 389 | default DEFAULT_CONSOLE_LOGLEVEL_8 if CHROMEOS |
Nico Huber | 715a502 | 2018-05-04 12:04:00 +0200 | [diff] [blame] | 390 | default DEFAULT_CONSOLE_LOGLEVEL_7 |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 391 | |
| 392 | config DEFAULT_CONSOLE_LOGLEVEL_8 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 393 | bool "8: SPEW" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 394 | help |
| 395 | Way too many details. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 396 | config DEFAULT_CONSOLE_LOGLEVEL_7 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 397 | bool "7: DEBUG" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 398 | help |
| 399 | Debug-level messages. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 400 | config DEFAULT_CONSOLE_LOGLEVEL_6 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 401 | bool "6: INFO" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 402 | help |
| 403 | Informational messages. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 404 | config DEFAULT_CONSOLE_LOGLEVEL_5 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 405 | bool "5: NOTICE" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 406 | help |
| 407 | Normal but significant conditions. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 408 | config DEFAULT_CONSOLE_LOGLEVEL_4 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 409 | bool "4: WARNING" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 410 | help |
| 411 | Warning conditions. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 412 | config DEFAULT_CONSOLE_LOGLEVEL_3 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 413 | bool "3: ERR" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 414 | help |
| 415 | Error conditions. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 416 | config DEFAULT_CONSOLE_LOGLEVEL_2 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 417 | bool "2: CRIT" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 418 | help |
| 419 | Critical conditions. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 420 | config DEFAULT_CONSOLE_LOGLEVEL_1 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 421 | bool "1: ALERT" |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 422 | help |
| 423 | Action must be taken immediately. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 424 | config DEFAULT_CONSOLE_LOGLEVEL_0 |
Myles Watson | 0364618 | 2009-10-16 19:29:45 +0000 | [diff] [blame] | 425 | bool "0: EMERG" |
| 426 | help |
| 427 | System is unusable. |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 428 | |
| 429 | endchoice |
| 430 | |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 431 | config DEFAULT_CONSOLE_LOGLEVEL |
Uwe Hermann | 7fe4191 | 2009-10-11 13:35:24 +0000 | [diff] [blame] | 432 | int |
| 433 | default 0 if DEFAULT_CONSOLE_LOGLEVEL_0 |
| 434 | default 1 if DEFAULT_CONSOLE_LOGLEVEL_1 |
| 435 | default 2 if DEFAULT_CONSOLE_LOGLEVEL_2 |
| 436 | default 3 if DEFAULT_CONSOLE_LOGLEVEL_3 |
| 437 | default 4 if DEFAULT_CONSOLE_LOGLEVEL_4 |
| 438 | default 5 if DEFAULT_CONSOLE_LOGLEVEL_5 |
| 439 | default 6 if DEFAULT_CONSOLE_LOGLEVEL_6 |
| 440 | default 7 if DEFAULT_CONSOLE_LOGLEVEL_7 |
| 441 | default 8 if DEFAULT_CONSOLE_LOGLEVEL_8 |
| 442 | help |
| 443 | Map the log level config names to an integer. |
Patrick Georgi | 0588d19 | 2009-08-12 15:00:51 +0000 | [diff] [blame] | 444 | |
Julien Viard de Galbert | 4ecd42f | 2018-02-20 15:01:27 +0100 | [diff] [blame] | 445 | endif |
| 446 | |
Igor Bagnucki | f0d6521 | 2022-03-03 11:41:57 +0100 | [diff] [blame] | 447 | config CONSOLE_USE_LOGLEVEL_PREFIX |
| 448 | bool "Use loglevel prefix to indicate line loglevel" |
| 449 | default y |
| 450 | help |
| 451 | When enabled, if the code contains a: |
| 452 | `printk(BIOS_DEBUG, "This is a debug message!\n")`, |
| 453 | it will show up as: |
| 454 | `[DEBUG] This is a debug message!` |
| 455 | |
Julius Werner | a120e0d | 2022-01-21 15:24:12 -0800 | [diff] [blame] | 456 | config CONSOLE_USE_ANSI_ESCAPES |
| 457 | bool "Use ANSI escape sequences for console highlighting" |
Zheng Bao | ddf8d19 | 2023-03-29 10:39:32 +0800 | [diff] [blame] | 458 | default y if !CONSOLE_AMD_SIMNOW |
Julius Werner | a120e0d | 2022-01-21 15:24:12 -0800 | [diff] [blame] | 459 | help |
| 460 | If enabled, certain consoles (e.g. UART) that are meant to be read on |
| 461 | a terminal will use ANSI escape sequences (like `ESC [1m`) to |
| 462 | highlight lines based on their log level. Disable this if your |
| 463 | terminal does not support ANSI escape sequences. |
| 464 | |
Stefan Reinauer | c719f1a | 2010-03-30 09:57:28 +0000 | [diff] [blame] | 465 | config NO_POST |
| 466 | bool "Don't show any POST codes" |
| 467 | default n |
| 468 | |
Duncan Laurie | b6e97b1 | 2012-09-09 19:09:56 -0700 | [diff] [blame] | 469 | config CMOS_POST |
| 470 | bool "Store post codes in CMOS for debugging" |
Stefan Reinauer | c2d5a16 | 2012-12-06 14:25:27 -0800 | [diff] [blame] | 471 | depends on !NO_POST && PC80_SYSTEM |
Duncan Laurie | b6e97b1 | 2012-09-09 19:09:56 -0700 | [diff] [blame] | 472 | default n |
| 473 | help |
| 474 | If enabled, coreboot will store post codes in CMOS and switch between |
| 475 | two offsets on each boot so the last post code in the previous boot |
| 476 | can be retrieved. This uses 3 bytes of CMOS. |
| 477 | |
| 478 | config CMOS_POST_OFFSET |
| 479 | hex "Offset into CMOS to store POST codes" |
| 480 | depends on CMOS_POST |
Martin Roth | 3b87812 | 2016-09-30 14:43:01 -0600 | [diff] [blame] | 481 | default 0x0 |
Duncan Laurie | b6e97b1 | 2012-09-09 19:09:56 -0700 | [diff] [blame] | 482 | help |
| 483 | If CMOS_POST is enabled then an offset into CMOS must be provided. |
| 484 | If CONFIG_HAVE_OPTION_TABLE is enabled then it will use the value |
| 485 | defined in the mainboard option table. |
| 486 | |
Daniele Forsi | ad488d2 | 2014-07-30 12:23:35 +0200 | [diff] [blame] | 487 | config CONSOLE_POST |
Idwer Vollering | 5809a73 | 2014-03-11 15:36:21 +0000 | [diff] [blame] | 488 | bool "Show POST codes on the debug console" |
| 489 | depends on !NO_POST |
| 490 | default n |
| 491 | help |
| 492 | If enabled, coreboot will additionally print POST codes (which are |
| 493 | usually displayed using a so-called "POST card" ISA/PCI/PCI-E |
| 494 | device) on the debug console. |
| 495 | |
| 496 | config POST_DEVICE |
| 497 | bool "Send POST codes to an external device" |
| 498 | depends on !NO_POST |
| 499 | default y |
| 500 | |
| 501 | choice |
| 502 | prompt "Device to send POST codes to" |
| 503 | depends on POST_DEVICE |
Kyösti Mälkki | 657d68b | 2019-12-03 12:36:09 +0200 | [diff] [blame] | 504 | default POST_DEVICE_LPC if DEFAULT_POST_ON_LPC |
Idwer Vollering | 5809a73 | 2014-03-11 15:36:21 +0000 | [diff] [blame] | 505 | default POST_DEVICE_NONE |
| 506 | |
| 507 | config POST_DEVICE_NONE |
| 508 | bool "None" |
| 509 | config POST_DEVICE_LPC |
| 510 | bool "LPC" |
Vladimir Serbinenko | d51a089 | 2016-03-04 09:20:20 +0100 | [diff] [blame] | 511 | depends on PCI |
Idwer Vollering | 5809a73 | 2014-03-11 15:36:21 +0000 | [diff] [blame] | 512 | config POST_DEVICE_PCI_PCIE |
| 513 | bool "PCI/PCIe" |
Vladimir Serbinenko | d51a089 | 2016-03-04 09:20:20 +0100 | [diff] [blame] | 514 | depends on PCI |
Idwer Vollering | 5809a73 | 2014-03-11 15:36:21 +0000 | [diff] [blame] | 515 | endchoice |
| 516 | |
Kyösti Mälkki | 657d68b | 2019-12-03 12:36:09 +0200 | [diff] [blame] | 517 | config DEFAULT_POST_ON_LPC |
| 518 | bool |
| 519 | default n |
| 520 | |
Idwer Vollering | 5809a73 | 2014-03-11 15:36:21 +0000 | [diff] [blame] | 521 | config POST_IO |
David Hendricks | 6b908d0 | 2012-11-05 12:34:09 -0800 | [diff] [blame] | 522 | bool "Send POST codes to an IO port" |
Idwer Vollering | 5809a73 | 2014-03-11 15:36:21 +0000 | [diff] [blame] | 523 | depends on PC80_SYSTEM && !NO_POST |
David Hendricks | 6b908d0 | 2012-11-05 12:34:09 -0800 | [diff] [blame] | 524 | default y |
| 525 | help |
| 526 | If enabled, POST codes will be written to an IO port. |
Stefan Reinauer | c719f1a | 2010-03-30 09:57:28 +0000 | [diff] [blame] | 527 | |
Idwer Vollering | 5809a73 | 2014-03-11 15:36:21 +0000 | [diff] [blame] | 528 | config POST_IO_PORT |
| 529 | depends on POST_IO |
David Hendricks | 6b908d0 | 2012-11-05 12:34:09 -0800 | [diff] [blame] | 530 | hex "IO port for POST codes" |
| 531 | default 0x80 |
| 532 | help |
| 533 | POST codes on x86 are typically written to the LPC bus on port |
Daniele Forsi | 53847a2 | 2014-07-22 18:00:56 +0200 | [diff] [blame] | 534 | 0x80. However, it may be desirable to change the port number |
David Hendricks | 6b908d0 | 2012-11-05 12:34:09 -0800 | [diff] [blame] | 535 | depending on the presence of coprocessors/microcontrollers or if the |
| 536 | platform does not support IO in the conventional x86 manner. |
| 537 | |
Martin Roth | 1455437 | 2015-11-12 14:02:42 -0700 | [diff] [blame] | 538 | config NO_EARLY_BOOTBLOCK_POSTCODES |
| 539 | def_bool n |
| 540 | help |
| 541 | Some chipsets require that the routing for the port 80h POST |
Martin Roth | 8a85a84 | 2021-06-21 09:18:46 -0600 | [diff] [blame] | 542 | code be configured before any POST codes are sent out. If this is |
| 543 | not done, the system can hang on the first POST code. This |
| 544 | initialization can be done in the boot block, but there are a couple |
| 545 | of POST codes that go out before the chipset's C bootblock |
| 546 | initialization can happen. This option suppresses all postcodes in |
| 547 | the early assembly code. |
Martin Roth | 1455437 | 2015-11-12 14:02:42 -0700 | [diff] [blame] | 548 | |
Nico Huber | c83239e | 2016-10-05 17:46:49 +0200 | [diff] [blame] | 549 | config HWBASE_DEBUG_CB |
| 550 | bool |
| 551 | default y if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 |
| 552 | default n |
| 553 | |
| 554 | config HWBASE_DEBUG_NULL |
| 555 | def_bool y |
| 556 | depends on !HWBASE_DEBUG_CB |
| 557 | |
David Hendricks | 6b908d0 | 2012-11-05 12:34:09 -0800 | [diff] [blame] | 558 | endmenu |