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