ia64/xen-unstable

view extras/mini-os/include/console.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 11d8ca329b54
children
line source
1 /*
2 ****************************************************************************
3 * (C) 2006 - Grzegorz Milos - Cambridge University
4 ****************************************************************************
5 *
6 * File: console.h
7 * Author: Grzegorz Milos
8 * Changes:
9 *
10 * Date: Mar 2006
11 *
12 * Environment: Xen Minimal OS
13 * Description: Console interface.
14 *
15 * Handles console I/O. Defines printk.
16 *
17 ****************************************************************************
18 * Permission is hereby granted, free of charge, to any person obtaining a copy
19 * of this software and associated documentation files (the "Software"), to
20 * deal in the Software without restriction, including without limitation the
21 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
22 * sell copies of the Software, and to permit persons to whom the Software is
23 * furnished to do so, subject to the following conditions:
24 *
25 * The above copyright notice and this permission notice shall be included in
26 * all copies or substantial portions of the Software.
27 *
28 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
34 * DEALINGS IN THE SOFTWARE.
35 */
36 #ifndef _LIB_CONSOLE_H_
37 #define _LIB_CONSOLE_H_
39 #include <mini-os/os.h>
40 #include <mini-os/traps.h>
41 #include <mini-os/types.h>
42 #include <xen/grant_table.h>
43 #include <xenbus.h>
44 #include <xen/io/console.h>
45 #include <stdarg.h>
47 struct consfront_dev {
48 domid_t dom;
50 struct xencons_interface *ring;
51 grant_ref_t ring_ref;
52 evtchn_port_t evtchn;
54 char *nodename;
55 char *backend;
57 xenbus_event_queue events;
59 #ifdef HAVE_LIBC
60 int fd;
61 #endif
62 };
66 void print(int direct, const char *fmt, va_list args);
67 void printk(const char *fmt, ...);
68 void xprintk(const char *fmt, ...);
70 #define tprintk(_fmt, _args...) printk("[%s] " _fmt, current->name, ##_args)
72 void xencons_rx(char *buf, unsigned len, struct pt_regs *regs);
73 void xencons_tx(void);
75 void init_console(void);
76 void console_print(struct consfront_dev *dev, char *data, int length);
77 void fini_console(struct consfront_dev *dev);
79 /* Low level functions defined in xencons_ring.c */
80 extern struct wait_queue_head console_queue;
81 struct consfront_dev *xencons_ring_init(void);
82 struct consfront_dev *init_consfront(char *_nodename);
83 int xencons_ring_send(struct consfront_dev *dev, const char *data, unsigned len);
84 int xencons_ring_send_no_notify(struct consfront_dev *dev, const char *data, unsigned len);
85 int xencons_ring_avail(struct consfront_dev *dev);
86 int xencons_ring_recv(struct consfront_dev *dev, char *data, unsigned len);
87 void free_consfront(struct consfront_dev *dev);
89 #endif /* _LIB_CONSOLE_H_ */