OSDev.org

The Place to Start for Operating System Developers
It is currently Fri May 17, 2024 12:24 am

All times are UTC - 6 hours




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 39 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: EHCI refuses to own ports
PostPosted: Sun Feb 14, 2010 3:16 am 
Offline
Member
Member

Joined: Fri Aug 01, 2008 7:52 am
Posts: 248
A few conclusions I've reached:
  • EHCI in VirtualBox: I can manage to send a packet, that gets NAKed. No IRQs of any kind sent. Capability registers claim no companion controllers, even if there's an OHCI. No EECP, so BIOS can't be blamed. Setting the Configure Flag bit doesn't have any effect on the ports. Running DSL in VirtualBox reveals that OHCI is used and without it, even if EHCI module is loaded, there's no usb support at all. Not functional.
  • EHCI in VMware: strange behavior, the enabled bits in port registers aren't set, no EECP, no IRQ for device connect/disconnect. DSL seems to not rely on it, a test with a newer kernel proven it's not used. Not functional.
  • UHCI in VMware: it can be used, linux test showed it. Whatever I have in my TD, it just passes by. Replacing the link to the TD in the frame list with 0(should load a TD from address 0) gives a nice error. Also, if don't write the whole frame list with 1(terminate bit set), it also gives an error when it reaches the first link that wasn't written with 1(an example value is 0x61686372). Setting the reserved bits in the link to TD doesn't give an error. Neither invalid PID or other fields in TD. Status or any other field in TD doesn't change. Can be fixed, even if I have to check each line in the driver.

So, advice for anyone who wants to make an EHCI driver: real hardware is your best friend. Not even linux can handle VirtualBox or VMware.


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Sun Feb 14, 2010 7:53 am 
Offline
Member
Member

Joined: Thu Apr 12, 2007 8:15 am
Posts: 204
Location: Michigan
I'm skeptical that VMWare has a problem--I know that my roommate and I at least installed OSX86 on VMWare and it synced to his iPod over USB/EHCI, and I have some trouble believing linux cannot use USB 2.0 devices from within VMWare... I'm less familiar with virtualbox but I've heard pretty good things about it...

I'll have to install VMWare again, I think I have some code that could be pretty readily tested... I'm a little busy at the moment but I'll get back to you on this within the next week hopefully. Just to be sure: what version of VMWare are you using?

_________________
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Sun Feb 14, 2010 8:13 am 
Offline
Member
Member

Joined: Fri Aug 01, 2008 7:52 am
Posts: 248
madeofstaples wrote:
I'm skeptical that VMWare has a problem--I know that my roommate and I at least installed OSX86 on VMWare and it synced to his iPod over USB/EHCI, and I have some trouble believing linux cannot use USB 2.0 devices from within VMWare... I'm less familiar with virtualbox but I've heard pretty good things about it...

I'll have to install VMWare again, I think I have some code that could be pretty readily tested... I'm a little busy at the moment but I'll get back to you on this within the next week hopefully. Just to be sure: what version of VMWare are you using?

Last version possible(or with an 3 at the end instead of 4). I tried DSL and OpenSuSE install DVD's rescue system. I could try other distros, too. Something interesting I found while writing this: lsusb for me shows all devices I have under root hub 1.1 :? . It may be that because I don't have USB devices that are high-speed, VMware/VirtualBox doesn't put them under EHCI? It's somehow strange, because I can't find an USB device around that is high-speed(considering what lsusb says) :| . Would a thumb drive work? If is the lack of high-speed devices the problem, I can review my statements :^o .
Even so, I still can't use anything else than UHCI...


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Sun Feb 14, 2010 1:16 pm 
Offline
Member
Member

Joined: Sat Jan 23, 2010 2:56 pm
Posts: 123
eddyb wrote:
It may be that because I don't have USB devices that are high-speed, VMware/VirtualBox doesn't put them under EHCI? It's somehow strange, because I can't find an USB device around that is high-speed(considering what lsusb says) :| . Would a thumb drive work?

I think most thumb drives are USB 2.0. Either way, it'd be nice to have a way of including emulated USB devices; I know at least Bochs can do this, though VirtualBox seems to only support pass-through, so if your system will work on Bochs then that would be worth trying...


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Sun Feb 14, 2010 8:43 pm 
Offline
Member
Member

Joined: Thu Apr 12, 2007 8:15 am
Posts: 204
Location: Michigan
eddyb wrote:
Something interesting I found while writing this: lsusb for me shows all devices I have under root hub 1.1 :? . It may be that because I don't have USB devices that are high-speed, VMware/VirtualBox doesn't put them under EHCI? It's somehow strange, because I can't find an USB device around that is high-speed(considering what lsusb says) :| .

Wait: lsusb from within VMWare and from the host OS? As in, you either don't have an EHCI controller/EHCI support in the host OS (unlikely...) or you can be certain that you don't have any USB 2.0 devices (not very likely, but possible...). There are USB 1.1 thumb drives, but I think they'd be hard to find any time recently...

If you are truly only connecting USB 1.1 devices to the system, then yes, they would be handled by the UHCI companion controller, not EHCI...

If you are connecting USB 2.0 devices and they are showing up as USB 1.1 devices, then that might be an indication that VMWare has a problem with EHCI (but it might also be a problem that the virtualized OS isn't properly configured...).

_________________
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Mon Feb 15, 2010 6:07 am 
Offline
Member
Member

Joined: Fri Jan 15, 2010 2:46 am
Posts: 75
If you tested it like you said you were going to, then you would have known that VMWare does support EHCI controllers. :roll:


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Mon Feb 15, 2010 11:50 am 
Offline
Member
Member

Joined: Thu Apr 12, 2007 8:15 am
Posts: 204
Location: Michigan
neato wrote:
If you tested it like you said you were going to, then you would have known that VMWare does support EHCI controllers. :roll:

If you had read my post like you implied you did, you'd know that I said I would be too busy to try VMWare today but I'd hope to within this week. :roll:

Anyway, I know that VMWare supports EHCI, at least the version I last used did. However, that it worked in OSX86 is not enough evidence for me to say that my situation wasn't simply a fluke (though, again, I strongly doubt it was a fluke).

_________________
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Tue Feb 16, 2010 6:33 am 
Offline
Member
Member

Joined: Fri Jan 15, 2010 2:46 am
Posts: 75
Yet, you were not too busy to come here and post that and the thing before, hmmm... :roll:


Top
 Profile  
 
 Post subject: Re: EHCI refuses to own ports
PostPosted: Tue Feb 16, 2010 12:50 pm 
Offline
Member
Member

Joined: Thu Apr 12, 2007 8:15 am
Posts: 204
Location: Michigan
Yes, I was not too busy to write a quick reply, but was (and still am) too busy to spend the time setting up VMWare and the time looking through old code to figure out which would make a suitable test image. Why don't you do something productive like verify that your own EHCI code works fine in VMWare rather than trolling me for having more important things to do?

_________________
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 39 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group