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) 2009, Jack Lange <jarusl@cs.northwestern.edu>
11 * Copyright (c) 2009, The V3VEE Project <http://www.v3vee.org>
12 * All rights reserved.
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
20 #ifndef __DEVICES_PCI_TYPES_H__
21 #define __DEVICES_PCI_TYPES_H__
24 #include <palacios/vmm_types.h>
26 // struct pci_device_config
27 struct pci_config_header {
39 uint8_t cache_line_size;
41 uint8_t header_type; // bits 6-0: 00: other, 01: pci-pci bridge, 02: pci-cardbus; bit 7: 1=multifunction
51 uint32_t cardbus_cis_pointer;
52 uint16_t subsystem_vendor_id;
53 uint16_t subsystem_id;
54 uint32_t expansion_rom_address;
55 uint8_t cap_ptr; // capabilities list offset in config space
58 uint8_t intr_line; // 00=none, 01=IRQ1, etc.
59 uint8_t intr_pin; // 00=none, otherwise INTA# to INTD#
60 uint8_t min_grant; // min busmaster time - units of 250ns
61 uint8_t max_latency; // units of 250ns - busmasters
62 } __attribute__((packed));
66 struct pci_class_desc {
71 static struct pci_class_desc pci_class_descriptions[] = {
72 { 0x0100, "SCSI controller"},
73 { 0x0101, "IDE controller"},
74 { 0x0102, "Floppy controller"},
75 { 0x0103, "IPI controller"},
76 { 0x0104, "RAID controller"},
77 { 0x0106, "SATA controller"},
78 { 0x0107, "SAS controller"},
79 { 0x0180, "Storage controller"},
80 { 0x0200, "Ethernet controller"},
81 { 0x0201, "Token Ring controller"},
82 { 0x0202, "FDDI controller"},
83 { 0x0203, "ATM controller"},
84 { 0x0280, "Network controller"},
85 { 0x0300, "VGA controller"},
86 { 0x0301, "XGA controller"},
87 { 0x0302, "3D controller"},
88 { 0x0380, "Display controller"},
89 { 0x0400, "Video controller"},
90 { 0x0401, "Audio controller"},
92 { 0x0480, "Multimedia controller"},
93 { 0x0500, "RAM controller"},
94 { 0x0501, "Flash controller"},
95 { 0x0580, "Memory controller"},
96 { 0x0600, "Host bridge"},
97 { 0x0601, "ISA bridge"},
98 { 0x0602, "EISA bridge"},
99 { 0x0603, "MC bridge"},
100 { 0x0604, "PCI bridge"},
101 { 0x0605, "PCMCIA bridge"},
102 { 0x0606, "NUBUS bridge"},
103 { 0x0607, "CARDBUS bridge"},
104 { 0x0608, "RACEWAY bridge"},
106 { 0x0c03, "USB controller"},