Kernel console
[Miscellanea]


Files

file  chardev.h
file  cmd.h
file  console.h
file  kconsole.h
file  chardev.c
file  cmd.c
 Kernel console command wrappers.
file  console.c
file  kconsole.c
 Kernel console.

Modules

 KLog
 Kernel logging facility.

Data Structures

struct  chardev_operations
struct  chardev
struct  cmd_arg
struct  cmd_info

Defines

#define CHARDEV_BUFLEN   512
#define MAX_CMDLINE   256
#define KCONSOLE_HISTORY   10
#define BUFLEN   2048

Typedefs

typedef chardev_operations chardev_operations_t

Enumerations

enum  cmd_arg_type { ARG_TYPE_INVALID = 0, ARG_TYPE_INT, ARG_TYPE_STRING, ARG_TYPE_VAR }

Functions

void chardev_initialize (char *name, chardev_t *chardev, chardev_operations_t *op)
void chardev_push_character (chardev_t *chardev, __u8 ch)
void cmd_initialize (cmd_info_t *cmd)
void cmd_init (void)
__u8 getc (chardev_t *chardev)
__u8 _getc (chardev_t *chardev)
count_t gets (chardev_t *chardev, char *buf, size_t buflen)
void putchar (char c)
void arch_grab_console (void)
void arch_release_console (void)
void kconsole_init (void)
void kconsole (void *prompt)
int cmd_register (cmd_info_t *cmd)
static int cmd_help (cmd_arg_t *argv)
static int cmd_continue (cmd_arg_t *argv)
static int cmd_desc (cmd_arg_t *argv)
static void desc_help (void)
static int cmd_symaddr (cmd_arg_t *argv)
static int cmd_set4 (cmd_arg_t *argv)
static int cmd_call0 (cmd_arg_t *argv)
static int cmd_call1 (cmd_arg_t *argv)
static int cmd_call2 (cmd_arg_t *argv)
static int cmd_call3 (cmd_arg_t *argv)
static int cmd_halt (cmd_arg_t *argv)
static int cmd_tlb (cmd_arg_t *argv)
static int cmd_threads (cmd_arg_t *argv)
static int cmd_tasks (cmd_arg_t *argv)
static int cmd_sched (cmd_arg_t *argv)
static int cmd_slabs (cmd_arg_t *argv)
static int cmd_zones (cmd_arg_t *argv)
static int cmd_ipc_task (cmd_arg_t *argv)
static int cmd_zone (cmd_arg_t *argv)
static int cmd_cpus (cmd_arg_t *argv)
static int cmd_version (cmd_arg_t *argv)
static void null_putchar (chardev_t *d, const char ch)
 SPINLOCK_INITIALIZE (cmd_lock)
 LIST_INITIALIZE (cmd_head)
static cmd_info_tparse_cmdline (char *cmdline, size_t len)
static bool parse_argument (char *cmdline, size_t len, index_t *start, index_t *end)
static void rdln_print_c (char ch, int count)
static void insert_char (char *str, char ch, int pos)
static const char * cmdtab_search_one (const char *name, link_t **startpos)
static int cmdtab_compl (char *name)
static char * clever_readline (const char *prompt, chardev_t *input)
static int parse_int_arg (char *text, size_t len, __native *result)

Variables

chardev_tstdin
chardev_tstdout
spinlock_t cmd_lock
link_t cmd_head
static cmd_info_t help_info
static cmd_info_t exit_info
static cmd_info_t continue_info
static char desc_buf [MAX_CMDLINE+1]
static cmd_arg_t desc_argv
static cmd_info_t desc_info
static char symaddr_buf [MAX_CMDLINE+1]
static cmd_arg_t symaddr_argv
static cmd_info_t symaddr_info
static char set_buf [MAX_CMDLINE+1]
static cmd_arg_t set4_argv []
static cmd_info_t set4_info
static char call0_buf [MAX_CMDLINE+1]
static char carg1_buf [MAX_CMDLINE+1]
static char carg2_buf [MAX_CMDLINE+1]
static char carg3_buf [MAX_CMDLINE+1]
static cmd_arg_t call0_argv
static cmd_info_t call0_info
static cmd_arg_t call1_argv []
static cmd_info_t call1_info
static cmd_arg_t call2_argv []
static cmd_info_t call2_info
static cmd_arg_t call3_argv []
static cmd_info_t call3_info
static cmd_info_t halt_info
cmd_info_t tlb_info
static cmd_info_t threads_info
static cmd_info_t tasks_info
static cmd_info_t sched_info
static cmd_info_t slabs_info
static cmd_info_t zones_info
static cmd_arg_t ipc_task_argv
static cmd_info_t ipc_task_info
static cmd_arg_t zone_argv
static cmd_info_t zone_info
cmd_info_t cpus_info
cmd_info_t version_info
static cmd_info_tbasic_commands []
static char debug_buffer [BUFLEN]
static size_t offset = 0
static chardev_operations_t null_stdout_ops
chardev_t null_stdout
chardev_tstdin = NULL
chardev_tstdout = &null_stdout
static char history [KCONSOLE_HISTORY][MAX_CMDLINE] = {}

Define Documentation

#define BUFLEN   2048
 

Definition at line 47 of file console.c.

Referenced by null_putchar().

#define CHARDEV_BUFLEN   512
 

Definition at line 43 of file chardev.h.

Referenced by _getc(), and chardev_push_character().

#define KCONSOLE_HISTORY   10
 

Definition at line 43 of file kconsole.h.

Referenced by kconsole_init().

#define MAX_CMDLINE   256
 

Definition at line 42 of file kconsole.h.

Referenced by clever_readline().


Typedef Documentation

typedef struct chardev_operations chardev_operations_t
 

Definition at line 54 of file chardev.h.


Enumeration Type Documentation

enum cmd_arg_type
 

Enumerator:
ARG_TYPE_INVALID 
ARG_TYPE_INT 
ARG_TYPE_STRING 
ARG_TYPE_VAR  Variable type - either symbol or string

Definition at line 45 of file kconsole.h.


Function Documentation

__u8 _getc chardev_t chardev  ) 
 

Get character from character device. Do not echo character.

Parameters:
chardev Character device.
Returns:
Character read.

Definition at line 79 of file console.c.

References atomic_get(), chardev::buffer, CHARDEV_BUFLEN, chardev::counter, CPU, cpu_halt(), haltstate, chardev::index, interrupts_disable(), interrupts_restore(), chardev::op, printf(), chardev_operations::read, chardev_operations::resume, spinlock_lock, spinlock_unlock(), waitq_sleep, and chardev::wq.

Referenced by clever_readline(), code_execute(), getc(), and gets().

Here is the call graph for this function:

void arch_grab_console void   ) 
 

Acquire console back for kernel

Definition at line 103 of file ppc64.c.

Referenced by sys_debug_enable_console().

void arch_release_console void   ) 
 

Return console to userspace

Definition at line 109 of file ppc64.c.

Referenced by cmd_continue().

void chardev_initialize char *  name,
chardev_t chardev,
chardev_operations_t op
 

Initialize character device.

Parameters:
chardev Character device.
op Implementation of character device operations.

Definition at line 45 of file chardev.c.

References chardev::counter, chardev::index, chardev::name, chardev::op, spinlock_initialize(), waitq_initialize(), and chardev::wq.

Referenced by fb_init().

Here is the call graph for this function:

void chardev_push_character chardev_t chardev,
__u8  ch
 

Push character read from input character device.

Parameters:
chardev Character device.
ch Character being pushed.

Definition at line 62 of file chardev.c.

References chardev::buffer, CHARDEV_BUFLEN, chardev::counter, chardev::index, chardev::op, spinlock_lock, spinlock_unlock(), chardev_operations::suspend, waitq_wakeup(), WAKEUP_FIRST, and chardev::wq.

Here is the call graph for this function:

static char* clever_readline const char *  prompt,
chardev_t input
[static]
 

Definition at line 243 of file kconsole.c.

References _getc(), cmdtab_compl(), history, insert_char(), MAX_CMDLINE, position, printf(), putchar(), rdln_print_c(), strlen(), strncpy(), and symtab_compl().

Referenced by kconsole().

Here is the call graph for this function:

int cmd_call0 cmd_arg_t argv  )  [static]
 

Call function with zero parameters

Definition at line 480 of file cmd.c.

References cmd_arg::buffer, cmd_call2(), f, get_symbol_addr(), get_symtab_entry(), printf(), and symtab_print_search().

Here is the call graph for this function:

int cmd_call1 cmd_arg_t argv  )  [static]
 

Call function with one parameter

Definition at line 515 of file cmd.c.

References cmd_arg::buffer, cmd_call2(), f, get_symbol_addr(), get_symtab_entry(), cmd_arg::intval, printf(), and symtab_print_search().

Here is the call graph for this function:

int cmd_call2 cmd_arg_t argv  )  [static]
 

Call function with two parameters

Definition at line 552 of file cmd.c.

References cmd_arg::buffer, f, get_symbol_addr(), get_symtab_entry(), cmd_arg::intval, printf(), and symtab_print_search().

Referenced by cmd_call0(), cmd_call1(), and cmd_call3().

Here is the call graph for this function:

int cmd_call3 cmd_arg_t argv  )  [static]
 

Call function with three parameters

Definition at line 590 of file cmd.c.

References cmd_arg::buffer, cmd_call2(), f, get_symbol_addr(), get_symtab_entry(), cmd_arg::intval, printf(), and symtab_print_search().

Here is the call graph for this function:

int cmd_continue cmd_arg_t argv  )  [static]
 

Command for returning console back to userspace.

Parameters:
argv Ignored.
return Always 1.

Definition at line 800 of file cmd.c.

References arch_release_console(), IPC_IRQ_KBDRESTART, ipc_irq_send_msg(), and printf().

Here is the call graph for this function:

int cmd_cpus cmd_arg_t argv  )  [static]
 

Command for listing processors.

Parameters:
argv Ignored.
return Always 1.

Definition at line 776 of file cmd.c.

References cpu_list().

Here is the call graph for this function:

int cmd_desc cmd_arg_t argv  )  [static]
 

Describe specified command.

Parameters:
argv Argument vector.
Returns:
0 on failure, 1 on success.

Definition at line 443 of file cmd.c.

References cmd_arg::buffer, cmd_head, cmd_lock, cmd_info::description, cmd_info::help, list_get_instance, cmd_info::name, link::next, printf(), spinlock_lock, spinlock_unlock(), strlen(), and strncmp().

Here is the call graph for this function:

int cmd_halt cmd_arg_t argv  )  [static]
 

Halt the kernel.

Parameters:
argv Argument vector (ignored).
Returns:
0 on failure, 1 on success (never returns).

Definition at line 641 of file cmd.c.

References halt().

Here is the call graph for this function:

int cmd_help cmd_arg_t argv  )  [static]
 

List supported commands.

Parameters:
argv Argument vector.
Returns:
0 on failure, 1 on success.

Definition at line 415 of file cmd.c.

References cmd_head, cmd_lock, cmd_info::description, list_get_instance, cmd_info::name, link::next, printf(), spinlock_lock, and spinlock_unlock().

Here is the call graph for this function:

void cmd_init void   ) 
 

Initialize and register commands.

Definition at line 396 of file cmd.c.

References basic_commands, cmd_initialize(), cmd_register(), name, and panic.

Referenced by kconsole_init().

Here is the call graph for this function:

void cmd_initialize cmd_info_t cmd  ) 
 

Initialize command info structure.

Parameters:
cmd Command info structure.

Definition at line 389 of file cmd.c.

References cmd_info::link, link_initialize(), and spinlock_initialize().

Referenced by cmd_init(), and exc_init().

Here is the call graph for this function:

int cmd_ipc_task cmd_arg_t argv  )  [static]
 

Command for printing task ipc details

Parameters:
argv Integer argument from cmdline expected
return Always 1

Definition at line 764 of file cmd.c.

References ipc_print_task().

Here is the call graph for this function:

int cmd_register cmd_info_t cmd  ) 
 

Register kconsole command.

Parameters:
cmd Structure describing the command.
Returns:
0 on failure, 1 on success.

Definition at line 103 of file kconsole.c.

References cmd_head, cmd_lock, cmd_info::link, list_append(), list_get_instance, max, cmd_info::name, link::next, spinlock_lock, spinlock_unlock(), strlen(), and strncmp().

Referenced by cmd_init(), and exc_init().

Here is the call graph for this function:

int cmd_sched cmd_arg_t argv  )  [static]
 

Command for listings Thread information

Parameters:
argv Ignores
Returns:
Always 1

Definition at line 731 of file cmd.c.

References sched_print_list().

Here is the call graph for this function:

int cmd_set4 cmd_arg_t argv  )  [static]
 

Write 4 byte value to address

Definition at line 660 of file cmd.c.

References atoi(), cmd_arg::buffer, get_symbol_addr(), cmd_arg::intval, printf(), and symtab_print_search().

Here is the call graph for this function:

int cmd_slabs cmd_arg_t argv  )  [static]
 

Command for listings SLAB caches

Parameters:
argv Ignores
Returns:
Always 1

Definition at line 697 of file cmd.c.

References slab_print_list().

Here is the call graph for this function:

int cmd_symaddr cmd_arg_t argv  )  [static]
 

Search symbol table

Definition at line 472 of file cmd.c.

References cmd_arg::buffer, and symtab_print_search().

Here is the call graph for this function:

int cmd_tasks cmd_arg_t argv  )  [static]
 

Command for listings Task information

Parameters:
argv Ignores
Returns:
Always 1

Definition at line 720 of file cmd.c.

References task_print_list().

Here is the call graph for this function:

int cmd_threads cmd_arg_t argv  )  [static]
 

Command for listings Thread information

Parameters:
argv Ignores
Returns:
Always 1

Definition at line 709 of file cmd.c.

References thread_print_list().

Here is the call graph for this function:

int cmd_tlb cmd_arg_t argv  )  [static]
 

Command for printing TLB contents.

Parameters:
argv Not used.
Returns:
Always returns 1.

Definition at line 653 of file cmd.c.

References tlb_print().

Here is the call graph for this function:

int cmd_version cmd_arg_t argv  )  [static]
 

Command for printing kernel version.

Parameters:
argv Ignored.
return Always 1.

Definition at line 788 of file cmd.c.

References version_print().

Here is the call graph for this function:

int cmd_zone cmd_arg_t argv  )  [static]
 

Command for memory zone details

Parameters:
argv Integer argument from cmdline expected
return Always 1

Definition at line 753 of file cmd.c.

References zone_print_one().

Here is the call graph for this function:

int cmd_zones cmd_arg_t argv  )  [static]
 

Command for listing memory zones

Parameters:
argv Ignored
return Always 1

Definition at line 742 of file cmd.c.

References zone_print_list().

Here is the call graph for this function:

static int cmdtab_compl char *  name  )  [static]
 

Command completion of the commands

Parameters:
name - string to match, changed to hint on exit
Returns:
number of found matches

Definition at line 205 of file kconsole.c.

References cmdtab_search_one(), list_get_instance, MAX_SYMBOL_NAME, link::next, NULL, printf(), strlen(), and strncpy().

Referenced by clever_readline().

Here is the call graph for this function:

static const char* cmdtab_search_one const char *  name,
link_t **  startpos
[static]
 

Try to find a command beginning with prefix

Definition at line 173 of file kconsole.c.

References cmd_head, cmd_lock, list_get_instance, link::next, spinlock_lock, spinlock_unlock(), strlen(), and strncmp().

Referenced by cmdtab_compl().

Here is the call graph for this function:

void desc_help void   )  [static]
 

Print detailed description of 'describe' command.

Definition at line 630 of file cmd.c.

References printf().

Here is the call graph for this function:

__u8 getc chardev_t chardev  ) 
 

Get character from device & echo it to screen

Definition at line 153 of file console.c.

References _getc(), and putchar().

Referenced by exc_print_cmd().

Here is the call graph for this function:

count_t gets chardev_t chardev,
char *  buf,
size_t  buflen
 

Get string from character device.

Read characters from character device until first occurrence of newline character.

Parameters:
chardev Character device.
buf Buffer where to store string terminated by ''.
buflen Size of the buffer.
Returns:
Number of characters read.

Definition at line 124 of file console.c.

References _getc(), and putchar().

Here is the call graph for this function:

static void insert_char char *  str,
char  ch,
int  pos
[static]
 

Insert character to string

Definition at line 163 of file kconsole.c.

References strlen().

Referenced by clever_readline().

Here is the call graph for this function:

void kconsole void *  prompt  ) 
 

Kernel console managing thread.

Parameters:
prompt Kernel console prompt (e.g kconsole/panic).

Definition at line 408 of file kconsole.c.

References cmd_info::argv, clever_readline(), cmd_info::func, min, cmd_info::name, parse_cmdline(), printf(), stdin, strlen(), and strncmp().

Referenced by halt().

Here is the call graph for this function:

void kconsole_init void   ) 
 

Initialize kconsole data structures.

Definition at line 87 of file kconsole.c.

References cmd_init(), history, and KCONSOLE_HISTORY.

Referenced by main_bsp_separated_stack().

Here is the call graph for this function:

LIST_INITIALIZE cmd_head   ) 
 

Command list.

static void null_putchar chardev_t d,
const char  ch
[static]
 

Initialize stdout to something that does not print, but does not fail

Save data in some buffer so that it could be retrieved in the debugger

Definition at line 54 of file console.c.

References BUFLEN, debug_buffer, and offset.

bool parse_argument char *  cmdline,
size_t  len,
index_t start,
index_t end
[static]
 

Parse argument.

Find start and end positions of command line argument.

Parameters:
cmdline Command line as read from the input device.
len Number of characters in cmdline.
start On entry, 'start' contains pointer to the index of first unprocessed character of cmdline. On successful exit, it marks beginning of the next argument.
end Undefined on entry. On exit, 'end' points to the last character of the next argument.
Returns:
false on failure, true on success.

Definition at line 605 of file kconsole.c.

References ASSERT, is_white, and NULL.

Referenced by parse_cmdline().

cmd_info_t * parse_cmdline char *  cmdline,
size_t  len
[static]
 

Parse command line.

Parameters:
cmdline Command line as read from input device.
len Command line length.
Returns:
Structure describing the command.

Definition at line 483 of file kconsole.c.

References cmd_info::argc, cmd_head, cmd_lock, list_get_instance, max, cmd_info::name, link::next, NULL, parse_argument(), printf(), spinlock_lock, spinlock_unlock(), strlen(), and strncmp().

Referenced by kconsole().

Here is the call graph for this function:

static int parse_int_arg char *  text,
size_t  len,
__native result
[static]
 

Definition at line 434 of file kconsole.c.

References atoi(), get_symbol_addr(), MAX_SYMBOL_NAME, min, printf(), strncpy(), and symtab_print_search().

Here is the call graph for this function:

void putchar char  c  ) 
 

Definition at line 162 of file console.c.

References chardev::op, stdout, and chardev_operations::write.

Referenced by clever_readline(), getc(), gets(), rdln_print_c(), sys_io(), and vprintf_write().

static void rdln_print_c char  ch,
int  count
[static]
 

Print count times a character

Definition at line 155 of file kconsole.c.

References putchar().

Referenced by clever_readline().

Here is the call graph for this function:

SPINLOCK_INITIALIZE cmd_lock   ) 
 

Locking.

There is a list of cmd_info_t structures. This list is protected by cmd_lock spinlock. Note that specially the link elements of cmd_info_t are protected by this lock.

Each cmd_info_t also has its own lock, which protects all elements thereof except the link element.

cmd_lock must be acquired before any cmd_info lock. When locking two cmd info structures, structure with lower address must be locked first. Lock protecting command list.


Variable Documentation

cmd_info_t* basic_commands[] [static]
 

Initial value:

Definition at line 358 of file cmd.c.

Referenced by cmd_init().

cmd_arg_t call0_argv [static]
 

Initial value:

 {
        .type = ARG_TYPE_STRING,
        .buffer = call0_buf,
        .len = sizeof(call0_buf)
}

Definition at line 152 of file cmd.c.

char call0_buf[MAX_CMDLINE+1] [static]
 

Definition at line 146 of file cmd.c.

cmd_info_t call0_info [static]
 

Initial value:

 {
        .name = "call0",
        .description = "call0 <function> -> call function().",
        .func = cmd_call0,
        .argc = 1,
        .argv = &call0_argv
}

Definition at line 157 of file cmd.c.

cmd_arg_t call1_argv[] [static]
 

Initial value:

 {
        {
                .type = ARG_TYPE_STRING,
                .buffer = call0_buf,
                .len = sizeof(call0_buf)
        },
        { 
                .type = ARG_TYPE_VAR,
                .buffer = carg1_buf,
                .len = sizeof(carg1_buf)
        }
}

Definition at line 167 of file cmd.c.

cmd_info_t call1_info [static]
 

Initial value:

 {
        .name = "call1",
        .description = "call1 <function> <arg1> -> call function(arg1).",
        .func = cmd_call1,
        .argc = 2,
        .argv = call1_argv
}

Definition at line 179 of file cmd.c.

cmd_arg_t call2_argv[] [static]
 

Initial value:

 {
        {
                .type = ARG_TYPE_STRING,
                .buffer = call0_buf,
                .len = sizeof(call0_buf)
        },
        { 
                .type = ARG_TYPE_VAR,
                .buffer = carg1_buf,
                .len = sizeof(carg1_buf)
        },
        { 
                .type = ARG_TYPE_VAR,
                .buffer = carg2_buf,
                .len = sizeof(carg2_buf)
        }
}

Definition at line 189 of file cmd.c.

cmd_info_t call2_info [static]
 

Initial value:

 {
        .name = "call2",
        .description = "call2 <function> <arg1> <arg2> -> call function(arg1,arg2).",
        .func = cmd_call2,
        .argc = 3,
        .argv = call2_argv
}

Definition at line 206 of file cmd.c.

cmd_arg_t call3_argv[] [static]
 

Initial value:

 {
        {
                .type = ARG_TYPE_STRING,
                .buffer = call0_buf,
                .len = sizeof(call0_buf)
        },
        { 
                .type = ARG_TYPE_VAR,
                .buffer = carg1_buf,
                .len = sizeof(carg1_buf)
        },
        { 
                .type = ARG_TYPE_VAR,
                .buffer = carg2_buf,
                .len = sizeof(carg2_buf)
        },
        { 
                .type = ARG_TYPE_VAR,
                .buffer = carg3_buf,
                .len = sizeof(carg3_buf)
        }

}

Definition at line 216 of file cmd.c.

cmd_info_t call3_info [static]
 

Initial value:

 {
        .name = "call3",
        .description = "call3 <function> <arg1> <arg2> <arg3> -> call function(arg1,arg2,arg3).",
        .func = cmd_call3,
        .argc = 4,
        .argv = call3_argv
}

Definition at line 239 of file cmd.c.

char carg1_buf[MAX_CMDLINE+1] [static]
 

Definition at line 147 of file cmd.c.

char carg2_buf[MAX_CMDLINE+1] [static]
 

Definition at line 148 of file cmd.c.

char carg3_buf[MAX_CMDLINE+1] [static]
 

Definition at line 149 of file cmd.c.

link_t cmd_head
 

Referenced by cmd_desc(), cmd_help(), cmd_register(), cmdtab_search_one(), and parse_cmdline().

spinlock_t cmd_lock
 

Referenced by cmd_desc(), cmd_help(), cmd_register(), cmdtab_search_one(), and parse_cmdline().

cmd_info_t continue_info [static]
 

Initial value:

 {
        .name = "continue",
        .description ="Return console back to userspace.",
        .func = cmd_continue,
        .argc = 0
}

Definition at line 84 of file cmd.c.

cmd_info_t cpus_info
 

Initial value:

 {
        .name = "cpus",
        .description = "List all processors.",
        .help = NULL,
        .func = cmd_cpus,
        .argc = 0,
        .argv = NULL
}

Definition at line 338 of file cmd.c.

char debug_buffer[BUFLEN] [static]
 

Definition at line 48 of file console.c.

Referenced by null_putchar().

cmd_arg_t desc_argv [static]
 

Initial value:

 {
        .type = ARG_TYPE_STRING,
        .buffer = desc_buf,
        .len = sizeof(desc_buf)
}

Definition at line 95 of file cmd.c.

char desc_buf[MAX_CMDLINE+1] [static]
 

Definition at line 94 of file cmd.c.

cmd_info_t desc_info [static]
 

Initial value:

 {
        .name = "describe",
        .description = "Describe specified command.",
        .help = desc_help,
        .func = cmd_desc,
        .argc = 1,
        .argv = &desc_argv
}

Definition at line 100 of file cmd.c.

cmd_info_t exit_info [static]
 

Initial value:

 {
        .name = "exit",
        .description ="Exit kconsole",
        .argc = 0
}

Definition at line 77 of file cmd.c.

cmd_info_t halt_info [static]
 

Initial value:

 {
        .name = "halt",
        .description = "Halt the kernel.",
        .func = cmd_halt,
        .argc = 0
}

Definition at line 249 of file cmd.c.

cmd_info_t help_info [static]
 

Initial value:

 {
        .name = "help",
        .description = "List of supported commands.",
        .func = cmd_help,
        .argc = 0
}

Definition at line 70 of file cmd.c.

char history[KCONSOLE_HISTORY][MAX_CMDLINE] = {} [static]
 

Definition at line 84 of file kconsole.c.

Referenced by clever_readline(), and kconsole_init().

cmd_arg_t ipc_task_argv [static]
 

Initial value:

 {
        .type = ARG_TYPE_INT,
}

Definition at line 311 of file cmd.c.

cmd_info_t ipc_task_info [static]
 

Initial value:

 {
        .name = "ipc_task",
        .description = "ipc_task <taskid> Show IPC information of given task.",
        .func = cmd_ipc_task,
        .argc = 1,
        .argv = &ipc_task_argv
}

Definition at line 314 of file cmd.c.

chardev_t null_stdout
 

Initial value:

 {
        .name = "null",
        .op = &null_stdout_ops
}

Definition at line 64 of file console.c.

chardev_operations_t null_stdout_ops [static]
 

Initial value:

 {
        .write = null_putchar
}

Definition at line 61 of file console.c.

size_t offset = 0 [static]
 

Definition at line 49 of file console.c.

Referenced by null_putchar().

cmd_info_t sched_info [static]
 

Initial value:

 {
        .name = "scheduler",
        .description = "List all scheduler information.",
        .func = cmd_sched,
        .argc = 0
}

Definition at line 285 of file cmd.c.

cmd_arg_t set4_argv[] [static]
 

Initial value:

 {
        {
                .type = ARG_TYPE_STRING,
                .buffer = set_buf,
                .len = sizeof(set_buf)
        },
        { 
                .type = ARG_TYPE_INT
        }
}

Definition at line 127 of file cmd.c.

cmd_info_t set4_info [static]
 

Initial value:

 {
        .name = "set4",
        .description = "set <dest_addr> <value> - 4byte version",
        .func = cmd_set4,
        .argc = 2,
        .argv = set4_argv
}

Definition at line 137 of file cmd.c.

char set_buf[MAX_CMDLINE+1] [static]
 

Definition at line 125 of file cmd.c.

cmd_info_t slabs_info [static]
 

Initial value:

 {
        .name = "slabs",
        .description = "List slab caches.",
        .func = cmd_slabs,
        .argc = 0
}

Definition at line 293 of file cmd.c.

chardev_t* stdin = NULL
 

Standard input character device.

Definition at line 70 of file console.c.

Referenced by exc_print_cmd(), and kconsole().

chardev_t* stdin
 

Standard input character device.

Definition at line 70 of file console.c.

Referenced by exc_print_cmd(), and kconsole().

chardev_t* stdout = &null_stdout
 

Definition at line 71 of file console.c.

Referenced by fb_init(), and putchar().

chardev_t* stdout
 

Definition at line 71 of file console.c.

Referenced by fb_init(), and putchar().

cmd_arg_t symaddr_argv [static]
 

Initial value:

 {
        .type = ARG_TYPE_STRING,
        .buffer = symaddr_buf,
        .len = sizeof(symaddr_buf)
}

Definition at line 112 of file cmd.c.

char symaddr_buf[MAX_CMDLINE+1] [static]
 

Definition at line 111 of file cmd.c.

cmd_info_t symaddr_info [static]
 

Initial value:

 {
        .name = "symaddr",
        .description = "Return symbol address.",
        .func = cmd_symaddr,
        .argc = 1,
        .argv = &symaddr_argv
}

Definition at line 117 of file cmd.c.

cmd_info_t tasks_info [static]
 

Initial value:

 {
        .name = "tasks",
        .description = "List all tasks.",
        .func = cmd_tasks,
        .argc = 0
}

Definition at line 276 of file cmd.c.

cmd_info_t threads_info [static]
 

Initial value:

 {
        .name = "threads",
        .description = "List all threads.",
        .func = cmd_threads,
        .argc = 0
}

Definition at line 268 of file cmd.c.

cmd_info_t tlb_info
 

Initial value:

 {
        .name = "tlb",
        .description = "Print TLB of current processor.",
        .help = NULL,
        .func = cmd_tlb,
        .argc = 0,
        .argv = NULL
}

Definition at line 258 of file cmd.c.

cmd_info_t version_info
 

Initial value:

 {
        .name = "version",
        .description = "Print version information.",
        .help = NULL,
        .func = cmd_version,
        .argc = 0,
        .argv = NULL
}

Definition at line 349 of file cmd.c.

cmd_arg_t zone_argv [static]
 

Initial value:

 {
        .type = ARG_TYPE_INT,
}

Definition at line 324 of file cmd.c.

cmd_info_t zone_info [static]
 

Initial value:

 {
        .name = "zone",
        .description = "Show memory zone structure.",
        .func = cmd_zone,
        .argc = 1,
        .argv = &zone_argv
}

Definition at line 328 of file cmd.c.

cmd_info_t zones_info [static]
 

Initial value:

 {
        .name = "zones",
        .description = "List of memory zones.",
        .func = cmd_zones,
        .argc = 0
}

Definition at line 302 of file cmd.c.


Generated on Sun Jun 18 17:31:35 2006 for HelenOS Kernel (ppc64) by  doxygen 1.4.6