1 ## SPDX-License-Identifier: GPL-2.0-only
5 config NO_BOOTBLOCK_CONSOLE
7 depends on SEPARATE_ROMSTAGE
9 config BOOTBLOCK_CONSOLE
10 bool "Enable early (bootblock) console output."
11 depends on !NO_BOOTBLOCK_CONSOLE
14 Use console during the bootblock if supported
16 config POSTCAR_CONSOLE
17 bool "Enable console output during postcar."
18 depends on POSTCAR_STAGE
21 Use console during the postcar if supported
23 config SQUELCH_EARLY_SMP
24 bool "Squelch AP CPUs from early console."
28 When selected only the BSP CPU will output to early console.
30 Console drivers have unpredictable behaviour if multiple threads
31 attempt to share the same resources without a spinlock.
36 bool "Serial port console output"
38 depends on DRIVERS_UART
40 Send coreboot debug output to a serial port.
42 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.
46 config FIXED_UART_FOR_CONSOLE
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).
53 if CONSOLE_SERIAL || CONSOLE_CBMEM_DUMP_TO_UART
55 comment "I/O mapped, 8250-compatible"
56 depends on DRIVERS_UART_8250IO
58 comment "memory mapped, 8250-compatible"
59 depends on DRIVERS_UART_8250MEM
61 comment "device-specific UART"
62 depends on HAVE_UART_SPECIAL
64 config OVERRIDE_UART_FOR_CONSOLE
67 Set to "y" when the platform overrides the index of uart port by providing
68 a get_uart_for_console routine.
70 if !OVERRIDE_UART_FOR_CONSOLE
72 config UART_FOR_CONSOLE
74 prompt "Index for UART port to use for console" if !FIXED_UART_FOR_CONSOLE
77 Select an I/O port to use for serial console:
78 0 = 0x3f8, 1 = 0x2f8, 2 = 0x3e8, 3 = 0x2e8
80 # FIXME: Early programming in romstage is incorrect as we should
81 # program different LDN to actually change the physical port.
84 depends on DRIVERS_UART
85 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
90 Map the COM port number to the respective I/O port.
92 comment "Serial port base address = 0x3f8"
93 depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 0
94 comment "Serial port base address = 0x2f8"
95 depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 1
96 comment "Serial port base address = 0x3e8"
97 depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 2
98 comment "Serial port base address = 0x2e8"
99 depends on DRIVERS_UART_8250IO && UART_FOR_CONSOLE = 3
103 config UART_OVERRIDE_BAUDRATE
106 Set to "y" when the platform overrides the baudrate by providing
107 a get_uart_baudrate routine.
109 if !UART_OVERRIDE_BAUDRATE
113 default CONSOLE_SERIAL_115200
115 config CONSOLE_SERIAL_921600
118 Set serial port Baud rate to 921600.
119 config CONSOLE_SERIAL_460800
122 Set serial port Baud rate to 460800.
123 config CONSOLE_SERIAL_230400
126 Set serial port Baud rate to 230400.
127 config CONSOLE_SERIAL_115200
130 Set serial port Baud rate to 115200.
131 config CONSOLE_SERIAL_57600
134 Set serial port Baud rate to 57600.
135 config CONSOLE_SERIAL_38400
138 Set serial port Baud rate to 38400.
139 config CONSOLE_SERIAL_19200
142 Set serial port Baud rate to 19200.
143 config CONSOLE_SERIAL_9600
146 Set serial port Baud rate to 9600.
150 #FIXME(dhendrix): Change name to SERIAL_BAUD? (Stefan sayz: yes!!)
153 default 921600 if CONSOLE_SERIAL_921600
154 default 460800 if CONSOLE_SERIAL_460800
155 default 230400 if CONSOLE_SERIAL_230400
156 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
162 Map the Baud rates to an integer.
166 # TODO: Allow user-friendly selection of settings other than 8n1.
170 depends on DRIVERS_UART_8250IO || DRIVERS_UART_8250MEM
172 endif # CONSOLE_SERIAL
175 bool "spkmodem (console on speaker) console output"
179 Send coreboot debug output through speaker
182 bool "USB dongle console output"
186 Send coreboot debug output to USB.
188 Configuration for USB hardware is under menu Generic Drivers.
191 # TODO: Improve description.
193 bool "Network console over NE2000 compatible Ethernet adapter"
197 Send coreboot debug output to a Ethernet console, it works
198 same way as Linux netconsole, packets are received to UDP
199 port 6666 on IP/MAC specified with options below.
200 Use following netcat command: nc -u -l -p 6666
202 config 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"
207 Type in either MAC address of logging system or MAC address
210 config CONSOLE_NE2K_DST_IP
211 depends on CONSOLE_NE2K
212 string "Destination IP of logging system"
215 This is IP address of the system running for example
216 netcat command to dump the packets.
218 config CONSOLE_NE2K_SRC_IP
219 depends on CONSOLE_NE2K
220 string "IP address of coreboot system"
223 This is the IP of the coreboot system
225 config CONSOLE_NE2K_IO_PORT
226 depends on CONSOLE_NE2K
227 hex "NE2000 adapter fixed IO port address"
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)
236 bool "Send console output to a CBMEM buffer"
239 Enable this to save the console output in a CBMEM buffer. This would
240 allow to see coreboot console output from Linux space.
244 config CONSOLE_CBMEM_BUFFER_SIZE
245 hex "Room allocated for console output in CBMEM"
248 Space allocated for console output storage in CBMEM. The default
249 value (128K or 0x20000 bytes) is large enough to accommodate
250 even the BIOS_SPEW level.
252 config CONSOLE_CBMEM_DUMP_TO_UART
253 depends on !CONSOLE_SERIAL
254 bool "Dump CBMEM console on resets"
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.
261 config CONSOLE_CBMEM_PRINT_PRE_BOOTBLOCK_CONTENTS
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.
271 config CONSOLE_SPI_FLASH
272 bool "SPI Flash console output"
274 depends on BOOT_DEVICE_SPI_FLASH
275 select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if !COMMON_CBFS_SPI_WRAPPER
277 Send coreboot debug output to the SPI Flash in the FMAP CONSOLE area
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.
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).
291 The 'CONSOLE' area can be extracted from the FMAP with :
292 cbfstool rom.bin read -r CONSOLE -f console.log
294 config CONSOLE_SPI_FLASH_BUFFER_SIZE
295 hex "Room allocated for console output in FMAP"
297 depends on CONSOLE_SPI_FLASH
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.
303 config CONSOLE_I2C_SMBUS
304 bool "SMBus console output"
305 depends on SOUTHBRIDGE_INTEL_COMMON_SMBUS
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.
313 comment "Set logging device address and data register address"
315 config CONSOLE_I2C_SMBUS_SLAVE_ADDRESS
316 hex "I2C slave address of the logging device"
317 default 0x48 if SC16IS7XX_INIT
319 I2C address of the device which logs the data.
321 config CONSOLE_I2C_SMBUS_HAVE_DATA_REGISTER
322 bool "Write to a specific data register"
323 default y if SC16IS7XX_INIT
325 Select this to provide a register address that will
326 be sent before every data byte.
328 config CONSOLE_I2C_SMBUS_SLAVE_DATA_REGISTER
329 hex "Data register address of the I2C logging device"
330 depends on CONSOLE_I2C_SMBUS_HAVE_DATA_REGISTER
331 default 0x00 if SC16IS7XX_INIT
333 This an 8-bit data register.
335 config SC16IS7XX_INIT
336 bool "Initialize SC16IS7XX I2C to UART converter chip"
338 SC16IS7XX is a slave I2C to UART converter chip. Enabling
339 this option will initialize the chip.
341 The default I2C slave address value 0x48 is the address of
342 SC16IS7XX I2C to UART converter chip when the A1 and A0 pins
345 The default data register address value 0x00 is the data
346 register address of SC16IS7XX I2C to UART converter chip.
348 endif # CONSOLE_I2C_SMBUS
350 config CONSOLE_QEMU_DEBUGCON
351 bool "QEMU debug console output"
352 depends on CPU_QEMU_X86
355 Send coreboot debug output to QEMU's isa-debugcon device:
358 -chardev file,id=debugcon,path=/dir/file.log \
359 -device isa-debugcon,iobase=0x402,chardev=debugcon
361 config CONSOLE_QEMU_DEBUGCON_PORT
362 hex "QEMU debug console port"
363 depends on CONSOLE_QEMU_DEBUGCON
366 config EM100PRO_SPI_CONSOLE
367 bool "EM100Pro SPI debug console output"
368 depends on HAVE_EM100PRO_SPI_CONSOLE_SUPPORT && !DEBUG_SPI_FLASH
370 Enable support for the debug console on the Dediprog EM100Pro.
371 This is currently working only in ramstage due to how the spi
374 config CONSOLE_SYSTEM76_EC
375 bool "System76 EC console output"
377 depends on EC_SYSTEM76_EC
379 Send coreboot debug output to a System76 embedded controller.
381 config CONSOLE_AMD_SIMNOW
382 bool "AMD SimNow console output"
384 depends on SOC_AMD_COMMON && !POST_IO
387 Send coreboot debug output to IO ports for SimNow
389 config CONSOLE_OVERRIDE_LOGLEVEL
392 Set to "y" when the platform overrides the loglevel by providing
393 a get_console_loglevel routine.
395 if !CONSOLE_OVERRIDE_LOGLEVEL
398 prompt "Default console log level"
399 default DEFAULT_CONSOLE_LOGLEVEL_8 if CHROMEOS
400 default DEFAULT_CONSOLE_LOGLEVEL_7
402 config DEFAULT_CONSOLE_LOGLEVEL_8
405 Way too many details.
406 config DEFAULT_CONSOLE_LOGLEVEL_7
409 Debug-level messages.
410 config DEFAULT_CONSOLE_LOGLEVEL_6
413 Informational messages.
414 config DEFAULT_CONSOLE_LOGLEVEL_5
417 Normal but significant conditions.
418 config DEFAULT_CONSOLE_LOGLEVEL_4
422 config DEFAULT_CONSOLE_LOGLEVEL_3
426 config DEFAULT_CONSOLE_LOGLEVEL_2
430 config DEFAULT_CONSOLE_LOGLEVEL_1
433 Action must be taken immediately.
434 config DEFAULT_CONSOLE_LOGLEVEL_0
441 config DEFAULT_CONSOLE_LOGLEVEL
443 default 0 if DEFAULT_CONSOLE_LOGLEVEL_0
444 default 1 if DEFAULT_CONSOLE_LOGLEVEL_1
445 default 2 if DEFAULT_CONSOLE_LOGLEVEL_2
446 default 3 if DEFAULT_CONSOLE_LOGLEVEL_3
447 default 4 if DEFAULT_CONSOLE_LOGLEVEL_4
448 default 5 if DEFAULT_CONSOLE_LOGLEVEL_5
449 default 6 if DEFAULT_CONSOLE_LOGLEVEL_6
450 default 7 if DEFAULT_CONSOLE_LOGLEVEL_7
451 default 8 if DEFAULT_CONSOLE_LOGLEVEL_8
453 Map the log level config names to an integer.
457 config CONSOLE_USE_LOGLEVEL_PREFIX
458 bool "Use loglevel prefix to indicate line loglevel"
461 When enabled, if the code contains a:
462 `printk(BIOS_DEBUG, "This is a debug message!\n")`,
464 `[DEBUG] This is a debug message!`
466 config CONSOLE_USE_ANSI_ESCAPES
467 bool "Use ANSI escape sequences for console highlighting"
468 default y if !CONSOLE_AMD_SIMNOW
470 If enabled, certain consoles (e.g. UART) that are meant to be read on
471 a terminal will use ANSI escape sequences (like `ESC [1m`) to
472 highlight lines based on their log level. Disable this if your
473 terminal does not support ANSI escape sequences.
476 bool "Don't show any POST codes"
480 bool "Store post codes in CMOS for debugging"
481 depends on !NO_POST && PC80_SYSTEM
484 If enabled, coreboot will store post codes in CMOS and switch between
485 two offsets on each boot so the last post code in the previous boot
486 can be retrieved. This uses 3 bytes of CMOS.
488 config CMOS_POST_OFFSET
489 hex "Offset into CMOS to store POST codes"
493 If CMOS_POST is enabled then an offset into CMOS must be provided.
494 If CONFIG_HAVE_OPTION_TABLE is enabled then it will use the value
495 defined in the mainboard option table.
498 bool "Show POST codes on the debug console"
502 If enabled, coreboot will additionally print POST codes (which are
503 usually displayed using a so-called "POST card" ISA/PCI/PCI-E
504 device) on the debug console.
507 bool "Send POST codes to an external device"
512 prompt "Device to send POST codes to"
513 depends on POST_DEVICE
514 default POST_DEVICE_LPC if DEFAULT_POST_ON_LPC
515 default POST_DEVICE_NONE
517 config POST_DEVICE_NONE
519 config POST_DEVICE_LPC
522 config POST_DEVICE_PCI_PCIE
527 config DEFAULT_POST_ON_LPC
532 bool "Send POST codes to an IO port"
533 depends on PC80_SYSTEM && !NO_POST
536 If enabled, POST codes will be written to an IO port.
540 hex "IO port for POST codes"
543 POST codes on x86 are typically written to the LPC bus on port
544 0x80. However, it may be desirable to change the port number
545 depending on the presence of coprocessors/microcontrollers or if the
546 platform does not support IO in the conventional x86 manner.
548 config NO_EARLY_BOOTBLOCK_POSTCODES
551 Some chipsets require that the routing for the port 80h POST
552 code be configured before any POST codes are sent out. If this is
553 not done, the system can hang on the first POST code. This
554 initialization can be done in the boot block, but there are a couple
555 of POST codes that go out before the chipset's C bootblock
556 initialization can happen. This option suppresses all postcodes in
557 the early assembly code.
559 config HWBASE_DEBUG_CB
561 default y if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8
564 config HWBASE_DEBUG_NULL
566 depends on !HWBASE_DEBUG_CB