blob: 30b286205d2418ba2a247f4acb469543b34be69b [file] [log] [blame]
Martin Roth19081102024-02-16 10:31:30 -07001## SPDX-License-Identifier: GPL-2.0-only
2
Stefan Reinauer1b342262011-01-05 02:27:53 +00003menu "Console"
Hung-Te Linad173ea2013-02-06 21:24:12 +08004
Nico Huberf86baf32019-01-15 00:05:46 +01005config NO_BOOTBLOCK_CONSOLE
6 bool
Arthur Heymansa2bc2542021-05-29 08:10:49 +02007 depends on SEPARATE_ROMSTAGE
Nico Huberf86baf32019-01-15 00:05:46 +01008
Gabe Blackfbb11cf2013-06-06 00:21:20 -07009config BOOTBLOCK_CONSOLE
10 bool "Enable early (bootblock) console output."
Arthur Heymans494b0312019-11-28 16:22:06 +010011 depends on !NO_BOOTBLOCK_CONSOLE
Nico Huber1d748c52019-01-13 13:14:04 +010012 default y
Gabe Blackfbb11cf2013-06-06 00:21:20 -070013 help
14 Use console during the bootblock if supported
15
Lee Leahy049b4622016-07-31 11:53:28 -070016config POSTCAR_CONSOLE
17 bool "Enable console output during postcar."
18 depends on POSTCAR_STAGE
Kyösti Mälkki9fc12e02019-08-09 07:09:48 +030019 default y
Lee Leahy049b4622016-07-31 11:53:28 -070020 help
21 Use console during the postcar if supported
22
Kyösti Mälkki361cd812013-08-12 23:29:57 +030023config SQUELCH_EARLY_SMP
24 bool "Squelch AP CPUs from early console."
25 default y
Lee Leahyf2ad50f2016-02-08 16:19:56 -080026 depends on SMP
Kyösti Mälkki361cd812013-08-12 23:29:57 +030027 help
28 When selected only the BSP CPU will output to early console.
29
30 Console drivers have unpredictable behaviour if multiple threads
31 attempt to share the same resources without a spinlock.
32
33 If unsure, say Y.
34
Hung-Te Linad173ea2013-02-06 21:24:12 +080035config CONSOLE_SERIAL
Uwe Hermannd12b7032009-10-16 22:39:55 +000036 bool "Serial port console output"
Stefan Reinauer509f7722012-12-07 17:31:37 -080037 default y
Nico Huber755db952018-11-11 01:42:17 +010038 depends on DRIVERS_UART
Stefan Reinauer509f7722012-12-07 17:31:37 -080039 help
Kyösti Mälkkiafa7b132014-02-13 17:16:22 +020040 Send coreboot debug output to a serial port.
David Hendricks6a503b62012-12-31 17:28:43 -080041
Kyösti Mälkkiafa7b132014-02-13 17:16:22 +020042 The type of serial port driver selected based on your configuration is
43 shown on the following menu line. Supporting multiple different types
44 of UARTs in one build is not supported.
Stefan Reinauer4885daa2011-04-26 23:47:04 +000045
Nico Huberda8c12b2019-01-11 10:38:02 +010046config FIXED_UART_FOR_CONSOLE
47 bool
48 help
49 Select to remove the prompt from UART_FOR_CONSOLE in case a
50 specific UART has to be used (e.g. when the platform code
51 performs dangerous configurations).
52
Raul E Rangel6ec3dd22022-01-21 13:34:21 -070053if CONSOLE_SERIAL || CONSOLE_CBMEM_DUMP_TO_UART
Patrick Georgi0588d192009-08-12 15:00:51 +000054
Kyösti Mälkkiafa7b132014-02-13 17:16:22 +020055 comment "I/O mapped, 8250-compatible"
56 depends on DRIVERS_UART_8250IO
57
58 comment "memory mapped, 8250-compatible"
59 depends on DRIVERS_UART_8250MEM
60
61 comment "device-specific UART"
Hung-Te Linad173ea2013-02-06 21:24:12 +080062 depends on HAVE_UART_SPECIAL
Stefan Reinauer509f7722012-12-07 17:31:37 -080063
Bryant Ou0ee920b2020-09-14 23:41:41 -070064config OVERRIDE_UART_FOR_CONSOLE
65 bool
66 help
67 Set to "y" when the platform overrides the index of uart port by providing
68 a get_uart_for_console routine.
69
70if !OVERRIDE_UART_FOR_CONSOLE
71
Kyösti Mälkki70342a72014-03-14 22:28:29 +020072config UART_FOR_CONSOLE
Nico Hubera96e66a2018-11-11 02:51:14 +010073 int
74 prompt "Index for UART port to use for console" if !FIXED_UART_FOR_CONSOLE
Kyösti Mälkki70342a72014-03-14 22:28:29 +020075 default 0
Martin Rothac76ed92015-11-19 11:40:43 -070076 help
77 Select an I/O port to use for serial console:
78 0 = 0x3f8, 1 = 0x2f8, 2 = 0x3e8, 3 = 0x2e8
Uwe Hermannd12b7032009-10-16 22:39:55 +000079
Kyösti Mälkki70342a72014-03-14 22:28:29 +020080# FIXME: Early programming in romstage is incorrect as we should
81# program different LDN to actually change the physical port.
Uwe Hermannd12b7032009-10-16 22:39:55 +000082config TTYS0_BASE
83 hex
Gabe Black77ffa0d2013-09-30 21:25:49 -070084 depends on DRIVERS_UART
Kyösti Mälkki70342a72014-03-14 22:28:29 +020085 default 0x3f8 if UART_FOR_CONSOLE = 0
86 default 0x2f8 if UART_FOR_CONSOLE = 1
87 default 0x3e8 if UART_FOR_CONSOLE = 2
88 default 0x2e8 if UART_FOR_CONSOLE = 3
Uwe Hermannd12b7032009-10-16 22:39:55 +000089 help
Kyösti Mälkki70342a72014-03-14 22:28:29 +020090 Map the COM port number to the respective I/O port.
Uwe Hermannd12b7032009-10-16 22:39:55 +000091
Martin Rothac76ed92015-11-19 11:40:43 -070092comment "Serial port base address = 0x3f8"
Martin Roth3c2e2872019-07-11 12:54:12 -060093depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 0
Martin Rothac76ed92015-11-19 11:40:43 -070094comment "Serial port base address = 0x2f8"
Martin Roth3c2e2872019-07-11 12:54:12 -060095depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 1
Martin Rothac76ed92015-11-19 11:40:43 -070096comment "Serial port base address = 0x3e8"
Martin Roth3c2e2872019-07-11 12:54:12 -060097depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 2
Martin Rothac76ed92015-11-19 11:40:43 -070098comment "Serial port base address = 0x2e8"
Martin Roth3c2e2872019-07-11 12:54:12 -060099depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 3
Martin Rothac76ed92015-11-19 11:40:43 -0700100
Bryant Ou0ee920b2020-09-14 23:41:41 -0700101endif
102
Julien Viard de Galbert235daa42018-02-20 11:45:48 +0100103config UART_OVERRIDE_BAUDRATE
Patrick Georgi0bb83462019-11-22 20:58:58 +0100104 bool
Julien Viard de Galbert235daa42018-02-20 11:45:48 +0100105 help
106 Set to "y" when the platform overrides the baudrate by providing
107 a get_uart_baudrate routine.
108
109if !UART_OVERRIDE_BAUDRATE
110
Uwe Hermannd12b7032009-10-16 22:39:55 +0000111choice
Uwe Hermanna081a3b2009-10-26 23:52:34 +0000112 prompt "Baud rate"
Uwe Hermannd12b7032009-10-16 22:39:55 +0000113 default CONSOLE_SERIAL_115200
Uwe Hermannd12b7032009-10-16 22:39:55 +0000114
Lee Leahycda71b82016-02-20 05:39:10 -0800115config CONSOLE_SERIAL_921600
116 bool "921600"
117 help
118 Set serial port Baud rate to 921600.
119config CONSOLE_SERIAL_460800
120 bool "460800"
121 help
122 Set serial port Baud rate to 460800.
123config CONSOLE_SERIAL_230400
124 bool "230400"
125 help
126 Set serial port Baud rate to 230400.
Uwe Hermannd12b7032009-10-16 22:39:55 +0000127config CONSOLE_SERIAL_115200
128 bool "115200"
129 help
Uwe Hermanna081a3b2009-10-26 23:52:34 +0000130 Set serial port Baud rate to 115200.
Uwe Hermannd12b7032009-10-16 22:39:55 +0000131config CONSOLE_SERIAL_57600
132 bool "57600"
133 help
Uwe Hermanna081a3b2009-10-26 23:52:34 +0000134 Set serial port Baud rate to 57600.
Uwe Hermannd12b7032009-10-16 22:39:55 +0000135config CONSOLE_SERIAL_38400
136 bool "38400"
137 help
Uwe Hermanna081a3b2009-10-26 23:52:34 +0000138 Set serial port Baud rate to 38400.
Uwe Hermannd12b7032009-10-16 22:39:55 +0000139config CONSOLE_SERIAL_19200
140 bool "19200"
141 help
Uwe Hermanna081a3b2009-10-26 23:52:34 +0000142 Set serial port Baud rate to 19200.
Uwe Hermannd12b7032009-10-16 22:39:55 +0000143config CONSOLE_SERIAL_9600
144 bool "9600"
145 help
Uwe Hermanna081a3b2009-10-26 23:52:34 +0000146 Set serial port Baud rate to 9600.
Uwe Hermannd12b7032009-10-16 22:39:55 +0000147
148endchoice
Patrick Georgi0588d192009-08-12 15:00:51 +0000149
Stefan Reinauer509f7722012-12-07 17:31:37 -0800150#FIXME(dhendrix): Change name to SERIAL_BAUD? (Stefan sayz: yes!!)
Patrick Georgi0588d192009-08-12 15:00:51 +0000151config TTYS0_BAUD
Uwe Hermannd12b7032009-10-16 22:39:55 +0000152 int
Lee Leahycda71b82016-02-20 05:39:10 -0800153 default 921600 if CONSOLE_SERIAL_921600
154 default 460800 if CONSOLE_SERIAL_460800
155 default 230400 if CONSOLE_SERIAL_230400
Uwe Hermannd12b7032009-10-16 22:39:55 +0000156 default 115200 if CONSOLE_SERIAL_115200
157 default 57600 if CONSOLE_SERIAL_57600
158 default 38400 if CONSOLE_SERIAL_38400
159 default 19200 if CONSOLE_SERIAL_19200
160 default 9600 if CONSOLE_SERIAL_9600
161 help
Uwe Hermanna081a3b2009-10-26 23:52:34 +0000162 Map the Baud rates to an integer.
Patrick Georgi0588d192009-08-12 15:00:51 +0000163
Julien Viard de Galbert235daa42018-02-20 11:45:48 +0100164endif
165
Uwe Hermann168b11b2009-10-07 16:15:40 +0000166# TODO: Allow user-friendly selection of settings other than 8n1.
Patrick Georgi0e9a9252009-10-06 20:48:07 +0000167config TTYS0_LCS
168 int
169 default 3
Kyösti Mälkkiafa7b132014-02-13 17:16:22 +0200170 depends on DRIVERS_UART_8250IO || DRIVERS_UART_8250MEM
171
172endif # CONSOLE_SERIAL
Patrick Georgi0e9a9252009-10-06 20:48:07 +0000173
Vladimir Serbinenko45988da2013-03-30 02:02:13 +0100174config SPKMODEM
175 bool "spkmodem (console on speaker) console output"
176 default n
Vladimir Serbinenkod51a0892016-03-04 09:20:20 +0100177 depends on ARCH_X86
Vladimir Serbinenko45988da2013-03-30 02:02:13 +0100178 help
179 Send coreboot debug output through speaker
180
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +0200181config CONSOLE_USB
182 bool "USB dongle console output"
183 depends on USBDEBUG
Nico Huber06125eb2018-10-03 12:02:09 +0200184 default y
Uwe Hermann168b11b2009-10-07 16:15:40 +0000185 help
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +0200186 Send coreboot debug output to USB.
Uwe Hermann168b11b2009-10-07 16:15:40 +0000187
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +0200188 Configuration for USB hardware is under menu Generic Drivers.
Kyösti Mälkkid2dac0a2013-08-23 23:33:16 +0300189
Uwe Hermann168b11b2009-10-07 16:15:40 +0000190# TODO: Deps?
191# TODO: Improve description.
Rudolf Marek4aa93cc2010-07-16 20:02:09 +0000192config CONSOLE_NE2K
193 bool "Network console over NE2000 compatible Ethernet adapter"
194 default n
Vladimir Serbinenkod51a0892016-03-04 09:20:20 +0100195 depends on PCI
Rudolf Marek4aa93cc2010-07-16 20:02:09 +0000196 help
197 Send coreboot debug output to a Ethernet console, it works
198 same way as Linux netconsole, packets are received to UDP
Martin Roth0949e732021-10-01 14:28:22 -0600199 port 6666 on IP/MAC specified with options below.
Rudolf Marek4aa93cc2010-07-16 20:02:09 +0000200 Use following netcat command: nc -u -l -p 6666
201
202config CONSOLE_NE2K_DST_MAC
203 depends on CONSOLE_NE2K
204 string "Destination MAC address of remote system"
205 default "00:13:d4:76:a2:ac"
206 help
207 Type in either MAC address of logging system or MAC address
208 of the router.
209
210config CONSOLE_NE2K_DST_IP
211 depends on CONSOLE_NE2K
212 string "Destination IP of logging system"
213 default "10.0.1.27"
214 help
Daniele Forsi53847a22014-07-22 18:00:56 +0200215 This is IP address of the system running for example
Rudolf Marek4aa93cc2010-07-16 20:02:09 +0000216 netcat command to dump the packets.
217
218config CONSOLE_NE2K_SRC_IP
219 depends on CONSOLE_NE2K
Stefan Reinauerd6b4f1c2010-09-23 18:29:40 +0000220 string "IP address of coreboot system"
Rudolf Marek4aa93cc2010-07-16 20:02:09 +0000221 default "10.0.1.253"
222 help
Stefan Reinauerd6b4f1c2010-09-23 18:29:40 +0000223 This is the IP of the coreboot system
Rudolf Marek4aa93cc2010-07-16 20:02:09 +0000224
225config CONSOLE_NE2K_IO_PORT
226 depends on CONSOLE_NE2K
227 hex "NE2000 adapter fixed IO port address"
228 default 0xe00
229 help
230 This is the IO port address for the IO port
231 on the card, please select some non-conflicting region,
232 32 bytes of IO spaces will be used (and align on 32 bytes
233 boundary, qemu needs broader align)
234
Vadim Bendeburyc34b4632011-09-28 13:51:30 -0700235config CONSOLE_CBMEM
Vadim Bendeburyc34b4632011-09-28 13:51:30 -0700236 bool "Send console output to a CBMEM buffer"
Paul Menzel60ef4562014-03-08 10:46:52 +0100237 default y
Vadim Bendeburyc34b4632011-09-28 13:51:30 -0700238 help
239 Enable this to save the console output in a CBMEM buffer. This would
240 allow to see coreboot console output from Linux space.
241
Kyösti Mälkki8659e402014-12-21 08:55:47 +0200242if CONSOLE_CBMEM
243
Vadim Bendeburyc34b4632011-09-28 13:51:30 -0700244config CONSOLE_CBMEM_BUFFER_SIZE
Vadim Bendeburyc34b4632011-09-28 13:51:30 -0700245 hex "Room allocated for console output in CBMEM"
Vladimir Serbinenkoeb67a042014-09-13 20:55:58 +0200246 default 0x20000
Vadim Bendeburyc34b4632011-09-28 13:51:30 -0700247 help
248 Space allocated for console output storage in CBMEM. The default
Vladimir Serbinenkoeb67a042014-09-13 20:55:58 +0200249 value (128K or 0x20000 bytes) is large enough to accommodate
Vadim Bendeburyc34b4632011-09-28 13:51:30 -0700250 even the BIOS_SPEW level.
251
Vadim Bendebury6e20e2f2015-04-10 18:04:04 -0700252config CONSOLE_CBMEM_DUMP_TO_UART
253 depends on !CONSOLE_SERIAL
254 bool "Dump CBMEM console on resets"
255 default n
256 help
257 Enable this to have CBMEM console buffer contents dumped on the
258 serial output in case serial console is disabled and the device
259 resets itself while trying to boot the payload.
260
Raul E Rangel80a7f4e2022-01-11 12:54:36 -0700261config CONSOLE_CBMEM_PRINT_PRE_BOOTBLOCK_CONTENTS
262 bool
263 help
264 Pre-bootblock stages (i.e., VBOOT_STARTS_BEFORE_BOOTBLOCK) might not
265 have the ability to log to the UART, so their console messages are
266 inaccessible until the boot processes gets into the payload or OS.
267 This feature will dump the pre-bootblock CBMEM console immediately
268 after the bootblock console is initialized.
Kyösti Mälkki8659e402014-12-21 08:55:47 +0200269endif
270
Youness Alaouic4b4ff32017-05-11 10:36:29 -0400271config CONSOLE_SPI_FLASH
272 bool "SPI Flash console output"
273 default n
Arthur Heymans6e8abc42021-04-30 16:00:38 +0200274 depends on BOOT_DEVICE_SPI_FLASH
Youness Alaouic4b4ff32017-05-11 10:36:29 -0400275 select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if !COMMON_CBFS_SPI_WRAPPER
276 help
277 Send coreboot debug output to the SPI Flash in the FMAP CONSOLE area
278
279 This option can cause premature wear on the SPI flash and should not
280 be used as a normal means of debugging. It is only to be enabled and
281 used when porting a new motherboard which has no other console
282 available (no UART, no POST, no cbmem access(non bootable)). Since
283 a non bootable machine will require the use of an external SPI Flash
284 programmer, the developer can grab the console log at the same time.
285
286 The flash console will not be erased on reboot, so once it is full,
287 the flashconsole driver will stop writing to it. This is to avoid
288 wear on the flash, and to avoid erasing sectors (which may freeze
289 the SPI controller on skylake).
290
291 The 'CONSOLE' area can be extracted from the FMAP with :
292 cbfstool rom.bin read -r CONSOLE -f console.log
293
294config CONSOLE_SPI_FLASH_BUFFER_SIZE
295 hex "Room allocated for console output in FMAP"
296 default 0x20000
297 depends on CONSOLE_SPI_FLASH
298 help
299 Space allocated for console output storage in FMAP. The default
300 value (128K or 0x20000 bytes) is large enough to accommodate
301 even the BIOS_SPEW level.
302
Husni Faiz67300f82022-09-05 15:23:15 +0530303config CONSOLE_I2C_SMBUS
304 bool "SMBus console output"
305 depends on SOUTHBRIDGE_INTEL_COMMON_SMBUS
306 help
307 Send coreboot debug output to the SMBus.
308 The output can be read with an I2C slave device connected
309 the SMBus. Please refer to the technotes section of the
310 coreboot documentation for more details.
311
312if CONSOLE_I2C_SMBUS
313 comment "Set logging device address and data register address"
314
315config CONSOLE_I2C_SMBUS_SLAVE_ADDRESS
316 hex "I2C slave address of the logging device"
Husni Faizb80535a2022-09-09 17:49:53 +0530317 default 0x48 if SC16IS7XX_INIT
Husni Faiz67300f82022-09-05 15:23:15 +0530318 help
319 I2C address of the device which logs the data.
320
321config CONSOLE_I2C_SMBUS_SLAVE_DATA_REGISTER
322 hex "Data register address of the I2C logging device"
Husni Faizb80535a2022-09-09 17:49:53 +0530323 default 0x00 if SC16IS7XX_INIT
Husni Faiz67300f82022-09-05 15:23:15 +0530324 help
325 This an 8-bit data register.
326
Husni Faizb80535a2022-09-09 17:49:53 +0530327config SC16IS7XX_INIT
328 bool "Initialize SC16IS7XX I2C to UART converter chip"
329 help
330 SC16IS7XX is a slave I2C to UART converter chip. Enabling
331 this option will initialize the chip.
332
333 The default I2C slave address value 0x48 is the address of
334 SC16IS7XX I2C to UART converter chip when the A1 and A0 pins
335 are set to Vcc.
336
337 The default data register address value 0x00 is the data
338 register address of SC16IS7XX I2C to UART converter chip.
339
Husni Faiz67300f82022-09-05 15:23:15 +0530340endif # CONSOLE_I2C_SMBUS
341
Gerd Hoffmannd7c6e442013-05-30 10:32:31 +0200342config CONSOLE_QEMU_DEBUGCON
Gerd Hoffmann038aa292013-05-29 13:06:22 +0200343 bool "QEMU debug console output"
Angel Ponsd6152302020-03-01 14:46:38 +0100344 depends on CPU_QEMU_X86
Gerd Hoffmann038aa292013-05-29 13:06:22 +0200345 default y
346 help
347 Send coreboot debug output to QEMU's isa-debugcon device:
348
349 qemu-system-x86_64 \
350 -chardev file,id=debugcon,path=/dir/file.log \
351 -device isa-debugcon,iobase=0x402,chardev=debugcon
352
Gerd Hoffmannd7c6e442013-05-30 10:32:31 +0200353config CONSOLE_QEMU_DEBUGCON_PORT
Gerd Hoffmann038aa292013-05-29 13:06:22 +0200354 hex "QEMU debug console port"
Gerd Hoffmannd7c6e442013-05-30 10:32:31 +0200355 depends on CONSOLE_QEMU_DEBUGCON
Gerd Hoffmann038aa292013-05-29 13:06:22 +0200356 default 0x402
357
Angel Pons12d48cd2020-10-03 12:22:04 +0200358config EM100PRO_SPI_CONSOLE
359 bool "EM100Pro SPI debug console output"
360 depends on HAVE_EM100PRO_SPI_CONSOLE_SUPPORT && !DEBUG_SPI_FLASH
Martin Roth3a543182015-09-28 15:27:24 -0600361 help
362 Enable support for the debug console on the Dediprog EM100Pro.
363 This is currently working only in ramstage due to how the spi
364 drivers are written.
365
Jeremy Soller52785ab2020-07-22 06:40:28 -0600366config CONSOLE_SYSTEM76_EC
367 bool "System76 EC console output"
368 default n
369 depends on EC_SYSTEM76_EC
370 help
371 Send coreboot debug output to a System76 embedded controller.
372
Fred Reitbergera02176d2023-02-01 16:00:54 -0500373config CONSOLE_AMD_SIMNOW
374 bool "AMD SimNow console output"
375 default n
376 depends on SOC_AMD_COMMON && !POST_IO
377 select CONSOLE_POST
378 help
379 Send coreboot debug output to IO ports for SimNow
380
Julien Viard de Galbert4ecd42f2018-02-20 15:01:27 +0100381config CONSOLE_OVERRIDE_LOGLEVEL
Patrick Georgi0bb83462019-11-22 20:58:58 +0100382 bool
Julien Viard de Galbert4ecd42f2018-02-20 15:01:27 +0100383 help
384 Set to "y" when the platform overrides the loglevel by providing
385 a get_console_loglevel routine.
386
387if !CONSOLE_OVERRIDE_LOGLEVEL
388
Uwe Hermann7fe41912009-10-11 13:35:24 +0000389choice
Myles Watson03646182009-10-16 19:29:45 +0000390 prompt "Default console log level"
Julius Wernere64a5852018-10-15 17:19:58 -0700391 default DEFAULT_CONSOLE_LOGLEVEL_8 if CHROMEOS
Nico Huber715a5022018-05-04 12:04:00 +0200392 default DEFAULT_CONSOLE_LOGLEVEL_7
Uwe Hermann7fe41912009-10-11 13:35:24 +0000393
394config DEFAULT_CONSOLE_LOGLEVEL_8
Myles Watson03646182009-10-16 19:29:45 +0000395 bool "8: SPEW"
Myles Watson03646182009-10-16 19:29:45 +0000396 help
397 Way too many details.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000398config DEFAULT_CONSOLE_LOGLEVEL_7
Myles Watson03646182009-10-16 19:29:45 +0000399 bool "7: DEBUG"
Myles Watson03646182009-10-16 19:29:45 +0000400 help
401 Debug-level messages.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000402config DEFAULT_CONSOLE_LOGLEVEL_6
Myles Watson03646182009-10-16 19:29:45 +0000403 bool "6: INFO"
Myles Watson03646182009-10-16 19:29:45 +0000404 help
405 Informational messages.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000406config DEFAULT_CONSOLE_LOGLEVEL_5
Myles Watson03646182009-10-16 19:29:45 +0000407 bool "5: NOTICE"
Myles Watson03646182009-10-16 19:29:45 +0000408 help
409 Normal but significant conditions.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000410config DEFAULT_CONSOLE_LOGLEVEL_4
Myles Watson03646182009-10-16 19:29:45 +0000411 bool "4: WARNING"
Myles Watson03646182009-10-16 19:29:45 +0000412 help
413 Warning conditions.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000414config DEFAULT_CONSOLE_LOGLEVEL_3
Myles Watson03646182009-10-16 19:29:45 +0000415 bool "3: ERR"
Myles Watson03646182009-10-16 19:29:45 +0000416 help
417 Error conditions.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000418config DEFAULT_CONSOLE_LOGLEVEL_2
Myles Watson03646182009-10-16 19:29:45 +0000419 bool "2: CRIT"
Myles Watson03646182009-10-16 19:29:45 +0000420 help
421 Critical conditions.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000422config DEFAULT_CONSOLE_LOGLEVEL_1
Myles Watson03646182009-10-16 19:29:45 +0000423 bool "1: ALERT"
Myles Watson03646182009-10-16 19:29:45 +0000424 help
425 Action must be taken immediately.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000426config DEFAULT_CONSOLE_LOGLEVEL_0
Myles Watson03646182009-10-16 19:29:45 +0000427 bool "0: EMERG"
428 help
429 System is unusable.
Uwe Hermann7fe41912009-10-11 13:35:24 +0000430
431endchoice
432
Patrick Georgi0588d192009-08-12 15:00:51 +0000433config DEFAULT_CONSOLE_LOGLEVEL
Uwe Hermann7fe41912009-10-11 13:35:24 +0000434 int
435 default 0 if DEFAULT_CONSOLE_LOGLEVEL_0
436 default 1 if DEFAULT_CONSOLE_LOGLEVEL_1
437 default 2 if DEFAULT_CONSOLE_LOGLEVEL_2
438 default 3 if DEFAULT_CONSOLE_LOGLEVEL_3
439 default 4 if DEFAULT_CONSOLE_LOGLEVEL_4
440 default 5 if DEFAULT_CONSOLE_LOGLEVEL_5
441 default 6 if DEFAULT_CONSOLE_LOGLEVEL_6
442 default 7 if DEFAULT_CONSOLE_LOGLEVEL_7
443 default 8 if DEFAULT_CONSOLE_LOGLEVEL_8
444 help
445 Map the log level config names to an integer.
Patrick Georgi0588d192009-08-12 15:00:51 +0000446
Julien Viard de Galbert4ecd42f2018-02-20 15:01:27 +0100447endif
448
Igor Bagnuckif0d65212022-03-03 11:41:57 +0100449config CONSOLE_USE_LOGLEVEL_PREFIX
450 bool "Use loglevel prefix to indicate line loglevel"
451 default y
452 help
453 When enabled, if the code contains a:
454 `printk(BIOS_DEBUG, "This is a debug message!\n")`,
455 it will show up as:
456 `[DEBUG] This is a debug message!`
457
Julius Wernera120e0d2022-01-21 15:24:12 -0800458config CONSOLE_USE_ANSI_ESCAPES
459 bool "Use ANSI escape sequences for console highlighting"
Zheng Baoddf8d192023-03-29 10:39:32 +0800460 default y if !CONSOLE_AMD_SIMNOW
Julius Wernera120e0d2022-01-21 15:24:12 -0800461 help
462 If enabled, certain consoles (e.g. UART) that are meant to be read on
463 a terminal will use ANSI escape sequences (like `ESC [1m`) to
464 highlight lines based on their log level. Disable this if your
465 terminal does not support ANSI escape sequences.
466
Stefan Reinauerc719f1a2010-03-30 09:57:28 +0000467config NO_POST
468 bool "Don't show any POST codes"
469 default n
470
Duncan Laurieb6e97b12012-09-09 19:09:56 -0700471config CMOS_POST
472 bool "Store post codes in CMOS for debugging"
Stefan Reinauerc2d5a162012-12-06 14:25:27 -0800473 depends on !NO_POST && PC80_SYSTEM
Duncan Laurieb6e97b12012-09-09 19:09:56 -0700474 default n
475 help
476 If enabled, coreboot will store post codes in CMOS and switch between
477 two offsets on each boot so the last post code in the previous boot
478 can be retrieved. This uses 3 bytes of CMOS.
479
480config CMOS_POST_OFFSET
481 hex "Offset into CMOS to store POST codes"
482 depends on CMOS_POST
Martin Roth3b878122016-09-30 14:43:01 -0600483 default 0x0
Duncan Laurieb6e97b12012-09-09 19:09:56 -0700484 help
485 If CMOS_POST is enabled then an offset into CMOS must be provided.
486 If CONFIG_HAVE_OPTION_TABLE is enabled then it will use the value
487 defined in the mainboard option table.
488
Daniele Forsiad488d22014-07-30 12:23:35 +0200489config CONSOLE_POST
Idwer Vollering5809a732014-03-11 15:36:21 +0000490 bool "Show POST codes on the debug console"
491 depends on !NO_POST
492 default n
493 help
494 If enabled, coreboot will additionally print POST codes (which are
495 usually displayed using a so-called "POST card" ISA/PCI/PCI-E
496 device) on the debug console.
497
498config POST_DEVICE
499 bool "Send POST codes to an external device"
500 depends on !NO_POST
501 default y
502
503choice
504 prompt "Device to send POST codes to"
505 depends on POST_DEVICE
Kyösti Mälkki657d68b2019-12-03 12:36:09 +0200506 default POST_DEVICE_LPC if DEFAULT_POST_ON_LPC
Idwer Vollering5809a732014-03-11 15:36:21 +0000507 default POST_DEVICE_NONE
508
509config POST_DEVICE_NONE
510 bool "None"
511config POST_DEVICE_LPC
512 bool "LPC"
Vladimir Serbinenkod51a0892016-03-04 09:20:20 +0100513 depends on PCI
Idwer Vollering5809a732014-03-11 15:36:21 +0000514config POST_DEVICE_PCI_PCIE
515 bool "PCI/PCIe"
Vladimir Serbinenkod51a0892016-03-04 09:20:20 +0100516 depends on PCI
Idwer Vollering5809a732014-03-11 15:36:21 +0000517endchoice
518
Kyösti Mälkki657d68b2019-12-03 12:36:09 +0200519config DEFAULT_POST_ON_LPC
520 bool
521 default n
522
Idwer Vollering5809a732014-03-11 15:36:21 +0000523config POST_IO
David Hendricks6b908d02012-11-05 12:34:09 -0800524 bool "Send POST codes to an IO port"
Idwer Vollering5809a732014-03-11 15:36:21 +0000525 depends on PC80_SYSTEM && !NO_POST
David Hendricks6b908d02012-11-05 12:34:09 -0800526 default y
527 help
528 If enabled, POST codes will be written to an IO port.
Stefan Reinauerc719f1a2010-03-30 09:57:28 +0000529
Idwer Vollering5809a732014-03-11 15:36:21 +0000530config POST_IO_PORT
531 depends on POST_IO
David Hendricks6b908d02012-11-05 12:34:09 -0800532 hex "IO port for POST codes"
533 default 0x80
534 help
535 POST codes on x86 are typically written to the LPC bus on port
Daniele Forsi53847a22014-07-22 18:00:56 +0200536 0x80. However, it may be desirable to change the port number
David Hendricks6b908d02012-11-05 12:34:09 -0800537 depending on the presence of coprocessors/microcontrollers or if the
538 platform does not support IO in the conventional x86 manner.
539
Martin Roth14554372015-11-12 14:02:42 -0700540config NO_EARLY_BOOTBLOCK_POSTCODES
541 def_bool n
542 help
543 Some chipsets require that the routing for the port 80h POST
Martin Roth8a85a842021-06-21 09:18:46 -0600544 code be configured before any POST codes are sent out. If this is
545 not done, the system can hang on the first POST code. This
546 initialization can be done in the boot block, but there are a couple
547 of POST codes that go out before the chipset's C bootblock
548 initialization can happen. This option suppresses all postcodes in
549 the early assembly code.
Martin Roth14554372015-11-12 14:02:42 -0700550
Nico Huberc83239e2016-10-05 17:46:49 +0200551config HWBASE_DEBUG_CB
552 bool
553 default y if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8
554 default n
555
556config HWBASE_DEBUG_NULL
557 def_bool y
558 depends on !HWBASE_DEBUG_CB
559
David Hendricks6b908d02012-11-05 12:34:09 -0800560endmenu