Re: USB device just moves
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Sun, 17 Feb 2008 00:58:52 GMT
Eric <Scorpus@xxxxxxxxxxxxxx> wrote:
USB must be polled at regular intervals,...
Interrupt and isochronous pipes must be polled at regular intervals. Other
pipe types do not.
...if a so called interrupt packet is
received (after it was polled for) then an SMI handler is invoked, and while
that handler is running **ALL** other code execution stops dead!
Oh, come on. Who told you that? Once an operating system is running, a
USB host controller is just a standard PCI device with a standard
interrupt-based DMA transfer scheme. SMI is not involved.
This can happen many times a second depending on whats connected and the
system design.
The usb keyboard is the worst offender with a transaction going something like
this:
pc formats and sends packet to keyboard -> do you have a key for me?
...
pc formats and sends packet to keyboard -> do you have a key for me?
-- repeated 50 - 100 times a second --
keyboard sends data back with keystroke to pc
USB controller invokes SMM (system management mode). Entire PC (all cores)
stops executing code or interrupts and starts executing SMI handler
SMI handler stuffs key data into 8249 keyboard controller.
SMI handler ends
An interrupt is generated either by or on behalf of the keyboard controller
8249 keyboard.
PC reads 8249 and retrieves key data
Is this insane or what?
That kind of BIOS magic might be needed to simulate the 8249 keyboard
controller at boot time, but once an operating system loads, all of that
goes out the window. It's just a standard PCI device using standard PCI
interrupts. No SMI.
There is nothing inherently wrong with a polled, dedicated master/slave bus
design. It avoids all the problems of assigning a bus master or handling
collisions among multiple senders.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- Follow-Ups:
- Re: USB device just moves
- From: Rainer Weikusat
- Re: USB device just moves
- References:
- USB device just moves
- From: phil-news-nospam
- Re: USB device just moves
- From: Mike
- Re: USB device just moves
- From: phil-news-nospam
- Re: USB device just moves
- From: Eric
- USB device just moves
- Prev by Date: Re: How to determine if running on a 32 or 64 bits kernel ?
- Next by Date: Re: USB device just moves
- Previous by thread: Re: USB device just moves
- Next by thread: Re: USB device just moves
- Index(es):
Relevant Pages
|