OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:19 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Bochs' USB emulation
PostPosted: Thu Jun 01, 2023 11:46 pm 
Offline
Member
Member

Joined: Sat Feb 04, 2012 5:03 pm
Posts: 111
Great, can't wait to try it out. On my setup it would be running under wine. But I've read an interesting article somewhere that said the Win32 API is the most stable linux API. That's a tangent I'll leave for another time.

Thank you, Ben.


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Sat Aug 19, 2023 2:20 am 
Offline
Member
Member

Joined: Fri Apr 04, 2008 6:43 am
Posts: 357
Hi Ben,

What do you think of integrating your changes into Bochs main ?

Thanks
Stanislav


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Sat Aug 19, 2023 2:19 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
stlw wrote:
Hi Ben,

What do you think of integrating your changes into Bochs main ?

Thanks
Stanislav

Hi Stanislav,

Absolutely. May I contact you at the [email protected] account to discuss and arrange this? If not, please email me with an email account you wish to use, or use the messaging service here.

fys [at] fysnet [dot] net

Thanks,
Ben


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Sun Aug 20, 2023 4:01 am 
Offline
Member
Member

Joined: Fri Apr 04, 2008 6:43 am
Posts: 357
Yes, of course you could


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Sun Oct 08, 2023 12:31 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
Hi all,

I have been working on the Bochs USB emulation lately and have made quite a bit of progress.

First, the USB Debugger is in its initial, experimental, first stages and a Pull Request for this initial start has been submitted. Currently, it will allow you to pause the emulation and view the xHCI controller and command/event rings. Preliminary documentation can be found here. Note that it is still in its experimental stages and I will continue to add to it.

I also have been testing the device emulation for USB Compliance and found a few bugs and missed items. For example, while testing the external Hub compliance, I found that the OHCI's toggle bit emulation was not correct. A fix has since been committed to the source tree. If you have been working on your OHCI, please make sure and use the latest source.

I have tested and therefore added to the device emulation to make all devices (mostly) pass the USB compliance tests. Please see https://www.fysnet.net/bochs/images/supported.htm. (Note that this URL may change. I will try to update this post if it does) The Hub emulation now passes the per-port compliance tests, though it does not pass the Global tests due to the fact that this requires the Host Controllers to have Suspend/Resume triggering, which is not fully implemented yet.

Other than the Disk/CD-ROM super-speed emulation, all devices pass the USB compliance test suites, though note that the test is an old version and ran on a WinXP guest. The new version of the compliance test is ran on a Win10 guest, and I have yet to get the test to load a device correctly. Hence the super-speed test shows that it is still to be done. If and when I get the new test to perform on a Win10 Guest, I will then update that page to these new results. The issue here is that WinXP takes a few seconds to boot, while Win10 takes considerably longer. Hence, the ease of testing on WinXP compared to the Win10 Guest. :-)

This new device emulation which passes these tests has not had a Pull Request created yet, since I am still doing last minute tests. I hope to have a PR posted soon.

Oh, and if any of you can personally verify that a Guest not listed on the 'supported' page I noted above, supports a listed device, please let me know. I am more interested in just the opposite, a device that is not supported on a Guest when it actually should be, but either way, please let me know via a reply here, a Message via this forum, or an email (address found at URL listed below). Please note that if you send me a verification, I will include your contact information (somewhat obscured from bots) so that when something changes, you can be contacted again to re-verify. So please be accurate even if it is a junk gmail account, though a valid contact is desired. Also, I will only list somewhat known Guests, like *nix variants, etc. I know the desire to post your own, believe me, but I am looking for known, commonly used (somewhat commercially used) Guests here. Thank you.

Thanks again for everyone here, for all the comments and support. It is an enjoyable hobby.

Ben
- https://www.fysnet.net/the_universal_serial_bus.htm


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Sat Oct 14, 2023 4:51 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
My USB Compliance tests on all Bochs supported devices are almost complete. I have also tested on numerous Windows(tm)(r) Guests, shown at https://www.fysnet.net/bochs/images/supported.htm. If any of you find anything contrary to my tests shown on that page, please let me know.

As soon as my tests are complete, I will have a PR posted to the Bochs github.

Also, I am looking for image files of other Guests. I would prefer a ready made, turnkey image file of that Guest, but am willing to install a "lite" version of a *nix guest. However, please note, (and I humbly admit) that I don't know much about *nix platforms and have little time using them. I am aware that some distros try to be more like the Windows GUI to help with the conversion. If you can suggest a particular one, I would appreciate it.

Thank you,
Ben


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Tue Jan 02, 2024 11:03 am 
Offline
Member
Member

Joined: Fri Apr 04, 2008 6:43 am
Posts: 357
sounds wrote:
Great, can't wait to try it out. On my setup it would be running under wine. But I've read an interesting article somewhere that said the Win32 API is the most stable linux API. That's a tangent I'll leave for another time.

Thank you, Ben.


Hi,

The pull request with USB Debugger is pending for quite long time without any comments.
We need some evidence of use before integrating it into main trunk is Bochs github.
Can anybody reply (here or in the PR) if it is good ? usable ? has issues ? should be merged into Bochs master ?

Thanks,
Stanislav


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Tue Jan 02, 2024 1:08 pm 
Offline
Member
Member

Joined: Tue Apr 03, 2018 2:44 am
Posts: 401
BenLunt wrote:
Also, I am looking for image files of other Guests. I would prefer a ready made, turnkey image file of that Guest, but am willing to install a "lite" version of a *nix guest. However, please note, (and I humbly admit) that I don't know much about *nix platforms and have little time using them. I am aware that some distros try to be more like the Windows GUI to help with the conversion. If you can suggest a particular one, I would appreciate it.


You could probably do worse than using a *BSD installer image, which if I remember correctly, provides a shell you can use to exercise any attached USB devices (as well as provide a working console that would exercise attached USB keyboard.)

FreeBSD has a "mini" memory stick installation image, about 415MB uncompressed:
https://download.freebsd.org/releases/I ... mstick.img

Or a ready made VM image (but will require logging in, and are bigger):
https://download.freebsd.org/releases/V ... 386.raw.xz

NetBSD also has smaller installation images:
https://cdn.netbsd.org/pub/NetBSD/NetBS ... 3-i386.iso

In either install case, using a USB keyboard and installing to a USB vdisk should exercise your USB stack, with little knowledge required about what you're actually doing in the guest.


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Tue Jan 02, 2024 11:43 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
stlw wrote:
The pull request with USB Debugger is pending for quite long time without any comments.
We need some evidence of use before integrating it into main trunk is Bochs github.
Can anybody reply (here or in the PR) if it is good ? usable ? has issues ? should be merged into Bochs master ?

For those interested, the updated user.dbk documentation, in the form of html, can be viewed at https://www.fysnet.net/bochs/documentation.php. Section 5.8 explains how to use the USB Debugger.

Thanks,
Ben


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Tue Jan 02, 2024 11:43 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
thewrongchristian wrote:
You could probably do worse than using a *BSD installer image, which if I remember correctly, provides a shell you can use to exercise any attached USB devices (as well as provide a working console that would exercise attached USB keyboard.)

FreeBSD has a "mini" memory stick installation image, about 415MB uncompressed:
https://download.freebsd.org/releases/I ... mstick.img

Or a ready made VM image (but will require logging in, and are bigger):
https://download.freebsd.org/releases/V ... 386.raw.xz

NetBSD also has smaller installation images:
https://cdn.netbsd.org/pub/NetBSD/NetBS ... 3-i386.iso

In either install case, using a USB keyboard and installing to a USB vdisk should exercise your USB stack, with little knowledge required about what you're actually doing in the guest.

Thank you. I will have a look.


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Thu Jan 04, 2024 2:22 pm 
Offline
Member
Member

Joined: Sat Feb 04, 2012 5:03 pm
Posts: 111
stlw wrote:
Hi,

The pull request with USB Debugger is pending for quite long time without any comments.
We need some evidence of use before integrating it into main trunk is Bochs github.
Can anybody reply (here or in the PR) if it is good ? usable ? has issues ? should be merged into Bochs master ?

Thanks,
Stanislav
I'm still interested in testing it. For Reasons, I haven't gotten to it yet. Apologies! I'm still not in a position to test it soon.


Top
 Profile  
 
 Post subject: Re: Bochs' USB emulation
PostPosted: Sun Mar 10, 2024 9:54 am 
Offline
Member
Member

Joined: Fri Apr 04, 2008 6:43 am
Posts: 357
USB Debugger integrated into Bochs github tree after 2.8 release.
Please test and comment !

Stanislav


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 30 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