qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulat


From: Jd Lyons
Subject: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation.
Date: Mon, 13 Feb 2017 11:19:11 -0500

I’ve got a copy of the Qemu source I downloaded from a place other than the official git repository, it has a file called pic_datbase.c, but the Qemu source from the official git repository does’t have this file.

Is this file part of Openbios, or was it ever included in the official source for Qemu?

I’m trying to build emulation for a Voodoo2 into Qemu-PPC, and I have enumerated the device in the device tree, and name space, but the Voodoo2 drivers don’t find the device in Mac OS 9.

I’m not sure how driver loading works under the Classic Mac OS’s, as a PC Voodoo2 would work in a Mac, and the Voodoo2 didn’t have an Option Rom, the drivers must be looking for something I’m not providing in the PCI Configuration Registers.

I set,

Vendor ID = 0x121a
Device ID = 0x0002
Subvendor ID = 0x121a
Subdevice ID = 0x0002 ????????
Class-code = 0x02 ???????

I’m not sure what the Subdevice ID is for a Voodoo2, and I’m not sure if the Class-code should be 0x02 or 3000 for a display device?

The old pci_database.c had:

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,
    },
};

And  PCI_SUBCLASS_DISPLAY_3D is defined as 0x02, but I’m not sure I should use it for the Class-code?

I tried a Class-code of 30000, and to pass the property for the Subclass Display 3D, but it resulted in no video output at all in Qemu-ppc.

static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_3DFX;
static uint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_Voodoo2;
static uint16_t pci_default_subclass_display_3d = PCI_SUBCLASS_DISPLAY_3D;

static void pci_set_default_subsystem_id(PCIDevice *pci_dev)
{
    pci_set_word(pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID,
                 pci_default_sub_vendor_id);
    pci_set_word(pci_dev->config + PCI_SUBSYSTEM_ID,
                 pci_default_sub_device_id);
    pci_set_word(pci_dev->config + PCI_SUBCLASS_DISPLAY_3D,
                 pci_default_subclass_display_3d);
}


I’m I passing a property to Openbios that it doesn’t understand?

I couldn’t find anything in the PCI Bus Bindings to deal with a Subclass Display?

Thanks,
JD

reply via email to

[Prev in Thread] Current Thread [Next in Thread]