dbd11f65e83ac1fb1e4d96d29c99f8e6270c5d83
[coreboot.git] / src / console / Kconfig
1 menu "Console"
2 # TODO: Rename to SERIAL_CONSOLE once Kconfig transition is complete.
3 config CONSOLE_SERIAL8250
4         bool "Serial port console output"
5         depends on HAVE_UART_IO_MAPPED
6         default y
7         help
8           Send coreboot debug output to an I/O mapped serial port console.
9
10 config CONSOLE_SERIAL8250MEM
11         bool "Serial port console output (memory mapped)"
12         depends on HAVE_UART_MEMORY_MAPPED
13         help
14           Send coreboot debug output to a memory mapped serial port console.
15
16 choice
17         prompt "Serial port"
18         default CONSOLE_SERIAL_COM1
19         depends on CONSOLE_SERIAL8250
20
21 config CONSOLE_SERIAL_COM1
22         bool "COM1/ttyS0, I/O port 0x3f8"
23         help
24           Serial console on COM1/ttyS0 at I/O port 0x3f8.
25 config CONSOLE_SERIAL_COM2
26         bool "COM2/ttyS1, I/O port 0x2f8"
27         help
28           Serial console on COM2/ttyS1 at I/O port 0x2f8.
29 config CONSOLE_SERIAL_COM3
30         bool "COM3/ttyS2, I/O port 0x3e8"
31         help
32           Serial console on COM3/ttyS2 at I/O port 0x3e8.
33 config CONSOLE_SERIAL_COM4
34         bool "COM4/ttyS3, I/O port 0x2e8"
35         help
36           Serial console on COM4/ttyS3 at I/O port 0x2e8.
37
38 endchoice
39
40 config TTYS0_BASE
41         hex
42         depends on CONSOLE_SERIAL8250
43         default 0x3f8 if CONSOLE_SERIAL_COM1
44         default 0x2f8 if CONSOLE_SERIAL_COM2
45         default 0x3e8 if CONSOLE_SERIAL_COM3
46         default 0x2e8 if CONSOLE_SERIAL_COM4
47         help
48           Map the COM port names to the respective I/O port.
49
50 choice
51         prompt "Baud rate"
52         default CONSOLE_SERIAL_115200
53         depends on CONSOLE_SERIAL8250 || CONSOLE_SERIAL8250MEM
54
55 config CONSOLE_SERIAL_115200
56         bool "115200"
57         help
58           Set serial port Baud rate to 115200.
59 config CONSOLE_SERIAL_57600
60         bool "57600"
61         help
62           Set serial port Baud rate to 57600.
63 config CONSOLE_SERIAL_38400
64         bool "38400"
65         help
66           Set serial port Baud rate to 38400.
67 config CONSOLE_SERIAL_19200
68         bool "19200"
69         help
70           Set serial port Baud rate to 19200.
71 config CONSOLE_SERIAL_9600
72         bool "9600"
73         help
74           Set serial port Baud rate to 9600.
75
76 endchoice
77
78 config TTYS0_BAUD
79         int
80         default 115200 if CONSOLE_SERIAL_115200
81         default 57600 if CONSOLE_SERIAL_57600
82         default 38400 if CONSOLE_SERIAL_38400
83         default 19200 if CONSOLE_SERIAL_19200
84         default 9600 if CONSOLE_SERIAL_9600
85         help
86           Map the Baud rates to an integer.
87
88 # TODO: Allow user-friendly selection of settings other than 8n1.
89 config TTYS0_LCS
90         int
91         default 3
92         depends on CONSOLE_SERIAL8250 || CONSOLE_SERIAL8250MEM
93
94 # Use "select HAVE_USBDEBUG" on southbridges which have Debug Port code.
95 config HAVE_USBDEBUG
96         def_bool n
97
98 config USBDEBUG
99         def_bool n
100
101 config USBDEBUG
102         bool "USB 2.0 EHCI debug dongle support"
103         default n
104         depends on HAVE_USBDEBUG
105         help
106           This option allows you to use a so-called USB EHCI Debug device
107           (such as the Ajays NET20DC, AMIDebug RX, or a system using the
108           Linux "EHCI Debug Device gadget" driver found in recent kernel)
109           to retrieve the coreboot debug messages (instead, or in addition
110           to, a serial port).
111
112           This feature is NOT supported on all chipsets in coreboot!
113
114           It also requires a USB2 controller which supports the EHCI
115           Debug Port capability.
116
117           See http://www.coreboot.org/EHCI_Debug_Port for an up-to-date list
118           of supported controllers.
119
120           If unsure, say N.
121
122 # Note: This option doesn't make sense on Intel ICH / AMD SB600 southbridges
123 # as those hardcode the physical USB port to be used as Debug Port to 1.
124 # It cannot be changed by coreboot.
125 config USBDEBUG_DEFAULT_PORT
126         int "Default USB port to use as Debug Port"
127         default 1
128         depends on USBDEBUG && !SOUTHBRIDGE_INTEL_I82801GX && !SOUTHBRIDGE_AMD_SB600
129         help
130           This option selects which physical USB port coreboot will try to
131           use as EHCI Debug Port first (valid values are: 1-15).
132
133           If coreboot doesn't detect an EHCI Debug Port dongle on this port,
134           it will try all the other ports one after the other. This will take
135           a few seconds of time though, and thus slow down the booting process.
136
137           Hence, if you select the correct port here, you can speed up
138           your boot time. Which USB port number (1-15) refers to which
139           actual port on your mainboard (potentially also USB pin headers
140           on your mainboard) is highly board-specific, and you'll likely
141           have to find out by trial-and-error.
142
143 # TODO: Deps?
144 # TODO: Improve description.
145 config ONBOARD_VGA_IS_PRIMARY
146         bool "Use onboard VGA as primary video device"
147         default n
148         help
149           If not selected, the last adapter found will be used.
150
151 config CONSOLE_NE2K
152         bool "Network console over NE2000 compatible Ethernet adapter"
153         default n
154         help
155           Send coreboot debug output to a Ethernet console, it works
156           same way as Linux netconsole, packets are received to UDP
157           port 6666 on IP/MAC specified with options bellow.
158           Use following netcat command: nc -u -l -p 6666
159
160 config CONSOLE_NE2K_DST_MAC
161         depends on CONSOLE_NE2K
162         string "Destination MAC address of remote system"
163         default "00:13:d4:76:a2:ac"
164         help
165           Type in either MAC address of logging system or MAC address
166           of the router.
167
168 config CONSOLE_NE2K_DST_IP
169         depends on CONSOLE_NE2K
170         string "Destination IP of logging system"
171         default "10.0.1.27"
172         help
173           This is IP adress of the system running for example
174           netcat command to dump the packets.
175
176 config CONSOLE_NE2K_SRC_IP
177         depends on CONSOLE_NE2K
178         string "IP address of coreboot system"
179         default "10.0.1.253"
180         help
181           This is the IP of the coreboot system
182
183 config CONSOLE_NE2K_IO_PORT
184         depends on CONSOLE_NE2K
185         hex "NE2000 adapter fixed IO port address"
186         default 0xe00
187         help
188           This is the IO port address for the IO port
189           on the card, please select some non-conflicting region,
190           32 bytes of IO spaces will be used (and align on 32 bytes
191           boundary, qemu needs broader align)
192
193
194 choice
195         prompt "Maximum console log level"
196         default MAXIMUM_CONSOLE_LOGLEVEL_8
197
198 config MAXIMUM_CONSOLE_LOGLEVEL_8
199         bool "8: SPEW"
200         help
201           Way too many details.
202 config MAXIMUM_CONSOLE_LOGLEVEL_7
203         bool "7: DEBUG"
204         help
205           Debug-level messages.
206 config MAXIMUM_CONSOLE_LOGLEVEL_6
207         bool "6: INFO"
208         help
209           Informational messages.
210 config MAXIMUM_CONSOLE_LOGLEVEL_5
211         bool "5: NOTICE"
212         help
213           Normal but significant conditions.
214 config MAXIMUM_CONSOLE_LOGLEVEL_4
215         bool "4: WARNING"
216         help
217           Warning conditions.
218 config MAXIMUM_CONSOLE_LOGLEVEL_3
219         bool "3: ERR"
220         help
221           Error conditions.
222 config MAXIMUM_CONSOLE_LOGLEVEL_2
223         bool "2: CRIT"
224         help
225           Critical conditions.
226 config MAXIMUM_CONSOLE_LOGLEVEL_1
227         bool "1: ALERT"
228         help
229           Action must be taken immediately.
230 config MAXIMUM_CONSOLE_LOGLEVEL_0
231         bool "0: EMERG"
232         help
233           System is unusable.
234
235 endchoice
236
237 config MAXIMUM_CONSOLE_LOGLEVEL
238         int
239         default 0 if MAXIMUM_CONSOLE_LOGLEVEL_0
240         default 1 if MAXIMUM_CONSOLE_LOGLEVEL_1
241         default 2 if MAXIMUM_CONSOLE_LOGLEVEL_2
242         default 3 if MAXIMUM_CONSOLE_LOGLEVEL_3
243         default 4 if MAXIMUM_CONSOLE_LOGLEVEL_4
244         default 5 if MAXIMUM_CONSOLE_LOGLEVEL_5
245         default 6 if MAXIMUM_CONSOLE_LOGLEVEL_6
246         default 7 if MAXIMUM_CONSOLE_LOGLEVEL_7
247         default 8 if MAXIMUM_CONSOLE_LOGLEVEL_8
248         help
249           Map the log level config names to an integer.
250
251 choice
252         prompt "Default console log level"
253         default DEFAULT_CONSOLE_LOGLEVEL_8
254
255 config DEFAULT_CONSOLE_LOGLEVEL_8
256         bool "8: SPEW"
257         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8)
258         help
259           Way too many details.
260 config DEFAULT_CONSOLE_LOGLEVEL_7
261         bool "7: DEBUG"
262         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7)
263         help
264           Debug-level messages.
265 config DEFAULT_CONSOLE_LOGLEVEL_6
266         bool "6: INFO"
267         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
268                     MAXIMUM_CONSOLE_LOGLEVEL_6)
269         help
270           Informational messages.
271 config DEFAULT_CONSOLE_LOGLEVEL_5
272         bool "5: NOTICE"
273         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
274                     MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5)
275         help
276           Normal but significant conditions.
277 config DEFAULT_CONSOLE_LOGLEVEL_4
278         bool "4: WARNING"
279         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
280                     MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
281                     MAXIMUM_CONSOLE_LOGLEVEL_4)
282         help
283           Warning conditions.
284 config DEFAULT_CONSOLE_LOGLEVEL_3
285         bool "3: ERR"
286         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
287                     MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
288                     MAXIMUM_CONSOLE_LOGLEVEL_4 || MAXIMUM_CONSOLE_LOGLEVEL_3)
289         help
290           Error conditions.
291 config DEFAULT_CONSOLE_LOGLEVEL_2
292         bool "2: CRIT"
293         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
294                     MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
295                     MAXIMUM_CONSOLE_LOGLEVEL_4 || MAXIMUM_CONSOLE_LOGLEVEL_3 ||\
296                     MAXIMUM_CONSOLE_LOGLEVEL_2)
297         help
298           Critical conditions.
299 config DEFAULT_CONSOLE_LOGLEVEL_1
300         bool "1: ALERT"
301         depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
302                     MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
303                     MAXIMUM_CONSOLE_LOGLEVEL_4 || MAXIMUM_CONSOLE_LOGLEVEL_3 ||\
304                     MAXIMUM_CONSOLE_LOGLEVEL_2 || MAXIMUM_CONSOLE_LOGLEVEL_1)
305         help
306           Action must be taken immediately.
307 config DEFAULT_CONSOLE_LOGLEVEL_0
308         bool "0: EMERG"
309         help
310           System is unusable.
311
312 endchoice
313
314 config DEFAULT_CONSOLE_LOGLEVEL
315         int
316         default 0 if DEFAULT_CONSOLE_LOGLEVEL_0
317         default 1 if DEFAULT_CONSOLE_LOGLEVEL_1
318         default 2 if DEFAULT_CONSOLE_LOGLEVEL_2
319         default 3 if DEFAULT_CONSOLE_LOGLEVEL_3
320         default 4 if DEFAULT_CONSOLE_LOGLEVEL_4
321         default 5 if DEFAULT_CONSOLE_LOGLEVEL_5
322         default 6 if DEFAULT_CONSOLE_LOGLEVEL_6
323         default 7 if DEFAULT_CONSOLE_LOGLEVEL_7
324         default 8 if DEFAULT_CONSOLE_LOGLEVEL_8
325         help
326           Map the log level config names to an integer.
327
328 config CONSOLE_LOGBUF
329         bool
330         default n
331
332 config NO_POST
333         bool "Don't show any POST codes"
334         default n
335
336 config POST_PORT
337         hex
338         default 0x80
339
340 config CONSOLE_POST
341         bool "Show POST codes on the debug console"
342         depends on !NO_POST
343         default n
344         help
345           If enabled, coreboot will additionally print POST codes (which are
346           usually displayed using a so-called "POST card" ISA/PCI/PCI-E
347           device) on the debug console.
348
349 endmenu
350