aboutsummaryrefslogtreecommitdiff
path: root/src/console/Kconfig
blob: 2e4992fec094f304f38607ddae32c82d2df98521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
menu "Console options"

# TODO: Rename to SERIAL_CONSOLE once Kconfig transition is complete.
config CONSOLE_SERIAL8250
	bool "Serial port console output"
	default y
	help
	  Send coreboot debug output to a serial port console.

choice
	prompt "COM port"
	default CONSOLE_SERIAL_COM1
	depends on CONSOLE_SERIAL8250

config CONSOLE_SERIAL_COM1
	bool "COM1/ttyS0"
	help
	  Serial console on COM1/ttyS0.
config CONSOLE_SERIAL_COM2
	bool "COM2/ttyS1"
	help
	  Serial console on COM2/ttyS1.
config CONSOLE_SERIAL_COM3
	bool "COM3/ttyS2"
	help
	  Serial console on COM3/ttyS2.
config CONSOLE_SERIAL_COM4
	bool "COM4/ttyS3"
	help
	  Serial console on COM4/ttyS3.

endchoice

config TTYS0_BASE
	hex
	depends on CONSOLE_SERIAL8250
	default 0x3f8 if CONSOLE_SERIAL_COM1
	default 0x2f8 if CONSOLE_SERIAL_COM2
	default 0x3e8 if CONSOLE_SERIAL_COM3
	default 0x2e8 if CONSOLE_SERIAL_COM4
	help
	  Map the COM port names to the respective I/O port.

choice
	prompt "BAUD rate"
	default CONSOLE_SERIAL_115200
	depends on CONSOLE_SERIAL8250

config CONSOLE_SERIAL_115200
	bool "115200"
	help
	  Set serial port BAUD rate to 115200.
config CONSOLE_SERIAL_57600
	bool "57600"
	help
	  Set serial port BAUD rate to 57600.
config CONSOLE_SERIAL_38400
	bool "38400"
	help
	  Set serial port BAUD rate to 38400.
config CONSOLE_SERIAL_19200
	bool "19200"
	help
	  Set serial port BAUD rate to 19200.
config CONSOLE_SERIAL_9600
	bool "9600"
	help
	  Set serial port BAUD rate to 9600.

endchoice

config TTYS0_BAUD
	int
	default 115200 if CONSOLE_SERIAL_115200
	default 57600 if CONSOLE_SERIAL_57600
	default 38400 if CONSOLE_SERIAL_38400
	default 19200 if CONSOLE_SERIAL_19200
	default 9600 if CONSOLE_SERIAL_9600
	help
	  Map the BAUD rates to an integer.

# TODO: Allow user-friendly selection of settings other than 8n1.
config TTYS0_LCS
	int
	default 3
	depends on CONSOLE_SERIAL8250

config SERIAL_POST
	bool "Show POST codes on the serial port console"
	depends on CONSOLE_SERIAL8250
	default n
	help
	  If enabled, coreboot will additionally print POST codes (which are
	  usually displayed using a so-called "POST card" ISA/PCI/PCI-E
	  device) on the serial console.

# TODO: FIX DEPENDENCY HERE
config USBDEBUG_DIRECT
	bool "USB 2.0 EHCI debug dongle support"
	default n
	help
	  This option allows you to use a so-called USB EHCI Debug device
	  to retrieve the coreboot debug messages (instead, or in addition
	  to, a serial port).

	  This feature is NOT supported on all chipsets in coreboot!

	  It also requires a USB2 controller which supports the EHCI
	  Debug Port capability. Controllers which are known to work:
	
	    * 10b9:5239 ALi Corporation USB 2.0 (USB PCI card)
	    * 8086:24cd Intel ICH4/ICH4-M
	    * 8086:24dd Intel ICH5
	    * 8086:265c Intel ICH6
	    * 8086:268c Intel 631xESB/632xESB/3100
	    * 8086:27cc Intel ICH7
	    * 8086:2836 Intel ICH8
	    * 8086:283a Intel ICH8
	    * 8086:293a Intel ICH9
	    * 10de:0088 NVIDIA MCP2A
	    * 10de:005b NVIDIA CK804
	    * 10de:026e NVIDIA MCP51
	    * 10de:036d NVIDIA MCP55
	    * 10de:03f2 NVIDIA MCP61
	    * 1002:4386 ATI/AMD SB600
	    * 1106:3104 VIA VX800

	  See http://www.coreboot.org/EHCI_Debug_Port for an up-to-date list.

config CONSOLE_VGA
	bool "Use VGA console once initialized"
	default n

# TODO: Deps?
# TODO: Improve description.
config CONSOLE_VGA_ONBOARD_AT_FIRST
	bool "Use onboard VGA as primary video device"
	default n
	help
	  If not selected, the last adapter found will be used.

choice
	prompt "Maximum console log level"
	default MAXIMUM_CONSOLE_LOGLEVEL_8

config MAXIMUM_CONSOLE_LOGLEVEL_8
	bool "8: SPEW"
	help
	  Way too many details.
config MAXIMUM_CONSOLE_LOGLEVEL_7
	bool "7: DEBUG"
	help
	  Debug-level messages.
config MAXIMUM_CONSOLE_LOGLEVEL_6
	bool "6: INFO"
	help
	  Informational messages.
config MAXIMUM_CONSOLE_LOGLEVEL_5
	bool "5: NOTICE"
	help
	  Normal but significant conditions.
config MAXIMUM_CONSOLE_LOGLEVEL_4
	bool "4: WARNING"
	help
	  Warning conditions.
config MAXIMUM_CONSOLE_LOGLEVEL_3
	bool "3: ERR"
	help
	  Error conditions.
config MAXIMUM_CONSOLE_LOGLEVEL_2
	bool "2: CRIT"
	help
	  Critical conditions.
config MAXIMUM_CONSOLE_LOGLEVEL_1
	bool "1: ALERT"
	help
	  Action must be taken immediately.
config MAXIMUM_CONSOLE_LOGLEVEL_0
	bool "0: EMERG"
	help
	  System is unusable.

endchoice

config MAXIMUM_CONSOLE_LOGLEVEL
	int
	default 0 if MAXIMUM_CONSOLE_LOGLEVEL_0
	default 1 if MAXIMUM_CONSOLE_LOGLEVEL_1
	default 2 if MAXIMUM_CONSOLE_LOGLEVEL_2
	default 3 if MAXIMUM_CONSOLE_LOGLEVEL_3
	default 4 if MAXIMUM_CONSOLE_LOGLEVEL_4
	default 5 if MAXIMUM_CONSOLE_LOGLEVEL_5
	default 6 if MAXIMUM_CONSOLE_LOGLEVEL_6
	default 7 if MAXIMUM_CONSOLE_LOGLEVEL_7
	default 8 if MAXIMUM_CONSOLE_LOGLEVEL_8
	help
	  Map the log level config names to an integer.

choice
	prompt "Default console log level"
	default DEFAULT_CONSOLE_LOGLEVEL_8

config DEFAULT_CONSOLE_LOGLEVEL_8
	bool "8: SPEW"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8)
	help
	  Way too many details.
config DEFAULT_CONSOLE_LOGLEVEL_7
	bool "7: DEBUG"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7)
	help
	  Debug-level messages.
config DEFAULT_CONSOLE_LOGLEVEL_6
	bool "6: INFO"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_6)
	help
	  Informational messages.
config DEFAULT_CONSOLE_LOGLEVEL_5
	bool "5: NOTICE"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5)
	help
	  Normal but significant conditions.
config DEFAULT_CONSOLE_LOGLEVEL_4
	bool "4: WARNING"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_4)
	help
	  Warning conditions.
config DEFAULT_CONSOLE_LOGLEVEL_3
	bool "3: ERR"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_4 || MAXIMUM_CONSOLE_LOGLEVEL_3)
	help
	  Error conditions.
config DEFAULT_CONSOLE_LOGLEVEL_2
	bool "2: CRIT"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_4 || MAXIMUM_CONSOLE_LOGLEVEL_3 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_2)
	help
	  Critical conditions.
config DEFAULT_CONSOLE_LOGLEVEL_1
	bool "1: ALERT"
	depends on (MAXIMUM_CONSOLE_LOGLEVEL_8 || MAXIMUM_CONSOLE_LOGLEVEL_7 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_6 || MAXIMUM_CONSOLE_LOGLEVEL_5 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_4 || MAXIMUM_CONSOLE_LOGLEVEL_3 ||\
		    MAXIMUM_CONSOLE_LOGLEVEL_2 || MAXIMUM_CONSOLE_LOGLEVEL_1)
	help
	  Action must be taken immediately.
config DEFAULT_CONSOLE_LOGLEVEL_0
	bool "0: EMERG"
	help
	  System is unusable.

endchoice

config DEFAULT_CONSOLE_LOGLEVEL
	int
	default 0 if DEFAULT_CONSOLE_LOGLEVEL_0
	default 1 if DEFAULT_CONSOLE_LOGLEVEL_1
	default 2 if DEFAULT_CONSOLE_LOGLEVEL_2
	default 3 if DEFAULT_CONSOLE_LOGLEVEL_3
	default 4 if DEFAULT_CONSOLE_LOGLEVEL_4
	default 5 if DEFAULT_CONSOLE_LOGLEVEL_5
	default 6 if DEFAULT_CONSOLE_LOGLEVEL_6
	default 7 if DEFAULT_CONSOLE_LOGLEVEL_7
	default 8 if DEFAULT_CONSOLE_LOGLEVEL_8
	help
	  Map the log level config names to an integer.

endmenu