diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-01 12:01:04 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-01 12:01:04 +0000 |
commit | 4ebcf884836887324848291032a385fe0df7b0af (patch) | |
tree | 3f6dec645e9e382fe3644950141d5c37d0ef47ab /hw | |
parent | e3007e6677fd5723dac5a10033319aa0f8dfaf64 (diff) |
Update #defines for PCI vendor and device IDs from OpenBIOS and Linux
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6490 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/grackle_pci.c | 6 | ||||
-rw-r--r-- | hw/ne2000.c | 2 | ||||
-rw-r--r-- | hw/openpic.c | 2 | ||||
-rw-r--r-- | hw/pci.h | 10 | ||||
-rw-r--r-- | hw/ppc_chrp.c | 5 | ||||
-rw-r--r-- | hw/ppc_oldworld.c | 5 | ||||
-rw-r--r-- | hw/unin_pci.c | 8 | ||||
-rw-r--r-- | hw/vga.c | 5 |
8 files changed, 27 insertions, 16 deletions
diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c index 9a5f3e53de..40c73df3ea 100644 --- a/hw/grackle_pci.c +++ b/hw/grackle_pci.c @@ -154,10 +154,8 @@ PCIBus *pci_grackle_init(uint32_t base, qemu_irq *pic) #if 0 /* PCI2PCI bridge same values as PearPC - check this */ - d->config[0x00] = 0x11; // vendor_id - d->config[0x01] = 0x10; - d->config[0x02] = 0x26; // device_id - d->config[0x03] = 0x00; + pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_DEC); + pci_config_set_device_id(d->config, PCI_DEVICE_ID_DEC_21154); d->config[0x08] = 0x02; // revision d->config[0x0a] = 0x04; // class_sub = pci2pci d->config[0x0b] = 0x06; // class_base = PCI_bridge diff --git a/hw/ne2000.c b/hw/ne2000.c index af22f6eaad..4515fd6305 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -791,7 +791,7 @@ void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn) NULL, NULL); pci_conf = d->dev.config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK); - pci_config_set_device_id(pci_conf, 0x8029); // Realtek 8029 + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_RTL8029); pci_conf[0x0a] = 0x00; // ethernet network controller pci_conf[0x0b] = 0x02; pci_conf[0x0e] = 0x00; // header_type diff --git a/hw/openpic.c b/hw/openpic.c index 06a26df058..16b33d2b1b 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -1018,7 +1018,7 @@ qemu_irq *openpic_init (PCIBus *bus, int *pmem_index, int nb_cpus, return NULL; pci_conf = opp->pci_dev.config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_IBM); - pci_config_set_device_id(pci_conf, 0xffff); // MPIC2 + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_IBM_OPENPIC2); pci_conf[0x0a] = 0x80; // PIC pci_conf[0x0b] = 0x08; pci_conf[0x0e] = 0x00; // header_type @@ -12,10 +12,12 @@ extern target_phys_addr_t pci_mem_base; #define PCI_DEVICE_ID_LSI_53C895A 0x0012 #define PCI_VENDOR_ID_DEC 0x1011 +#define PCI_DEVICE_ID_DEC_21154 0x0026 #define PCI_VENDOR_ID_CIRRUS 0x1013 #define PCI_VENDOR_ID_IBM 0x1014 +#define PCI_DEVICE_ID_IBM_OPENPIC2 0xffff #define PCI_VENDOR_ID_AMD 0x1022 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 @@ -27,7 +29,11 @@ extern target_phys_addr_t pci_mem_base; #define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 #define PCI_VENDOR_ID_APPLE 0x106b +#define PCI_DEVICE_ID_APPLE_343S1201 0x0010 +#define PCI_DEVICE_ID_APPLE_UNI_N_I_PCI 0x001e +#define PCI_DEVICE_ID_APPLE_UNI_N_PCI 0x001f #define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 +#define PCI_DEVICE_ID_APPLE_UNI_N_KEYL 0x0022 #define PCI_VENDOR_ID_SUN 0x108e #define PCI_DEVICE_ID_SUN_EBUS 0x1000 @@ -38,12 +44,16 @@ extern target_phys_addr_t pci_mem_base; #define PCI_DEVICE_ID_CMD_646 0x0646 #define PCI_VENDOR_ID_REALTEK 0x10ec +#define PCI_DEVICE_ID_REALTEK_RTL8029 0x8029 #define PCI_DEVICE_ID_REALTEK_8139 0x8139 #define PCI_VENDOR_ID_XILINX 0x10ee #define PCI_VENDOR_ID_MARVELL 0x11ab +#define PCI_VENDOR_ID_QEMU 0x1234 +#define PCI_DEVICE_ID_QEMU_VGA 0x1111 + #define PCI_VENDOR_ID_ENSONIQ 0x1274 #define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 diff --git a/hw/ppc_chrp.c b/hw/ppc_chrp.c index a4da33eaf8..026b08bdc6 100644 --- a/hw/ppc_chrp.c +++ b/hw/ppc_chrp.c @@ -296,8 +296,9 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, adb_mouse_init(&adb_bus); - macio_init(pci_bus, 0x0022, 0, pic_mem_index, dbdma_mem_index, - cuda_mem_index, NULL, 2, ide_mem_index, escc_mem_index); + macio_init(pci_bus, PCI_DEVICE_ID_APPLE_UNI_N_KEYL, 0, pic_mem_index, + dbdma_mem_index, cuda_mem_index, NULL, 2, ide_mem_index, + escc_mem_index); if (usb_enabled) { usb_ohci_init_pci(pci_bus, 3, -1); diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index 260e15df32..1583c91162 100644 --- a/hw/ppc_oldworld.c +++ b/hw/ppc_oldworld.c @@ -360,8 +360,9 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, nvr = macio_nvram_init(&nvram_mem_index, 0x2000); pmac_format_nvram_partition(nvr, 0x2000); - macio_init(pci_bus, 0x0010, 1, pic_mem_index, dbdma_mem_index, - cuda_mem_index, nvr, 2, ide_mem_index, escc_mem_index); + macio_init(pci_bus, PCI_DEVICE_ID_APPLE_343S1201, 1, pic_mem_index, + dbdma_mem_index, cuda_mem_index, nvr, 2, ide_mem_index, + escc_mem_index); if (usb_enabled) { usb_ohci_init_pci(pci_bus, 3, -1); diff --git a/hw/unin_pci.c b/hw/unin_pci.c index 4ada4cac13..2a8a393f03 100644 --- a/hw/unin_pci.c +++ b/hw/unin_pci.c @@ -175,7 +175,7 @@ PCIBus *pci_pmac_init(qemu_irq *pic) d = pci_register_device(s->bus, "Uni-north main", sizeof(PCIDevice), 11 << 3, NULL, NULL); pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE); - pci_config_set_device_id(d->config, 0x001f); // device_id + pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_PCI); d->config[0x08] = 0x00; // revision d->config[0x0A] = 0x00; // class_sub = pci host d->config[0x0B] = 0x06; // class_base = PCI_bridge @@ -188,8 +188,8 @@ PCIBus *pci_pmac_init(qemu_irq *pic) /* pci-to-pci bridge */ d = pci_register_device("Uni-north bridge", sizeof(PCIDevice), 0, 13 << 3, NULL, NULL); - pci_config_set_vendor_id(d->config, 0x1011); // vendor_id : TI - pci_config_set_device_id(d->config, 0x0026); // device_id + pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_DEC); + pci_config_set_device_id(d->config, PCI_DEVICE_ID_DEC_21154); d->config[0x08] = 0x05; // revision d->config[0x0A] = 0x04; // class_sub = pci2pci d->config[0x0B] = 0x06; // class_base = PCI_bridge @@ -249,7 +249,7 @@ PCIBus *pci_pmac_init(qemu_irq *pic) d = pci_register_device("Uni-north internal", sizeof(PCIDevice), 3, 11 << 3, NULL, NULL); pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE); - pci_config_set_device_id(d->config, 0x001E); // device_id + pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_I_PCI); d->config[0x08] = 0x00; // revision d->config[0x0A] = 0x00; // class_sub = pci host d->config[0x0B] = 0x06; // class_base = PCI_bridge @@ -2510,8 +2510,9 @@ int pci_vga_init(PCIBus *bus, uint8_t *vga_ram_base, s->pci_dev = &d->dev; pci_conf = d->dev.config; - pci_config_set_vendor_id(pci_conf, 0x1234); // dummy VGA (same as Bochs ID) - pci_config_set_device_id(pci_conf, 0x1111); + // dummy VGA (same as Bochs ID) + pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_QEMU); + pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_QEMU_VGA); pci_conf[0x0a] = 0x00; // VGA controller pci_conf[0x0b] = 0x03; pci_conf[0x0e] = 0x00; // header_type |