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.


functional DMA reads for IDE disks
[palacios.git] / palacios / include / devices / pci_types.h
1 /* 
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.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2009, Jack Lange <jarusl@cs.northwestern.edu>
11  * Copyright (c) 2009, The V3VEE Project <http://www.v3vee.org> 
12  * All rights reserved.
13  *
14  * Author:  Jack Lange 
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20 #ifndef __DEVICES_PCI_TYPES_H__
21 #define __DEVICES_PCI_TYPES_H__
22
23
24 #include <palacios/vmm_types.h>
25
26 // struct pci_device_config
27 struct pci_config_header {
28     uint16_t   vendor_id;
29     uint16_t   device_id;
30     
31     uint16_t   command;
32     uint16_t   status;
33     
34     
35     uint8_t    revision;
36     uint8_t    prog_if;
37     uint8_t     subclass;
38     uint8_t     class;
39
40     uint8_t    cache_line_size;
41     uint8_t    latency_time;
42     uint8_t    header_type; // bits 6-0: 00: other, 01: pci-pci bridge, 02: pci-cardbus; bit 7: 1=multifunction
43     uint8_t    BIST;  
44     
45
46     uint32_t   BAR0;
47     uint32_t   BAR1;
48     uint32_t   BAR2;
49     uint32_t   BAR3;
50     uint32_t   BAR4;
51     uint32_t   BAR5;
52     uint32_t   cardbus_cis_pointer;
53     uint16_t   subsystem_vendor_id;
54     uint16_t   subsystem_id;
55     uint32_t expansion_rom_address;
56     uint8_t cap_ptr;  // capabilities list offset in config space
57     uint8_t rsvd1[3];
58     uint32_t rsvd2;
59     uint8_t    intr_line; // 00=none, 01=IRQ1, etc.
60     uint8_t    intr_pin;  // 00=none, otherwise INTA# to INTD#
61     uint8_t    min_grant; // min busmaster time - units of 250ns
62     uint8_t    max_latency; // units of 250ns - busmasters
63 } __attribute__((packed));
64
65
66 /*
67   struct pci_class_desc {
68   uint16_t class;
69   const char * desc;
70   };
71   
72   static struct pci_class_desc pci_class_descriptions[] = {
73   { 0x0100, "SCSI controller"},
74   { 0x0101, "IDE controller"},
75   { 0x0102, "Floppy controller"},
76   { 0x0103, "IPI controller"},
77   { 0x0104, "RAID controller"},
78   { 0x0106, "SATA controller"},
79   { 0x0107, "SAS controller"},
80   { 0x0180, "Storage controller"},
81   { 0x0200, "Ethernet controller"},
82   { 0x0201, "Token Ring controller"},
83   { 0x0202, "FDDI controller"},
84   { 0x0203, "ATM controller"},
85   { 0x0280, "Network controller"},
86   { 0x0300, "VGA controller"},
87   { 0x0301, "XGA controller"},
88   { 0x0302, "3D controller"},
89   { 0x0380, "Display controller"},
90   { 0x0400, "Video controller"},
91   { 0x0401, "Audio controller"},
92   { 0x0402, "Phone"},
93   { 0x0480, "Multimedia controller"},
94   { 0x0500, "RAM controller"},
95   { 0x0501, "Flash controller"},
96   { 0x0580, "Memory controller"},
97   { 0x0600, "Host bridge"},
98   { 0x0601, "ISA bridge"},
99   { 0x0602, "EISA bridge"},
100   { 0x0603, "MC bridge"},
101   { 0x0604, "PCI bridge"},
102   { 0x0605, "PCMCIA bridge"},
103   { 0x0606, "NUBUS bridge"},
104   { 0x0607, "CARDBUS bridge"},
105   { 0x0608, "RACEWAY bridge"},
106   { 0x0680, "Bridge"},
107   { 0x0c03, "USB controller"},
108   { 0, NULL}
109   };
110 */
111
112 #endif
113