
code
Keep browsing
I've been reading some more code and I'm getting more confident with it.
Basically data transfer is done with memcpy.
In the ehci controller, registers are mapped every time a controller is found. This is done in the controller constructor.
As the ehci specs says:
Register Space. Implementation-specific parameters and capabilities, plus operational control and
status registers. This space, normally referred to as I/O space, must be implemented as memory-mapped
I/O space.
So...
EHCI::EHCI(pci_info *info, Stack *stack)
...
// map the registers
fRegisterArea = map_physical_memory("EHCI memory mapped registers",
(void *)physicalAddress, mapSize, B_ANY_KERNEL_BLOCK_ADDRESS, Browsing the USB Stack code
I said it already, but I'm going to say it a million of times, I've never EVER would expected to work on such a project for the Google Summer of Code, I actually didn't even think I would get in the soc. But anyway, here I am... so let's begin!
Last night after I got bored reading the Kernel Kit section of the Be Book (it was about threads and related functions), I opened my shell and I dived right into the USB stack code.
I tried to follow some functions with ctags, because I was interested about how the actual data is sent to the device, and here is what I found out.
This is the method used to send data to the device.
GetBusManager()->SubmitTransfer(transfer);
EHCI driver status...
status_t
EHCI::SubmitTransfer(Transfer *transfer)
{
... 




