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.


05d91989876f9359082e286faf11fcb71b2f0c18
[palacios-OLD.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 // A port range is low..high, inclusive
26 typedef uint_t generic_port_range_type[2];
27 // A memory range is low..high, inclusive
28 typedef void *generic_address_range_type[2];
29 // An interrupt ory map range is low..high, inclusive
30 typedef uint_t generic_irq_range_type[2];
31
32 struct vm_device *create_generic(generic_port_range_type    port_ranges[], 
33                                  uint_t                     num_port_ranges,
34                                  generic_address_range_type addess_ranges[],
35                                  uint_t                     num_address_ranges,
36                                  generic_irq_range_type     irq_ranges[],
37                                  uint_t                     num_irqranges);
38
39 #endif