Updated USB Wiki [Finished Draft]

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Updated USB Wiki [Finished Draft]

Post by madeofstaples »

Hi,

I've been working on EHCI support, so I thought I'd contribute to the USB wiki entry. I haven't finished it all, but I would like to get some feedback before I do.

Until I finish everything, I've left the original wiki entry contents at the bottom (I plan on making separate entries for OHCI, UHCI, and EHCI eventually).

So I hope you guys like it, let me know if anything is too vague, confusing, etc. If you have trouble understanding my diagrams (or even the ones taken from the USB 2.0 specifications), please tell me how you are interpreting the diagram and why it's confusing. If you think something needs (or does not need) diagrams, speak up. Especially let me know if I've misinterpreted or am flat-out wrong about something.

Here it is

Thanks
Last edited by madeofstaples on Fri Jul 03, 2009 3:06 pm, edited 1 time in total.
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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Updated USB Wiki

Post by Combuster »

=D> =D> =D>

*hands over a barnstar to madeofstaples the wikidragon*
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Updated USB Wiki

Post by Troy Martin »

The Original Barnstar:
Image

YE GODS THAT'S A LOT OF EDITRY!!! *needs another barnstar to hand out*

The Working Man's Barnstar:
Image
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Updated USB Wiki

Post by madeofstaples »

I had never heard of these barnstars until now, um, thanks.

Fixed a few typos, will work on remaining content this weekend probably.

"USB Hubs" may need its own wiki entry, I don't know if there're any specific wiki protocol that would suggest otherwise, so that is my plan.
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.
User avatar
Coty
Member
Member
Posts: 286
Joined: Thu Feb 12, 2009 5:12 pm

Re: Updated USB Wiki

Post by Coty »

wow, man thats alot of reading, good job =D>
My hero, is Mel.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Updated USB Wiki

Post by Solar »

Excellent text. Well structured, good language, well illustrated. I bow to you!
Every good solution is obvious once you've found it.
paxcoder
Member
Member
Posts: 33
Joined: Fri Jan 02, 2009 4:00 pm

Re: Updated USB Wiki

Post by paxcoder »

Just wanted to thank madeofstaples for the contribution.
Thx.
Help this rabbit conquer the world by including it in your code: for(;;) fork();
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Updated USB Wiki

Post by madeofstaples »

I'm glad you guys like it so far. :D

I've been slowly finishing items under TODO. The next two things that I'll be adding (protocol and framework) are much easier to understand (especially if you can at least get a basic idea of the topics that I've covered so far), but they will have a considerable amount of content and plenty of opportunities for illustrations.

I also would like to make an illustration or two to show the relationship between (micro)frame and transactions.

On the side, I've been working on programming the EHCI controller. I'm happy to say that so far it's going really well. I haven't worked with any device that requires interrupt or isochronous transfers (yet), but bulk and control transfers are working. I just today started working on code to wrap SCSI commands and send them over bulk transfers to mass storage class devices; so far I have successfully implemented the INQUIRY command. I have been testing with a netbook (hp mini 1030nr), and two laptops (a friend's high-end asus, and an off-brand MSI laptop). The Asus laptop has a broken webcam permanently connected to the USB, so I've even learned a bit about working with faulty hardware (it does not appear to properly enter the address state).

I know some hobbyists have gotten UHCI support working and probably already understand the USB specifications, so I may start working on an EHCI entry pretty soon, and eventually a USB Mass Storage Class entry. I've been writing in assembly, but I would have no problem using C or C++ examples in the wiki, if that's preferred?
Coddy wrote:wow, man thats alot of reading, good job =D>
Thanks, but say that after looking at how long the USB 2.0 specification is :lol:
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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Updated USB Wiki

Post by Solar »

madeofstaples wrote:...and eventually a USB Mass Storage Class entry.
Now wouldn't that be cool?
I've been writing in assembly, but I would have no problem using C or C++ examples in the wiki, if that's preferred?
I think C is perfect for the purpose of code examples. (Like English for the page itself, it's the lingua franca of OS developers worldwide.)
Every good solution is obvious once you've found it.
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Updated USB Wiki

Post by madeofstaples »

Solar wrote:
I've been writing in assembly, but I would have no problem using C or C++ examples in the wiki, if that's preferred?
I think C is perfect for the purpose of code examples. (Like English for the page itself, it's the lingua franca of OS developers worldwide.)
Right, that's what I was thinking, too. Very well then, C it is.

I've almost finished the USB protocol section :) Finally some of the topics of the original USB entry have been covered in more detail, so I removed those. I'm not sure if/how I'll cover the BIOS support for USB devices (i.e, the two sections starting here). My intuition is to move these two sections to stubs for USB Human Input Devices and USB Mass Storage Devices, respectively. All the remaining content of the original USB wiki (besides those two sections) I plan to cover in more detail under USB Framework and Typical Organization of System Software.
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.
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Updated USB Wiki

Post by madeofstaples »

I finished the USB protocol section!

I also added illustrations for the frames/microframes section, and rearranged some of the diagrams at the beginning to make them easier to reference from reading the text (I didn't know about the gallery tag the first time around).

this is coming along...
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.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: Updated USB Wiki

Post by VolTeK »

congrats nice work :)
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Updated USB Wiki

Post by Troy Martin »

More barnstars are in order!!!
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Updated USB Wiki

Post by madeofstaples »

Another update:

I spent most of the day pumping out the USB Framework section. I just have to cover the standard descriptors (I've made the tables for two of them, but would like to add some explanations before or after the tables), and then I will have covered just about everything you need to know from the USB 2.0 specifications (besides USB 2.0 hubs, which will end up as their own wiki entry, as they are a class of USB device).

Then the Typical Organization of System Software will just discuss the reasons for dividing up the usb-related drivers into categories like the host controller drivers, the hub driver, the usb driver, and the device drivers, etc. With it, I hope to draw a "bigger picture" to clarify any concepts that might have been confusing, but overall the section should be the easiest to complete :)
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.
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Updated USB Wiki

Post by madeofstaples »

berkus wrote:Tremendous work! Mucho gracias!
De nada :)

I've finished up the USB Framework section and wrote a brief "Typical Organization of System Software" section, which I'm not sure if it needs much more than what I've written.

I moved the remaining old wiki content to a wiki entry for USB Mass Storage Class Devices and USB Human Input Devices, though it wasn't clear to me if there was a specific way to mark an article as a stub :?

I am currently considering some potential final changes to the USB entry, but the article as it is now may be considered a draft.

Now, I'm going to treat my brain to a small vacation from USB before looking over the article for any of the inevitable, embarrassingly obvious typos or miswordings that I'm sure are there.
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.
Post Reply