#include "config.h"
#include "libopenbios/bindings.h"
#include "drivers/pci.h"
#include "libc/vsprintf.h"

#include "pci_database.h"

/* PCI devices database */

typedef struct pci_class_t pci_class_t;
typedef struct pci_subclass_t pci_subclass_t;
typedef struct pci_iface_t pci_iface_t;

struct pci_iface_t {
    uint8_t iface;
    const char *name;
    const char *type;
    const pci_dev_t *devices;
    int (*config_cb)(const pci_config_t *config);
    const void *private;
};

struct pci_subclass_t {
    uint8_t subclass;
    const char *name;
    const char *type;
    const pci_dev_t *devices;
    const pci_iface_t *iface;
    int (*config_cb)(const pci_config_t *config);
    const void *private;
};

struct pci_class_t {
    const char *name;
    const char *type;
    const pci_subclass_t *subc;
};

/* Current machine description */

static const pci_subclass_t undef_subclass[] = {
    {
        0xFF, NULL, NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_dev_t scsi_devices[] = {
    {
        /* Legacy virtio-block controller */
        PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_BLOCK,
        NULL, "scsi", NULL,
        "pci1af4,1001\0pci1af4,1001\0pciclass,01018f\0",
        0, 0, 0,
        virtio_blk_config_cb, NULL,
    },
    {
        /* Modern virtio-block controller */
        PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_BLOCK + 0x41,
        NULL, "scsi", NULL,
        "pci1af4,1042\0pci1af4,1042\0pciclass,01018f\0",
        0, 0, 0,
        virtio_blk_config_cb, NULL,
    },
    {
        /* lsi53c810 controller */
        PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_53C810,
        NULL, "lsi53c810", NULL,
        "pci1000,1\0",
        0, 0, 0,
        lsi53c810_config_cb, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_dev_t ide_devices[] = {
    {
        PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_646, /* CMD646 IDE controller */
        "ide", "ide", NULL,
	"pci1095,646\0pci1095,646\0pciclass,01018f\0",
        0, 0, 0,
        ide_config_cb2, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_subclass_t mass_subclass[] = {
    {
        PCI_SUBCLASS_STORAGE_SCSI, "SCSI bus controller",
        "scsi", scsi_devices, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_STORAGE_IDE, "IDE controller",
        "ide", ide_devices, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_STORAGE_FLOPPY, "Floppy disk controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_STORAGE_IPI, "IPI bus controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_STORAGE_RAID, "RAID controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_STORAGE_ATA, "ATA controller",
        "ata", NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_STORAGE_OTHER, "misc mass-storage controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_dev_t eth_devices[] = {
    {
        PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_RTL8029,
        NULL, "NE2000",   "NE2000 PCI",  NULL,
        0, 0, 0,
        NULL, "ethernet",
    },
    {
        PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_RTL8139,
        NULL, "rtl8139",   "RTL8139 PCI",  "pci10ec,8139\0",
        0, 0, 0,
        rtl8139_config_cb, "ethernet",
    },
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC,
        NULL, "ethernet", NULL,  "gmac\0",
        0, 0, 0,
        sungem_config_cb, "ethernet",
    },
    {
        PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_HME,
        NULL, "network", NULL, "SUNW,hme\0",
        0, 0, 0,
        sunhme_config_cb, "ethernet",
    },
    {
        PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E1000,
        NULL, "e1000", NULL,  "pci1086,100e\0",
        0, 0, 0,
        eth_config_cb, "ethernet",
    },
    {
        /* Virtio-network controller */
        PCI_VENDOR_ID_REDHAT_QUMRANET, PCI_DEVICE_ID_VIRTIO_NET,
        NULL, "virtio-net", NULL,
        "pci1af4,1000\0pci1af4,1000\0pciclass,020000\0",
        0, 0, 0,
        NULL, NULL,
    },
    {
        PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE,
        NULL, "pcnet", NULL,  "pci1022,2000\0",
        0, 0, 0,
        eth_config_cb, "ethernet",
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_subclass_t net_subclass[] = {
    {
        PCI_SUBCLASS_NETWORK_ETHERNET, "ethernet controller",
        NULL, eth_devices, NULL,
        eth_config_cb, "ethernet",
    },
    {
        PCI_SUBCLASS_NETWORK_TOKEN_RING, "token ring controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_NETWORK_FDDI, "FDDI controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_NETWORK_ATM, "ATM controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_NETWORK_ISDN, "ISDN controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_NETWORK_WORDFIP, "WordFip controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_NETWORK_PICMG214, "PICMG 2.14 controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_NETWORK_OTHER, "misc network controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_dev_t vga_devices[] = {
    {
        PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RAGE128_PF,
        NULL, "ATY",      "ATY Rage128", "VGA\0",
        0, 0, 0,
        NULL, NULL,
    },
    {
        PCI_VENDOR_ID_QEMU, PCI_DEVICE_ID_QEMU_VGA,
        NULL, "QEMU,VGA", "Qemu VGA",    "VGA\0",
        0, 0, 0,
        NULL, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const struct pci_iface_t vga_iface[] = {
    {
        0x00, "VGA controller", NULL,
        vga_devices, &vga_config_cb, NULL,
    },
    {
        0x01, "8514 compatible controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_subclass_t displ_subclass[] = {
    {
        PCI_SUBCLASS_DISPLAY_VGA, "display controller",
        NULL, NULL, vga_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_DISPLAY_XGA, "XGA display controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_DISPLAY_3D, "3D display controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_DISPLAY_OTHER, "misc display controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t media_subclass[] = {
    {
        PCI_SUBCLASS_MULTIMEDIA_VIDEO, "video device",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_MULTIMEDIA_AUDIO, "audio device",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_MULTIMEDIA_PHONE, "computer telephony device",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_MULTIMEDIA_OTHER, "misc multimedia device",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t mem_subclass[] = {
    {
        PCI_SUBCLASS_MEMORY_RAM, "RAM controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_MEMORY_FLASH, "flash controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};


static const pci_dev_t hbrg_devices[] = {
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U3_AGP, NULL,
        "pci", "AAPL,UniNorth", "u3-agp\0",
        3, 2, 1,
        host_config_cb, NULL,
    },
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_AGP, NULL,
        "pci", "AAPL,UniNorth", "uni-north\0",
        3, 2, 1,
        host_config_cb, NULL,
    },
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_PCI, NULL,
        "pci", "AAPL,UniNorth", "uni-north\0",
        3, 2, 1,
        host_config_cb, NULL,
    },
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_I_PCI, NULL,
        "pci", "AAPL,UniNorth", "uni-north\0",
        3, 2, 1,
        NULL, NULL
    },
    {
        PCI_VENDOR_ID_MOTOROLA, PCI_DEVICE_ID_MOTOROLA_MPC106, "pci",
        "pci", "MOT,MPC106", "grackle\0",
        3, 2, 1,
        host_config_cb, NULL
    },
    {
        PCI_VENDOR_ID_MOTOROLA, PCI_DEVICE_ID_MOTOROLA_RAVEN, NULL,
        "pci", "PREP Host PCI Bridge - Motorola Raven", NULL,
        3, 2, 1,
        host_config_cb, NULL,
    },
    {
        PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_SABRE, NULL,
        "pci", "SUNW,sabre", "pci108e,a000\0pciclass,0\0",
        3, 2, 1,
        sabre_config_cb, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_dev_t PCIbrg_devices[] = {
    {
        PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21154, NULL,
        "pci-bridge", "DEV,21154", "DEV,21154\0pci-bridge\0",
        3, 2, 1,
        bridge_config_cb, NULL,
    },
    {
        PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_SIMBA, NULL,
        "pci", "SUNW,simba", "pci108e,5000\0pciclass,060400\0",
        3, 2, 1,
        simba_config_cb, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_dev_t miscbrg_devices[] = {
    {
        PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, NULL,
        "ebus", "ebus", "pci108e,1000\0pciclass,068000\0",
        2, 1, 1,
        ebus_config_cb, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_dev_t isabrg_devices[] = {
    {
        PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, NULL,
        "isa", "isa", "pci8086,484\0",
        1, 1, 1,
        i82378_config_cb, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_subclass_t bridg_subclass[] = {
    {
        PCI_SUBCLASS_BRIDGE_HOST, "PCI host bridge",
        "pci", hbrg_devices, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_ISA, "ISA bridge",
        "isa", isabrg_devices, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_EISA, "EISA bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_MC, "MCA bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_PCI, "PCI-to-PCI bridge",
        "pci", PCIbrg_devices, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_PCMCIA, "PCMCIA bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_NUBUS, "NUBUS bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_CARDBUS, "cardbus bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_RACEWAY, "raceway bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_PCI_SEMITP, "semi-transparent PCI-to-PCI bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_IB_PCI, "infiniband-to-PCI bridge",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_BRIDGE_OTHER, "misc PCI bridge",
        NULL, miscbrg_devices, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_iface_t serial_iface[] = {
    {
        0x00, "XT serial controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "16450 serial controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x02, "16550 serial controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x03, "16650 serial controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x04, "16750 serial controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x05, "16850 serial controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x06, "16950 serial controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_iface_t par_iface[] = {
    {
        0x00, "parallel port", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "bi-directional parallel port", NULL,
        NULL, NULL, NULL,
    },
    {
        0x02, "ECP 1.x parallel port", NULL,
        NULL, NULL, NULL,
    },
    {
        0x03, "IEEE 1284 controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFE, "IEEE 1284 device", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_iface_t modem_iface[] = {
    {
        0x00, "generic modem", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "Hayes 16450 modem", NULL,
        NULL, NULL, NULL,
    },
    {
        0x02, "Hayes 16550 modem", NULL,
        NULL, NULL, NULL,
    },
    {
        0x03, "Hayes 16650 modem", NULL,
        NULL, NULL, NULL,
    },
    {
        0x04, "Hayes 16750 modem", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_subclass_t comm_subclass[] = {
    {
        PCI_SUBCLASS_COMMUNICATION_SERIAL, "serial controller",
        NULL, NULL, serial_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_COMMUNICATION_PARALLEL, "parallel port",
        NULL, NULL, par_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_COMMUNICATION_MULTISERIAL, "multiport serial controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_COMMUNICATION_MODEM, "modem",
        NULL, NULL, modem_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_COMMUNICATION_GPIB, "GPIB controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_COMMUNICATION_SC, "smart card",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_COMMUNICATION_OTHER, "misc communication device",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_iface_t pic_iface[] = {
    {
        0x00, "8259 PIC", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "ISA PIC", NULL,
        NULL, NULL, NULL,
    },
    {
        0x02, "EISA PIC", NULL,
        NULL, NULL, NULL,
    },
    {
        0x10, "I/O APIC", NULL,
        NULL, NULL, NULL,
    },
    {
        0x20, "I/O APIC", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_iface_t dma_iface[] = {
    {
        0x00, "8237 DMA controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "ISA DMA controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x02, "EISA DMA controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_iface_t tmr_iface[] = {
    {
        0x00, "8254 system timer", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "ISA system timer", NULL,
        NULL, NULL, NULL,
    },
    {
        0x02, "EISA system timer", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_iface_t rtc_iface[] = {
    {
        0x00, "generic RTC controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "ISA RTC controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_dev_t sys_devices[] = {
    /* IBM MPIC controller */
    {
        PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OPENPIC,
        "open-pic", "MPIC", NULL, "chrp,open-pic\0",
        0, 0, 2,
        NULL, NULL,
    },
    /* IBM MPIC2 controller */
    {
        PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OPENPIC2,
        "open-pic", "MPIC2", NULL, "chrp,open-pic\0",
        0, 0, 2,
        NULL, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_subclass_t sys_subclass[] = {
    {
        PCI_SUBCLASS_SYSTEM_PIC, "PIC",
        NULL, NULL, pic_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SYSTEM_DMA, "DMA controller",
        NULL, NULL, dma_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SYSTEM_TIMER, "system timer",
        NULL, NULL, tmr_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SYSTEM_RTC, "RTC controller",
        NULL, NULL, rtc_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SYSTEM_PCI_HOTPLUG, "PCI hotplug controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SYSTEM_OTHER, "misc system peripheral",
        NULL, sys_devices, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t inp_subclass[] = {
    {
        PCI_SUBCLASS_INPUT_KEYBOARD, "keyboard controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_INPUT_PEN, "digitizer",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_INPUT_MOUSE, "mouse controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_INPUT_SCANNER, "scanner controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_INPUT_GAMEPORT, "gameport controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_INPUT_OTHER, "misc input device",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t dock_subclass[] = {
    {
        PCI_SUBCLASS_DOCKING_GENERIC, "generic docking station",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_DOCKING_OTHER, "misc docking station",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t cpu_subclass[] = {
    {
        PCI_SUBCLASS_PROCESSOR_386, "i386 processor",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_PROCESSOR_486, "i486 processor",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_PROCESSOR_PENTIUM, "pentium processor",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_PROCESSOR_ALPHA, "alpha processor",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_PROCESSOR_POWERPC, "PowerPC processor",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_PROCESSOR_MIPS, "MIPS processor",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_PROCESSOR_CO, "co-processor",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_dev_t usb_devices[] = {
#if defined(CONFIG_QEMU)
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_KEYL_USB,
        "usb", "usb", NULL,
	"pci106b,3f\0pciclass,0c0310\0",
        1, 0, 0,
        NULL, NULL,
    },
#endif
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

static const pci_iface_t usb_iface[] = {
    {
        0x00, "UHCI USB controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x10, "OHCI USB controller", NULL,
        usb_devices, &usb_ohci_config_cb, NULL,
    },
    {
        0x20, "EHCI USB controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0x80, "misc USB controller", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFE, "USB device", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_iface_t ipmi_iface[] = {
    {
        0x00, "IPMI SMIC interface", NULL,
        NULL, NULL, NULL,
    },
    {
        0x01, "IPMI keyboard interface", NULL,
        NULL, NULL, NULL,
    },
    {
        0x02, "IPMI block transfer interface", NULL,
        NULL, NULL, NULL,
    },
    {
        0xFF, NULL, NULL,
        NULL, NULL, NULL,
    },
};

static const pci_subclass_t ser_subclass[] = {
    {
        PCI_SUBCLASS_SERIAL_FIREWIRE, "Firewire bus controller",
        "ieee1394", NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_ACCESS, "ACCESS bus controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_SSA, "SSA controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_USB, "USB controller",
        "usb", NULL, usb_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_FIBER, "fibre channel controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_SMBUS, "SMBus controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_IB, "InfiniBand controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_IPMI, "IPMI interface",
        NULL, NULL, ipmi_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_SERCOS, "SERCOS controller",
        NULL, NULL, ipmi_iface,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SERIAL_CANBUS, "CANbus controller",
        NULL, NULL, ipmi_iface,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t wrl_subclass[] = {
    {
        PCI_SUBCLASS_WIRELESS_IRDA, "IRDA controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_WIRELESS_CIR, "consumer IR controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_WIRELESS_RF_CONTROLLER, "RF controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_WIRELESS_BLUETOOTH, "bluetooth controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_WIRELESS_BROADBAND, "broadband controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_WIRELESS_OTHER, "misc wireless controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t sat_subclass[] = {
    {
        PCI_SUBCLASS_SATELLITE_TV, "satellite TV controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SATELLITE_AUDIO, "satellite audio controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SATELLITE_VOICE, "satellite voice controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SATELLITE_DATA, "satellite data controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t crypt_subclass[] = {
    {
        PCI_SUBCLASS_CRYPT_NETWORK, "cryptographic network controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_CRYPT_ENTERTAINMENT,
        "cryptographic entertainment controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_CRYPT_OTHER, "misc cryptographic controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_subclass_t spc_subclass[] = {
    {
        PCI_SUBCLASS_SP_DPIO, "DPIO module",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SP_PERF, "performances counters",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SP_SYNCH, "communication synchronisation",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SP_MANAGEMENT, "management card",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        PCI_SUBCLASS_SP_OTHER, "misc signal processing controller",
        NULL, NULL, NULL,
        NULL, NULL,
    },
    {
        0xFF, NULL,
        NULL, NULL, NULL,
        NULL, NULL,
    },
};

static const pci_class_t pci_classes[] = {
    /* 0x00 */
    { "undefined",                         NULL,             undef_subclass, },
    /* 0x01 */
    { "mass-storage controller",           NULL,              mass_subclass, },
    /* 0x02 */
    { "network controller",                "network",          net_subclass, },
    /* 0x03 */
    { "display controller",                "display",        displ_subclass, },
    /* 0x04 */
    { "multimedia device",                 NULL,             media_subclass, },
    /* 0x05 */
    { "memory controller",                 "memory-controller", mem_subclass, },
    /* 0x06 */
    { "PCI bridge",                        NULL,             bridg_subclass, },
    /* 0x07 */
    { "communication device",              NULL,               comm_subclass,},
    /* 0x08 */
    { "system peripheral",                 NULL,               sys_subclass, },
    /* 0x09 */
    { "input device",                      NULL,               inp_subclass, },
    /* 0x0A */
    { "docking station",                   NULL,              dock_subclass, },
    /* 0x0B */
    { "processor",                         NULL,               cpu_subclass, },
    /* 0x0C */
    { "serial bus controller",             NULL,               ser_subclass, },
    /* 0x0D */
    { "wireless controller",               NULL,               wrl_subclass, },
    /* 0x0E */
    { "intelligent I/O controller",        NULL,               NULL,         },
    /* 0x0F */
    { "satellite communication controller", NULL,               sat_subclass, },
    /* 0x10 */
    { "cryptographic controller",           NULL,             crypt_subclass, },
    /* 0x11 */
    { "signal processing controller",       NULL,               spc_subclass, },
};

static const pci_dev_t misc_pci[] = {
    /* Heathrow Mac I/O */
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_343S1201,
        "mac-io", "mac-io", "AAPL,343S1201", "heathrow\0",
        1, 1, 1,
        &macio_heathrow_config_cb, NULL,
    },
    /* Paddington Mac I/O */
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_343S1211,
        "mac-io", "mac-io", "AAPL,343S1211", "paddington\0heathrow\0",
        1, 1, 1,
        &macio_heathrow_config_cb, NULL,
    },
    /* KeyLargo Mac I/O */
    {
        PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_KEYL,
        "mac-io", "mac-io", "AAPL,Keylargo", "Keylargo\0",
        1, 1, 1,
        &macio_keylargo_config_cb, NULL,
    },
    {
        0xFFFF, 0xFFFF,
        NULL, NULL, NULL, NULL,
        -1, -1, -1,
        NULL, NULL,
    },
};

const pci_dev_t *pci_find_device (uint8_t class, uint8_t subclass,
                                  uint8_t iface, uint16_t vendor,
                                  uint16_t product)
{
    int (*config_cb)(const pci_config_t *config);
    const pci_class_t *pclass;
    const pci_subclass_t *psubclass;
    const pci_iface_t *piface;
    const pci_dev_t *dev;
    const void *private;
    pci_dev_t *new;
    const char *name, *type;

    name = "unknown";
    type = "unknown";
    config_cb = NULL;
    private = NULL;

    if (class == 0x00 && subclass == 0x01) {
        /* Special hack for old style VGA devices */
        class = 0x03;
        subclass = 0x00;
    } else if (class == 0xFF) {
        /* Special case for misc devices */
        dev = misc_pci;
        goto find_device;
    }
    if (class > (sizeof(pci_classes) / sizeof(pci_class_t))) {
        name = "invalid PCI device";
        type = "invalid";
        goto bad_device;
    }
    pclass = &pci_classes[class];
    name = pclass->name;
    type = pclass->type;
    for (psubclass = pclass->subc; ; psubclass++) {
        if (psubclass->subclass == 0xFF)
            goto bad_device;
        if (psubclass->subclass == subclass) {
            if (psubclass->name != NULL)
                name = psubclass->name;
            if (psubclass->type != NULL)
                type = psubclass->type;
            if (psubclass->config_cb != NULL) {
                config_cb = psubclass->config_cb;
            }
            if (psubclass->private != NULL)
                private = psubclass->private;
            if (psubclass->iface != NULL)
                break;
            dev = psubclass->devices;
            goto find_device;
        }
    }
    for (piface = psubclass->iface; ; piface++) {
        if (piface->iface == 0xFF) {
            dev = psubclass->devices;
            break;
        }
        if (piface->iface == iface) {
            if (piface->name != NULL)
                name = piface->name;
            if (piface->type != NULL)
                type = piface->type;
            if (piface->config_cb != NULL) {
                config_cb = piface->config_cb;
            }
            if (piface->private != NULL)
                private = piface->private;
            dev = piface->devices;
            break;
        }
    }
find_device:
    if (dev == NULL)
	goto bad_device;
    for (;; dev++) {
        if (dev->vendor == 0xFFFF && dev->product == 0xFFFF) {
            goto bad_device;
        }
        if (dev->vendor == vendor && dev->product == product) {
            if (dev->name != NULL)
                name = dev->name;
            if (dev->type != NULL)
                type = dev->type;
            if (dev->config_cb != NULL) {
                config_cb = dev->config_cb;
            }
            if (dev->private != NULL)
                private = dev->private;
            new = malloc(sizeof(pci_dev_t));
            if (new == NULL)
                return NULL;
            new->vendor = vendor;
            new->product = product;
            new->type = type;
            new->name = name;
            new->model = dev->model;
            new->compat = dev->compat;
            new->acells = dev->acells;
            new->scells = dev->scells;
            new->icells = dev->icells;
            new->config_cb = config_cb;
            new->private = private;

            return new;
        }
    }
bad_device:
    printk("Cannot manage '%s' PCI device type '%s':\n %x %x (%x %x %x)\n",
           name, type, vendor, product, class, subclass, iface);

    return NULL;
}
