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>
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)(uint16_t port, void * dst, uint_t length, void * priv_data),
43 int (*write)(uint16_t port, void * src, uint_t length, void * priv_data),
46 int v3_unhook_io_port(struct guest_info * info, uint_t port);
55 // Reads data into the IO port (IN, INS)
56 int (*read)(uint16_t port, void * dst, uint_t length, void * priv_data);
58 // Writes data from the IO port (OUT, OUTS)
59 int (*write)(uint16_t port, void * src, uint_t length, void * priv_data);
65 struct rb_node tree_node;
72 int (*update_map)(struct guest_info * info, uint16_t port, int hook_read, int hook_write);
77 struct v3_io_hook * v3_get_io_hook(struct guest_info * info, uint_t port);
80 void v3_print_io_map(struct guest_info * info);
85 void v3_outb(uint16_t port, uint8_t value);
86 uint8_t v3_inb(uint16_t port);
88 void v3_outw(uint16_t port, uint16_t value);
89 uint16_t v3_inw(uint16_t port);
91 void v3_outdw(uint16_t port, uint_t value);
92 uint_t v3_indw(uint16_t port);