ia64/xen-unstable

view xen/include/xeno/console.h @ 938:eaaf88bbc222

bitkeeper revision 1.597 (3fb26743975c08pGlW-UntXWf-IBnQ)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/br260/xeno.bk
author br260@labyrinth.cl.cam.ac.uk
date Wed Nov 12 17:00:51 2003 +0000 (2003-11-12)
parents 203cbb0ec54e 106bc1c68738
children 151801bd4e5e
line source
1 /******************************************************************************
2 * xeno/console.h
3 *
4 * Xen header file concerning console access.
5 *
6 * Copyright (c) 2003 James Scott, Intel Research Cambridge
7 */
9 /*
10 * Ownership of console --- currently hardwired to dom0. This is used to see
11 * who gets the PS/2 keyboard/mouse events
12 */
14 #define CONSOLE_ISOWNER(p) (p->domain == 0)
15 #define CONSOLE_OWNER (find_domain_by_id(0))
18 /*
19 * Xen output redirection (in common/kernel.c)
20 *
21 * This is coarsely done right now -
22 * - a boot-time option for console output
23 * - a compile-time option for serial output and console output
24 *
25 * Really, when starting up a guest os with console privilege, we should:
26 * - reset the video to a known state
27 * - stop sending characters (clear 'opt_console')
28 * - allow the guest os access to the video RAM area and keyboard
29 * Similarly, when stopping that guest os, we should:
30 * - stop allowing the guest os access to video RAM
31 * - reset the video to a known state
32 * - start sending it console output again (if we so desire)
33 *
34 * Resetting the video to a known state has not been explored yet, although
35 * Xen resets to a VGA text mode at start of day. Also, the notion of
36 * privileges for guest os's (e.g. console privilege) has not been explored
37 * yet, so this will do for now.
38 */
40 #define CONFIG_OUTPUT_SERIAL 1
41 #define CONFIG_OUTPUT_CONSOLE 1
42 #define CONFIG_OUTPUT_CONSOLE_RING 1
44 extern int opt_console;
46 #define CONSOLE_RING_SIZE 16392
48 typedef struct console_ring_st
49 {
50 char buf[CONSOLE_RING_SIZE];
51 unsigned int len;
52 } console_ring_t;
54 console_ring_t console_ring;
56 void init_console_ring();
57 long read_console_ring(char *str, unsigned int count);