Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


svm_io.c now correctly handles segment prefix overrides in ins/outs instructions.
[palacios.git] / palacios / include / devices / generic.h
1 #ifndef __GENERIC_H
2 #define __GENERIC_H
3
4 #include <palacios/vm_dev.h>
5
6 //
7 // The generic device simply hooks ranges of ports, addresses, and irqs
8 // if they are not already hooked
9 //
10 // for each hooked port, it simply executes reads and writes and the same physical port,
11 // for each hooked memory range, it simply executes reads and writes on the same
12 //    physical memory addresses
13 // for each hooked irq, it simply injects the irq into the VM
14 //
15 // These operations are also logged to serial (optionaly)
16 //
17 // If you attach a generic device *last*, you can capture all ops that are not
18 // already hooked, and capture a log of VM activity with respect to them.
19 //
20 // The effects of using the generic device should be identical to 
21 // doing passthrough I/O, but with logging, and, of course, slower
22 //
23
24
25 #define GENERIC_PRINT_AND_PASSTHROUGH 0
26 #define GENERIC_PRINT_AND_IGNORE      1
27
28 // A port range is low..high, inclusive, third value is one of the above
29 typedef uint_t generic_port_range_type[3];
30 // A memory range is low..high, inclusive
31 typedef void *generic_address_range_type[3];
32 // An interrupt ory map range is low..high, inclusive
33 typedef uint_t generic_irq_range_type[3];
34
35 struct vm_device *create_generic(generic_port_range_type    port_ranges[], 
36                                  uint_t                     num_port_ranges,
37                                  generic_address_range_type addess_ranges[],
38                                  uint_t                     num_address_ranges,
39                                  generic_irq_range_type     irq_ranges[],
40                                  uint_t                     num_irqranges);
41
42 #endif