[OpenBIOS] [PATCH] Add USB OHCI + HID driver

BALATON Zoltan balaton at eik.bme.hu
Wed Jun 4 20:11:53 CEST 2014


(Could you please cc me on replies? I'm not getting mails from the list 
due to a configuration problem beyond my control so I can only reply by 
copying from list archives.)

On Wed, 4 Jun 2014, Segher Boessenkool wrote:
> So the only PCI-PCI bridge is the one to keylargo.  If that is not enabled
> nothing will work (it has the disks behind it, but what's more, also the
> interrupt controller and the interface to the PMU).  So you are saying this
> does not work at all on hardware?

I've seen this in qemu/hw/pci-host/uninorth.c:pci_pmac_init()

     /* DEC 21154 bridge */
#if 0
     /* XXX: not activated as PPC BIOS doesn't handle multiple buses properly */
     pci_create_simple(h->bus, PCI_DEVFN(12, 0), "dec-21154");
#endif

Actually now that I look for it I've found some code in openbios that 
matches that brige in pci_database.c:PCIbrg_devices[] but it only seems to 
add its path to /aliases/bridge and does no configuration. I'm not sure 
that's enough to make it work on real hardware.

> I can't test on real hardware. The ohci driver is only used if an Apple
> Keylargo OHCI controller is detected that is fairly specific to mac99
> machines where the current code probably does not work now due to the
> bridge issue above. So did I miss something?

> Hrm?  The USB OHCI is just a standard USB OHCI, used on way more machines
> than just Apple kit.
>
> Now I'm confused :-)

USB OHCI may be standard but devices that match PCI_VENDOR_ID_APPLE, 
PCI_DEVICE_ID_APPLE_KEYL_USB are not usually found in other hardware and 
this is what my patch added.

> Anyway, if the code is truly in such an abominable state that it does
> not work at all on hardware, just try to make sure it does keep working
> wherever it does now work.  And write clean code, no awful hacks,

I don't know if it works on hardware or not but the code I've added is 
only called for devices matching the above IDs so I think it should not 
break anything else than Macs where I don't know anyone using or even 
tried OpenBIOS.

> certainly no awful hacks that cross boundaries and/or are not well
> documented, that kind of thing.  Leave it in a better state than it was
> in originally and one day we will have something great ;-)

I try my best but how about not leaving it in a worst state than it was 
instead? :-)

Regards,
BALATON Zoltan



More information about the OpenBIOS mailing list