#tyndur · 2010-02-10
779 Nachrichten · Seite 1 von 4 · Original-CSV herunterladen
- kwolfYay, we've got another Matt!
- kwolfGood morning
- pcmattmanHi kwolf
- kwolfHm, do you have any idea what Love4Boobies has in mind? Yesterday he asked me about serial/parallel ports in CDI and that he was looking at the Pedigree CDI implementation. But when I came back from lunch he was away, so I couldn't ask him (or rather, I didn't get an answer any more)
- pcmattmanDepends on how he defines serial/parallel port
- pcmattmanIf he means the hardware (ie, com1, lpt0), I have no idea what he would be talking about
- kwolfYeah, that's what he was talking about
- kwolfBut I'm more surprised that he's looking at CDI at all
- pcmattmanI doubt he'd convert, but you should always know your opposition
- kwolfRight. Just bad luck for him that he's looking at an outdated implementation ;-)
- pcmattmanHeh :(
- kwolfThat said, he's better of than me. I was looking at a non-existent implementation for UDI...
- kwolf*off
- pcmattmanHeh, true
- pcmattmanI wonder how people will write clean, elegant, implementations of UDI
- kwolfLet me guess: They won't
- pcmattmanCDI lends itself to the task, imho
- kwolfJust like I doubt that most CDI implementation are going to be clean ;-)
- pcmattmanWell, clean*er* ;)
- kwolfIt's definitely easier to do on the CDI level than in meta-meta space
- pcmattmanRight
- pcmattmanI'll be back soon
- pcmattmanI'm back
- kwolfwb
- eddybback :)
- eddybi mean, moin :)
- XanClicMoin, eddyb
- eddybXanClic: does your UHCI driver work in VMware?
- XanClicNever tested and I doubt so
- XanClicRemember that I don't have VMware ;-)
- eddybah, right...
- XanClicYesterday I got it working on Kubuntu, but my Kubuntu runs in VirtualBox
- XanClicAnd everytime I start VMware there, VirtualBox crashs
- eddybwhere i can browse the code, anyway?
- eddybheh :D
- XanClicHm, good question
- XanClicAn old version is available here:
- XanClichttp://git.tyndur.org/?p=cdi.git;a=blob;f=usb/uhci.c;h=bd9169fe985c0fe54c550d897fa6cacc4d6bba94;hb=usb
- eddybnot again...
- eddybit's not loading :((
- XanClicBut the new version isn't available in the CDI repository and I think I also didn't upload it in my own OSes
- XanClicHm...
- eddybdoes it do a while(true); in javascript, by any chance?
- eddybOSes?
- XanClicoperating systems
- XanClicDon't know how to create a plural in abbreviations *g*
- XanClicAh, I did
- XanClichttp://gitorious.org/paloxena/kernel2/trees/master/src/kernel/drivers/cdi/usb-hcd/uhci
- eddybno, i meant
- eddyb"what did you mean by \"my own OSes\"?"
- XanClicThe ones I was developing while working on my USB driver
- XanClicMainly paloxena1 and paloxena2
- XanClicCurrently I'm working at paloxena3 ;-)
- eddybaaah
- eddybthey are versions?
- XanClicHm, some kind of
- XanClicEvery version is (nearly) a complete rewrite
- eddybheh
- eddyb cdi_pci_config_outw(uhci->pcidev, 4, 0x05);
- eddybwhat is that for?
- XanClicThat's a thing I introduced and is only available on paloxena2 right now
- XanClicIt's for manipulating the PCI configuration space directly
- eddybaand?
- eddybwhat does that line do, what's offset 4?
- XanClicThat one is for activating the bus master capability, faiar
- XanClic*afair
- XanClicAnd enabling I/O space
- eddyblemme try it :)
- eddybokey...
- eddybwht PIRQ stands for, specs are not explicite
- eddyb*what
- eddybPCI IRQ?
- XanClicI think so
- XanClicYou should've asked me a half year ago ;-)
- eddyba half a year ago i think i didn't even heard of CDI or tyndur...
- eddybmaybe CDI
- XanClicI'm not very much involved in týndur ;-)
- eddybwhatsoever
- eddybwhat do you think i should reply to the EHCI thread?
- eddybbecause they are so confused, they even confuse me :|
- XanClicHm, I don't know anything about EHCI and I don't understand the current discussion
- XanClicI don't know why they want to poll, IRQ handling is much easier, imo...
- XanClicAnd why they always mix interrupt transfers with IRQs
- eddybexactly
- eddybyou don't have to know EHCI(it's just like UHCI, anyway, excepts it needs more memory to allocate :P) to understand their confusion :)
- XanClicMeh, I hoped it would be like OHCI :D
- eddybwhen i opened the OHCI specs and i saw Microsoft i knew something wasn't right...
- XanClicOh, OHCI is a lot easier
- eddybIIRC, i found the registers at the end of the pdf
- XanClice.g., you have to know the frame number of a transfer when using UHCI
- XanClicBut with OHCI you don't have to care
- eddybwhatsoever :)
- eddybi do sync with UHCI
- eddybaka one at a time
- eddyband no interrupt transfers
- eddybbut i want to change the whole system
- XanClicI also disabled isochronous transfers ;-)
- XanClicBulk and control are enough for mass storage devices :-)
- XanClicAt least for most of them
- eddybhmm, do you think interrupt transfers are good for something else than INs?
- eddybaddInterrupt and async* should be enough for the HCD...
- XanClicI heard something about floppy disk drives would use them
- eddybthen in UsbManager i'd do sync transactions by adding a sync one and waiting to finish...
- XanClicTo signal when a command has finished
- eddybbut isn't that an IN?
- eddyb*adding an async one
- eddybalso, what's that isochronus crap?
- XanClicMicrophones and so on
- eddybi know, i know, google translator...
- eddybhuh?
- XanClicTransferring data with a guaranteed bandwidth
- XanClicBut you don't know if the stuff is received as it was sent
- eddyblike you change the buffer when the last transfer was successful?
- XanClicA microphone uses for example 100 kbit/s
- eddybPIRQ and no success XD
- XanClicAnd those 100 kbit/s have to be transferred in any case
- XanClicRegardless of the correctness of the data
- eddybthat 4 means byte 4 or int 4?
- XanClicOffset 4 in PCI configuration spae
- XanClic*space
- eddybso what kind of 4?
- XanClicByte
- eddybok
- XanClicThat's the command register
- eddybbecause in pedigree, PciBus uses 6bit offset(aka no lower 2 bits) and either pc[away] forgot to add a >>2, either he didn't want to, but i have to do that myself...
- eddybso it'd be 1 here :)
- XanClicBut don't forget that I'm modifying a word
- XanClicAnd not a dword
- eddybi wonder what's at 6 :P...
- XanClicLemme take a look...
- XanClicIt's the status register
- eddybgreat, nothing happens XD
- XanClicafk
- XanClicI didn't expect that to be the cause of your trouble anyway ;-)
- XanClicBecause the BIOS should have set that value
- eddybHOW THE FUCKING LINUX DOES IT!?
- XanClicHave you disabled legacy support?
- XanClicThat was my trouble's cause ;-)
- eddybas i said, i'm ok with cheap hardware, after all, i buy it, but please, make a datasheet where it says all we have to do...
- eddyblegacy support?
- XanClicAha ;-)
- eddybwhat you mean?
- XanClicSee line 179
- XanClicuntil 246
- XanClicof init.c
- eddybsomething tells me i saw it already
- eddybyup, i did
- XanClicYou have to explicitly disable that legacy support (emulating PS/2 keyboard, mouse, int 13h drives, etc.)
- eddybi am doing it...
- eddybwriting 0x8f00 and then 0x2000(for that damn PIRQ)
- eddybisn't taht enough?
- XanClicI don't know, I do it the way Linux does it :D
- XanClicBut don't tell anyone, because my driver is MIT licensed ;-)
- eddybi mean, what you do and i don't?
- XanClicYou have my code, you're free to compare
- eddybbut what's to disable?
- eddybyou don't do more than those two calls i do, too
- XanClicHm, I write 0x8F00
- XanClicThen I reset all root ports
- XanClics/all root ports/the HC/
- XanClicDisable IRQs, power off all root ports...
- XanClicInitialise the frames (frame number, time between frames, frame base)
- XanClicAnd then I write 0x2000
- XanClicBut I don't have any opportunity to test it on VMware
- XanClicBut as said above, I doubt it'll work ;-)
- XanClicOn real hardware my driver at least generates stalled endpoints *g*
- eddybit can be that teh controller doesn't let you set INTR while there reset, or it's reseted after?
- XanClicI issue the reset command, wait until it's finished and set the interrupt registers then
- eddybfunny, IIRC i got a halt if i'd pool GRES to see when it's done...
- XanClicI use a timeout there
- eddybi know for sure i got a halt if i poll for reset bit in PORTSC...
- eddybok, how much?
- XanClic500 ms
- XanCliclines 205 to 209
- eddybi think i am so dumb to not see the silly little problem
- eddybok
- eddybah, there you are
- eddybdammitWeNeedABloodySleepFunctionAndThisSemaphoreIsRedundantBecauseWeDontHaveOne.acquire(1, 0, 5000);
- eddybthat is 5ms :)
- XanClicI think I'll continue on writing paloxena3 for now and then I'll write a native USB driver...
- XanClicIn GPL or whatever
- XanClicSo I'm free to include Linux code
- XanClicAnd that there'll be maybe a working CDI driver
- eddybpaloxena is C or C++?
- XanClicC
- eddybmeh :(
- XanClicThough there is a small test OS written in Sather, paloxena-s
- eddyba funny idea of matt was to write o compatibitily layer between CDI and linux...
- XanClicHey, that was my idea :-)
- XanClicAsk DerHartmut if he returns *g*
- eddybdoes CDI got a standard usb layer?
- eddybwhatever :)
- eddybi amy be able to port something dumb... a few defines will do(i think)
- eddyb*may
- XanClicWe're working on a bus interfae
- XanClic*interface
- XanClicI once sent a CDI.usb and CDI.usb-hcd proposal
- XanClicBut those were really bad
- eddybi just remembered i have to update the CDI module
- eddybbbs, food