Define some variables that were not defined. There are a couple left.
[coreboot.git] / src / console / Kconfig
index ee6d5474156d3a88a2c310bd5dbc76b4b023bb88..4aa5ed3303584f860f50cda793f003d79194ac6b 100644 (file)
@@ -2,21 +2,82 @@ menu "Console options"
 
 # TODO: Rename to SERIAL_CONSOLE once Kconfig transition is complete.
 config CONSOLE_SERIAL8250
-       bool "Enable serial port console output"
+       bool "Serial port console output"
        default y
        help
          Send coreboot debug output to a serial port console.
 
-# TODO: COM1, COM2 etc.
+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 "I/O base for the serial port"
+       hex
        depends on CONSOLE_SERIAL8250
-       default 0x3f8
+       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.
 
-config TTYS0_BAUD
-       int "Serial port BAUD rate"
+choice
+       prompt "BAUD rate"
+       default CONSOLE_SERIAL_115200
        depends on CONSOLE_SERIAL8250
-       default 115200
+
+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
@@ -25,7 +86,7 @@ config TTYS0_LCS
        depends on CONSOLE_SERIAL8250
 
 config SERIAL_POST
-       bool "Enable POST output on the serial port console"
+       bool "Show POST codes on the serial port console"
        depends on CONSOLE_SERIAL8250
        default n
        help
@@ -78,18 +139,150 @@ config CONSOLE_VGA_ONBOARD_AT_FIRST
        help
          If not selected, the last adapter found will be used.
 
-# TODO: User-friendly "choice" selection.
-# TODO: Add help text.
+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 "Maximum console loglevel"
-       default 9
+       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
 
-# TODO: User-friendly "choice" selection.
-# TODO: Add help text.
 config DEFAULT_CONSOLE_LOGLEVEL
-       int "Default console loglevel"
-       default 9
+       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
 
+config CONSOLE_BTEXT
+       bool
+       default n
+
+config CONSOLE_SROM
+       bool
+       default n
 
+config CONSOLE_LOGBUF
+       bool
+       default n