Make console maximum/default log level a choice option.
[coreboot.git] / src / console / Kconfig
1 menu "Console options"
2
3 # TODO: Rename to SERIAL_CONSOLE once Kconfig transition is complete.
4 config CONSOLE_SERIAL8250
5         bool "Enable serial port console output"
6         default y
7         help
8           Send coreboot debug output to a serial port console.
9
10 # TODO: COM1, COM2 etc.
11 config TTYS0_BASE
12         hex "I/O base for the serial port"
13         depends on CONSOLE_SERIAL8250
14         default 0x3f8
15
16 config TTYS0_BAUD
17         int "Serial port BAUD rate"
18         depends on CONSOLE_SERIAL8250
19         default 115200
20
21 # TODO: Allow user-friendly selection of settings other than 8n1.
22 config TTYS0_LCS
23         int
24         default 3
25         depends on CONSOLE_SERIAL8250
26
27 config SERIAL_POST
28         bool "Enable POST output on the serial port console"
29         depends on CONSOLE_SERIAL8250
30         default n
31         help
32           If enabled, coreboot will additionally print POST codes (which are
33           usually displayed using a so-called "POST card" ISA/PCI/PCI-E
34           device) on the serial console.
35
36 # TODO: FIX DEPENDENCY HERE
37 config USBDEBUG_DIRECT
38         bool "USB 2.0 EHCI debug dongle support"
39         default n
40         help
41           This option allows you to use a so-called USB EHCI Debug device
42           to retrieve the coreboot debug messages (instead, or in addition
43           to, a serial port).
44
45           This feature is NOT supported on all chipsets in coreboot!
46
47           It also requires a USB2 controller which supports the EHCI
48           Debug Port capability. Controllers which are known to work:
49         
50             * 10b9:5239 ALi Corporation USB 2.0 (USB PCI card)
51             * 8086:24cd Intel ICH4/ICH4-M
52             * 8086:24dd Intel ICH5
53             * 8086:265c Intel ICH6
54             * 8086:268c Intel 631xESB/632xESB/3100
55             * 8086:27cc Intel ICH7
56             * 8086:2836 Intel ICH8
57             * 8086:283a Intel ICH8
58             * 8086:293a Intel ICH9
59             * 10de:0088 NVIDIA MCP2A
60             * 10de:005b NVIDIA CK804
61             * 10de:026e NVIDIA MCP51
62             * 10de:036d NVIDIA MCP55
63             * 10de:03f2 NVIDIA MCP61
64             * 1002:4386 ATI/AMD SB600
65             * 1106:3104 VIA VX800
66
67           See http://www.coreboot.org/EHCI_Debug_Port for an up-to-date list.
68
69 config CONSOLE_VGA
70         bool "Use VGA console once initialized"
71         default n
72
73 # TODO: Deps?
74 # TODO: Improve description.
75 config CONSOLE_VGA_ONBOARD_AT_FIRST
76         bool "Use onboard VGA as primary video device"
77         default n
78         help
79           If not selected, the last adapter found will be used.
80
81 choice
82         prompt "Maximum console log level"
83         default MAXIMUM_CONSOLE_LOGLEVEL_8
84
85 config MAXIMUM_CONSOLE_LOGLEVEL_8
86         bool "8: SPEW"
87         help
88           Way too many details.
89 config MAXIMUM_CONSOLE_LOGLEVEL_7
90         bool "7: DEBUG"
91         help
92           Debug-level messages.
93 config MAXIMUM_CONSOLE_LOGLEVEL_6
94         bool "6: INFO"
95         help
96           Informational messages.
97 config MAXIMUM_CONSOLE_LOGLEVEL_5
98         bool "5: NOTICE"
99         help
100           Normal but significant conditions.
101 config MAXIMUM_CONSOLE_LOGLEVEL_4
102         bool "4: WARNING"
103         help
104           Warning conditions.
105 config MAXIMUM_CONSOLE_LOGLEVEL_3
106         bool "3: ERR"
107         help
108           Error conditions.
109 config MAXIMUM_CONSOLE_LOGLEVEL_2
110         bool "2: CRIT"
111         help
112           Critical conditions.
113 config MAXIMUM_CONSOLE_LOGLEVEL_1
114         bool "1: ALERT"
115         help
116           Action must be taken immediately.
117 config MAXIMUM_CONSOLE_LOGLEVEL_0
118         bool "0: EMERG"
119         help
120           System is unusable.
121
122 endchoice
123
124 config MAXIMUM_CONSOLE_LOGLEVEL
125         int
126         default 0 if MAXIMUM_CONSOLE_LOGLEVEL_0
127         default 1 if MAXIMUM_CONSOLE_LOGLEVEL_1
128         default 2 if MAXIMUM_CONSOLE_LOGLEVEL_2
129         default 3 if MAXIMUM_CONSOLE_LOGLEVEL_3
130         default 4 if MAXIMUM_CONSOLE_LOGLEVEL_4
131         default 5 if MAXIMUM_CONSOLE_LOGLEVEL_5
132         default 6 if MAXIMUM_CONSOLE_LOGLEVEL_6
133         default 7 if MAXIMUM_CONSOLE_LOGLEVEL_7
134         default 8 if MAXIMUM_CONSOLE_LOGLEVEL_8
135         help
136           Map the log level config names to an integer.
137
138 choice
139         prompt "Default console log level"
140         default DEFAULT_CONSOLE_LOGLEVEL_8
141
142 config DEFAULT_CONSOLE_LOGLEVEL_8
143         bool "8: SPEW"
144         help
145           Way too many details.
146 config DEFAULT_CONSOLE_LOGLEVEL_7
147         bool "7: DEBUG"
148         help
149           Debug-level messages.
150 config DEFAULT_CONSOLE_LOGLEVEL_6
151         bool "6: INFO"
152         help
153           Informational messages.
154 config DEFAULT_CONSOLE_LOGLEVEL_5
155         bool "5: NOTICE"
156         help
157           Normal but significant conditions.
158 config DEFAULT_CONSOLE_LOGLEVEL_4
159         bool "4: WARNING"
160         help
161           Warning conditions.
162 config DEFAULT_CONSOLE_LOGLEVEL_3
163         bool "3: ERR"
164         help
165           Error conditions.
166 config DEFAULT_CONSOLE_LOGLEVEL_2
167         bool "2: CRIT"
168         help
169           Critical conditions.
170 config DEFAULT_CONSOLE_LOGLEVEL_1
171         bool "1: ALERT"
172         help
173           Action must be taken immediately.
174 config DEFAULT_CONSOLE_LOGLEVEL_0
175         bool "0: EMERG"
176         help
177           System is unusable.
178
179 endchoice
180
181 config DEFAULT_CONSOLE_LOGLEVEL
182         int
183         default 0 if DEFAULT_CONSOLE_LOGLEVEL_0
184         default 1 if DEFAULT_CONSOLE_LOGLEVEL_1
185         default 2 if DEFAULT_CONSOLE_LOGLEVEL_2
186         default 3 if DEFAULT_CONSOLE_LOGLEVEL_3
187         default 4 if DEFAULT_CONSOLE_LOGLEVEL_4
188         default 5 if DEFAULT_CONSOLE_LOGLEVEL_5
189         default 6 if DEFAULT_CONSOLE_LOGLEVEL_6
190         default 7 if DEFAULT_CONSOLE_LOGLEVEL_7
191         default 8 if DEFAULT_CONSOLE_LOGLEVEL_8
192         help
193           Map the log level config names to an integer.
194
195 endmenu
196