next up previous contents index
Next: 15.13.3 base_cooked_termios: Default termios Up: (X86 PC) Base Environment: Previous: 15.13.1 base_console.h: definitions for

15.13.2 base_console_init: Initialize the base console

   

SYNOPSIS

#include <oskit/x86/base_console.h>

void base_console_init(int argc, char **argv);

DESCRIPTION

This function parses the multiboot command line and optionally initializes the serial lines.

Command line options recognized by the base_console code include:

-f
Enables ``fast'' serial ports. Sets the baud rate of the console and GDB serial ports to 115200.
-h
Enables a serial line console on cons_com_port.
-d
Enables remote GDB on gdb_com_port.

Environment variables recognized include:

CONS_COM
Serial port number (1, 2, 3 or 4) to use as the console. Sets cons_com_port to this value and sets serial_console non-zero.
GDB_COM
Serial port number (1, 2, 3 or 4) to use as the remote GDB interface. Sets gdb_com_port to this value and sets enable_gdb non-zero.
BAUD
Baud rate to use for both the console and GDB serial ports. Any of the standard values in termios.h (section 14.4.31) are valid.

PARAMETERS

argc
Count of command line arguments in argv.
argv
Vector of command line arguments.

DEPENDENCIES

getenv
14.4.17
atoi
14.4.17
base_cooked_termios
15.13.3
base_raw_termios
15.13.4
strcmp
14.4.18
printf
14.6
base_gdt_load
15.7.3
base_critical_enter
15.2.5
base_critical_leave
15.2.5
com_cons_init
15.13.8
com_cons_flush
15.13.11
com_cons_getchar
15.13.9
com_cons_putchar
15.13.10
gdb_pc_com_init
15.18.9
gdb_serial_getchar
15.18.4
gdb_serial_putchar
15.18.5
gdb_serial_puts
15.18.6
gdb_serial_exit
15.18.3
direct_cons_getchar
15.13.5
direct_cons_putchar
15.13.6



Utah Flux Research Group