Skip to contentSkip to conversation

USB EHCI development nearing completion

Qemu-devel Mark B 6 participants 9 messages Dec 24, 2006 – Jan 5, 2007

lore
Share & tools
lore

Mark B

author
#0 lore raw

Dear list,

Just a quick note to let you know I have almost finished an implementation of an EHCI host controller for USB (usb-ehci.c) for qemu.  I am testing with an XP guest and so far I have a mass storage flash key, a mouse and a tablet working.  I haven’t yet implemented isochronous or split transactions though.  It doesn’t do companion controller hand-offs for low or full speed devices either but Windows XP doesn’t mind that I am attaching low/full speed devices through EHCI (I believe Linux guests won’t like this).

I have asked the company I am working for to give me permission to GPL the module and so far they are agreeable.  So I am planning to clean up and have an initial version for check in early in the new year.  If anyone has any inputs, please do let me know.  I’m new to qemu development so am not sure of checkin etiquette, etc.  Pointers in that regard appreciated too.

Cheers,

Mark

#1 lore raw

Hi Mark,

Well, there aren't any "written rules" but most people who contribute sends some "proof of concept" diff'ed patch (appliable to QEMU CVS for example) (you can look at the experimental 3D patch few weeks ago), and then the talks begins, while others would look how portable your code to other platforms/OS's..

Thanks,
Hetz

Quoted 28 lines · Mark B

Dear list,

Just a quick note to let you know I have almost finished an implementation of an EHCI host controller for USB (usb-ehci.c) for qemu. I am testing with an XP guest and so far I have a mass storage flash key, a mouse and a tablet working. I haven't yet implemented isochronous or split transactions though. It doesn't do companion controller hand-offs for low or full speed devices either but Windows XP doesn't mind that I am attaching low/full speed devices through EHCI (I believe Linux guests won't like this).

I have asked the company I am working for to give me permission to GPL the module and so far they are agreeable. So I am planning to clean up and have an initial version for check in early in the new year. If anyone has any inputs, please do let me know. I'm new to qemu development so am not sure of checkin etiquette, etc. Pointers in that regard appreciated too.

Cheers,

Mark

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Visit my blog (hebrew) for things that (sometimes) matter:
http://wp.dad-answers.com
#2 lore raw

Another point is that I won't accept a GPL license for such a device. LGPL or BSD would be better.

Regards,

Fabrice.

Quoted 43 lines · Hetz Ben Hamo

Hi Mark,

Well, there aren't any "written rules" but most people who contribute sends some "proof of concept" diff'ed patch (appliable to QEMU CVS for example) (you can look at the experimental 3D patch few weeks ago), and then the talks begins, while others would look how portable your code to other platforms/OS's..

Thanks,
Hetz

Quoted 28 lines · Mark B

Dear list,

Just a quick note to let you know I have almost finished an implementation of an EHCI host controller for USB (usb-ehci.c) for qemu. I am testing with an XP guest and so far I have a mass storage flash key, a mouse and a tablet working. I haven't yet implemented isochronous or split transactions though. It doesn't do companion controller hand-offs for low or full speed devices either but Windows XP doesn't mind that I am attaching low/full speed devices through EHCI (I believe Linux guests won't like this).

I have asked the company I am working for to give me permission to GPL the module and so far they are agreeable. So I am planning to clean up and have an initial version for check in early in the new year. If anyone has any inputs, please do let me know. I'm new to qemu development so am not sure of checkin etiquette, etc. Pointers in that regard appreciated too.

Cheers,

Mark

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

author
#3 lore raw

Thank you Fabrice and co. LGPL or BSD should be fine - I don't have any preference on the license.

I could not find the experimental 3D patch - it seems to have expired. But I uploaded a diff patch anyway to 4shared at this location:
http://www.4shared.com/file/7986451/d1222873/ehci.html

This is an early proof of concept with a good bit of tidying up yet to be done. It is not yet for public release either. But of course comments and other feedback are welcome.

Mark

-----Original Message-----
From: Fabrice Bellard [mailto:[email protected]]
Sent: 27 December 2006 13:39
To: [email protected]
Cc: [email protected]
Subject: Re: [Qemu-devel] USB EHCI development nearing completion

Another point is that I won't accept a GPL license for such a device. LGPL or BSD would be better.

Regards,

Fabrice.

Quoted 49 lines · Hetz Ben Hamo

Hi Mark,

Well, there aren't any "written rules" but most people who contribute sends some "proof of concept" diff'ed patch (appliable to QEMU CVS for example) (you can look at the experimental 3D patch few weeks ago), and then the talks begins, while others would look how portable your code to other platforms/OS's..

Thanks,
Hetz

Quoted 34 lines · Mark B

Dear list,

Just a quick note to let you know I have almost finished an implementation
of an EHCI host controller for USB (usb-ehci.c) for qemu. I am testing with
an XP guest and so far I have a mass storage flash key, a mouse and a tablet
working. I haven't yet implemented isochronous or split transactions though. It doesn't do companion controller hand-offs for low or full speed
devices either but Windows XP doesn't mind that I am attaching low/full speed devices through EHCI (I believe Linux guests won't like this).

I have asked the company I am working for to give me permission to GPL the
module and so far they are agreeable. So I am planning to clean up and have
an initial version for check in early in the new year. If anyone has any inputs, please do let me know. I'm new to qemu development so am not sure of checkin etiquette, etc. Pointers in that regard appreciated too.

Cheers,

Mark

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#4 lore raw
Quoted 10 lines · Mark B

Thank you Fabrice and co. LGPL or BSD should be fine - I don't have any preference on the license.

I could not find the experimental 3D patch - it seems to have expired. But I uploaded a diff patch anyway to 4shared at this location:
http://www.4shared.com/file/7986451/d1222873/ehci.html

This is an early proof of concept with a good bit of tidying up yet to be done. It is not yet for public release either. But of course comments and other feedback are welcome.

Have you looked at Chromium (http://chromium.sourceforge.net/)

It looks like what they've already achieved what you're trying to implement. It just needs a qemu specific transport implementation. It already has multiple transport backends to support TCP/IP and FiberChannel.

Paul

author
#5 lore raw

Paul,

I don't see anything to do with EHCI in Chromium. I was just referring to the 3D patch as an example - maybe this is causing confusion.

Did anyone else get a chance to look at the EHCI emulation patch?

Thanks,

Mark

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Paul Brook
Sent: 27 December 2006 21:34
To: [email protected]
Cc: Mark B
Subject: Re: [Qemu-devel] USB EHCI development nearing completion

Quoted 4 lines · Mark B

Thank you Fabrice and co. LGPL or BSD should be fine - I don't have any preference on the license.

I could not find the experimental 3D patch - it seems to have expired.

But

Quoted 5 lines

I uploaded a diff patch anyway to 4shared at this location:
http://www.4shared.com/file/7986451/d1222873/ehci.html

This is an early proof of concept with a good bit of tidying up yet to be done. It is not yet for public release either. But of course comments

and

Quoted 1 line

other feedback are welcome.

Have you looked at Chromium (http://chromium.sourceforge.net/)

It looks like what they've already achieved what you're trying to implement.

It just needs a qemu specific transport implementation. It already has multiple transport backends to support TCP/IP and FiberChannel.

Paul

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#6 lore raw

I tested it on win32 host.
Apparently a typo mistake (see updated patch)

how to use it ?

ehci-xian.patch Thu Jan 4 10:40:26 2007 renamed from ehci.patch Thu Jan 4 09:50:17 2007 +1 -0
diff -Nur ehci.patch ehci-xian.patch
@@ -1722,7 +1722,7 @@
+    printf ("buffer is %p (+%d)\n", s->buffer, (uint8_t*)s->buffer -

(uint8_t*)s);
+
+ pci_conf = s->dev.config;
-+ pci_conf[0x00] = 0x86
++ pci_conf[0x00] = 0x86;

+    pci_conf[0x01] = 0x80; // Intel VID
+    pci_conf[0x02] = 0x55;
+    pci_conf[0x03] = 0x55; // Made up product ID
Quoted 12 lines · Mark B

Paul,

I don't see anything to do with EHCI in Chromium. I was just referring to the 3D patch as an example - maybe this is causing confusion.

Did anyone else get a chance to look at the EHCI emulation patch?

Thanks,

Mark

--
Christian

author
#7 lore raw

Apologies for the missed semi-colon - I edited the vendor id after the fact.

Looks like I chopped the call to init as well. You'll need this:

hw/pc.c +2 -0
@@ -842,6 +842,8 @@
         usb_uhci_init(pci_bus, piix3_devfn + 2);
     }
 
+    usb_ehci_init(pci_bus, piix3_devfn + 4);
+     
     if (pci_enabled && acpi_enabled) {
         piix4_pm_init(pci_bus, piix3_devfn + 3);
     }

After that it should just be a question of adding devices with -usbdevice or whatever. Since ehci is initialized after uhci, its ports are top of the free list and get allocated first. Ehci *should* hand-off low or full speed devices to a companion controller but that's TBD for now.

Mark

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Christian MICHON
Sent: 04 January 2007 09:53
To: [email protected]
Subject: Re: [Qemu-devel] USB EHCI development nearing completion

I tested it on win32 host.
Apparently a typo mistake (see updated patch)

how to use it ?

ehci-xian.patch Thu Jan 4 10:40:26 2007 renamed from ehci.patch Thu Jan 4 09:50:17 2007 +0 -0
diff -Nur ehci.patch ehci-xian.patch
@@ -1722,7 +1722,7 @@
 +    printf ("buffer is %p (+%d)\n", s->buffer, (uint8_t*)s->buffer -

(uint8_t*)s);
+

 +    pci_conf = s->dev.config;
-+    pci_conf[0x00] = 0x86
++    pci_conf[0x00] = 0x86;
 +    pci_conf[0x01] = 0x80; // Intel VID
 +    pci_conf[0x02] = 0x55;
 +    pci_conf[0x03] = 0x55; // Made up product ID
Quoted 12 lines · Mark B

Paul,

I don't see anything to do with EHCI in Chromium. I was just referring to the 3D patch as an example - maybe this is causing confusion.

Did anyone else get a chance to look at the EHCI emulation patch?

Thanks,

Mark

--
Christian

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#8 lore raw
Quoted 3 lines · Mark B

Apologies for the missed semi-colon - I edited the vendor id after the fact.

Looks like I chopped the call to init as well. You'll need this:

Please post an updated (complete) patch to this mailing list.

Thiemo