xbox: Change PCI IDs for USB and IDE controllers to match Xbox

This commit is contained in:
wutno 2021-10-22 04:29:28 -04:00 committed by mborgerson
parent 8f529d0d9c
commit 6454b7b9d4
3 changed files with 18 additions and 0 deletions

View File

@ -228,8 +228,14 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
dc->reset = piix_ide_reset;
k->realize = pci_piix_ide_realize;
k->exit = pci_piix_ide_exitfn;
#ifdef XBOX
k->vendor_id = PCI_VENDOR_ID_NVIDIA;
k->device_id = PCI_DEVICE_ID_NVIDIA_NFORCE_IDE;
k->revision = 0xB1;
#else
k->vendor_id = PCI_VENDOR_ID_INTEL;
k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1;
#endif
k->class_id = PCI_CLASS_STORAGE_IDE;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
dc->hotpluggable = false;

View File

@ -134,11 +134,21 @@ static void ohci_pci_class_init(ObjectClass *klass, void *data)
k->realize = usb_ohci_realize_pci;
k->exit = usb_ohci_exit;
#ifdef XBOX
k->vendor_id = PCI_VENDOR_ID_NVIDIA;
k->device_id = PCI_DEVICE_ID_NVIDIA_NFORCE_USB;
k->revision = 0xB1;
#else
k->vendor_id = PCI_VENDOR_ID_APPLE;
k->device_id = PCI_DEVICE_ID_APPLE_IPID_USB;
#endif
k->class_id = PCI_CLASS_SERIAL_USB;
set_bit(DEVICE_CATEGORY_USB, dc->categories);
#ifdef XBOX
dc->desc = "nForce USB Controller";
#else
dc->desc = "Apple USB Controller";
#endif
device_class_set_props(dc, ohci_pci_properties);
dc->hotpluggable = false;
dc->vmsd = &vmstate_ohci;

View File

@ -289,6 +289,8 @@
#define PCI_DEVICE_ID_NVIDIA_NFORCE_LPC 0x01b2
#define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4
#define PCI_DEVICE_ID_NVIDIA_NFORCE_AGP 0x01b7
#define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc
#define PCI_DEVICE_ID_NVIDIA_NFORCE_USB 0x01c2
#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3
#define PCI_DEVICE_ID_NVIDIA_GEFORCE_NV2A 0x02a0