2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #ifndef _hndrte_cons_h
17 #define _hndrte_cons_h
19 #define CBUF_LEN (128)
21 #define LOG_BUF_LEN 1024
24 u32 buf; /* Can't be pointer on (64-bit) hosts */
27 char *_buf_compat; /* Redundant pointer for backward compat. */
32 * When there is no UART (e.g. Quickturn),
33 * the host should write a complete
34 * input line directly into cbuf and then write
35 * the length into vcons_in.
36 * This may also be used when there is a real UART
37 * (at risk of conflicting with
38 * the real UART). vcons_out is currently unused.
40 volatile uint vcons_in;
41 volatile uint vcons_out;
43 /* Output (logging) buffer
44 * Console output is written to a ring buffer log_buf at index log_idx.
45 * The host may read the output when it sees log_idx advance.
46 * Output will be lost if the output wraps around faster than the host
51 /* Console input line buffer
52 * Characters are read one at a time into cbuf
53 * until <CR> is received, then
54 * the buffer is processed as a command line.
55 * Also used for virtual UART.
61 #endif /* _hndrte_cons_h */