2 * This file is part of the Palacios Virtual Machine Monitor developed
3 * by the V3VEE Project with funding from the United States National
4 * Science Foundation and the Department of Energy.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
10 * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
26 #include <palacios/vmm_types.h>
27 #include <palacios/vmm_util.h>
28 #include <palacios/vmm_rbtree.h>
30 typedef struct rb_root v3_io_map_t;
35 void v3_init_io_map(struct guest_info * info);
41 int v3_hook_io_port(struct guest_info * info, uint_t port,
42 int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data),
43 int (*write)(ushort_t port, void * src, uint_t length, void * priv_data),
46 int v3_unhook_io_port(struct guest_info * info, uint_t port);
54 // Reads data into the IO port (IN, INS)
55 int (*read)(ushort_t port, void * dst, uint_t length, void * priv_data);
57 // Writes data from the IO port (OUT, OUTS)
58 int (*write)(ushort_t port, void * src, uint_t length, void * priv_data);
62 struct rb_node tree_node;
67 struct v3_io_hook * v3_get_io_hook(struct guest_info * info, uint_t port);
70 void v3_print_io_map(struct guest_info * info);
75 void v3_outb(ushort_t port, uchar_t value);
76 uchar_t v3_inb(ushort_t port);
78 void v3_outw(ushort_t port, ushort_t value);
79 ushort_t v3_inw(ushort_t port);
81 void v3_outdw(ushort_t port, uint_t value);
82 uint_t v3_indw(ushort_t port);