[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 em
From: |
Mark Cave-Ayland |
Subject: |
Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation. |
Date: |
Mon, 13 Feb 2017 17:33:30 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
On 13/02/17 16:19, Jd Lyons wrote:
> 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?
This is part of OpenBIOS, however it is possible to install the OpenBIOS
repository as a git sub-module within the QEMU git repository so that
everything is in one place.
Once you've got the OpenBIOS tree, either as a submodule or directly
from github, you'll find the pci_database.c file in drivers/.
> 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:
>
> staticconstpci_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.
>
> staticuint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_3DFX;
> staticuint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_Voodoo2;
> staticuint16_t pci_default_subclass_display_3d = PCI_SUBCLASS_DISPLAY_3D;
>
> staticvoidpci_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?
Do you have a git repository somewhere showing your changes to both
OpenBIOS and QEMU? It's a bit difficult to provide some pointers when
it's not possible to see how far you've got.
ATB,
Mark.
- [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation., Jd Lyons, 2017/02/13
- Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation.,
Mark Cave-Ayland <=
- Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation., Jd Lyons, 2017/02/13
- Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation., Mark Cave-Ayland, 2017/02/15
- Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation., Jd Lyons, 2017/02/15
- Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation., Mark Cave-Ayland, 2017/02/15
- Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation., Jd Lyons, 2017/02/15