#tyndur · 2010-02-10

779 Nachrichten · Seite 1 von 4 · Original-CSV herunterladen

  1. kwolfYay, we've got another Matt!
  2. kwolfGood morning
  3. pcmattmanHi kwolf
  4. 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)
  5. pcmattmanDepends on how he defines serial/parallel port
  6. pcmattmanIf he means the hardware (ie, com1, lpt0), I have no idea what he would be talking about
  7. kwolfYeah, that's what he was talking about
  8. kwolfBut I'm more surprised that he's looking at CDI at all
  9. pcmattmanI doubt he'd convert, but you should always know your opposition
  10. kwolfRight. Just bad luck for him that he's looking at an outdated implementation ;-)
  11. pcmattmanHeh :(
  12. kwolfThat said, he's better of than me. I was looking at a non-existent implementation for UDI...
  13. kwolf*off
  14. pcmattmanHeh, true
  15. pcmattmanI wonder how people will write clean, elegant, implementations of UDI
  16. kwolfLet me guess: They won't
  17. pcmattmanCDI lends itself to the task, imho
  18. kwolfJust like I doubt that most CDI implementation are going to be clean ;-)
  19. pcmattmanWell, clean*er* ;)
  20. kwolfIt's definitely easier to do on the CDI level than in meta-meta space
  21. pcmattmanRight
  22. pcmattmanI'll be back soon
  23. pcmattmanI'm back
  24. kwolfwb
  25. eddybback :)
  26. eddybi mean, moin :)
  27. XanClicMoin, eddyb
  28. eddybXanClic: does your UHCI driver work in VMware?
  29. XanClicNever tested and I doubt so
  30. XanClicRemember that I don't have VMware ;-)
  31. eddybah, right...
  32. XanClicYesterday I got it working on Kubuntu, but my Kubuntu runs in VirtualBox
  33. XanClicAnd everytime I start VMware there, VirtualBox crashs
  34. eddybwhere i can browse the code, anyway?
  35. eddybheh :D
  36. XanClicHm, good question
  37. XanClicAn old version is available here:
  38. XanClichttp://git.tyndur.org/?p=cdi.git;a=blob;f=usb/uhci.c;h=bd9169fe985c0fe54c550d897fa6cacc4d6bba94;hb=usb
  39. eddybnot again...
  40. eddybit's not loading :((
  41. XanClicBut the new version isn't available in the CDI repository and I think I also didn't upload it in my own OSes
  42. XanClicHm...
  43. eddybdoes it do a while(true); in javascript, by any chance?
  44. eddybOSes?
  45. XanClicoperating systems
  46. XanClicDon't know how to create a plural in abbreviations *g*
  47. XanClicAh, I did
  48. XanClichttp://gitorious.org/paloxena/kernel2/trees/master/src/kernel/drivers/cdi/usb-hcd/uhci
  49. eddybno, i meant
  50. eddyb"what did you mean by \"my own OSes\"?"
  51. XanClicThe ones I was developing while working on my USB driver
  52. XanClicMainly paloxena1 and paloxena2
  53. XanClicCurrently I'm working at paloxena3 ;-)
  54. eddybaaah
  55. eddybthey are versions?
  56. XanClicHm, some kind of
  57. XanClicEvery version is (nearly) a complete rewrite
  58. eddybheh
  59. eddyb cdi_pci_config_outw(uhci->pcidev, 4, 0x05);
  60. eddybwhat is that for?
  61. XanClicThat's a thing I introduced and is only available on paloxena2 right now
  62. XanClicIt's for manipulating the PCI configuration space directly
  63. eddybaand?
  64. eddybwhat does that line do, what's offset 4?
  65. XanClicThat one is for activating the bus master capability, faiar
  66. XanClic*afair
  67. XanClicAnd enabling I/O space
  68. eddyblemme try it :)
  69. eddybokey...
  70. eddybwht PIRQ stands for, specs are not explicite
  71. eddyb*what
  72. eddybPCI IRQ?
  73. XanClicI think so
  74. XanClicYou should've asked me a half year ago ;-)
  75. eddyba half a year ago i think i didn't even heard of CDI or tyndur...
  76. eddybmaybe CDI
  77. XanClicI'm not very much involved in týndur ;-)
  78. eddybwhatsoever
  79. eddybwhat do you think i should reply to the EHCI thread?
  80. eddybbecause they are so confused, they even confuse me :|
  81. XanClicHm, I don't know anything about EHCI and I don't understand the current discussion
  82. XanClicI don't know why they want to poll, IRQ handling is much easier, imo...
  83. XanClicAnd why they always mix interrupt transfers with IRQs
  84. eddybexactly
  85. 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 :)
  86. XanClicMeh, I hoped it would be like OHCI :D
  87. eddybwhen i opened the OHCI specs and i saw Microsoft i knew something wasn't right...
  88. XanClicOh, OHCI is a lot easier
  89. eddybIIRC, i found the registers at the end of the pdf
  90. XanClice.g., you have to know the frame number of a transfer when using UHCI
  91. XanClicBut with OHCI you don't have to care
  92. eddybwhatsoever :)
  93. eddybi do sync with UHCI
  94. eddybaka one at a time
  95. eddyband no interrupt transfers
  96. eddybbut i want to change the whole system
  97. XanClicI also disabled isochronous transfers ;-)
  98. XanClicBulk and control are enough for mass storage devices :-)
  99. XanClicAt least for most of them
  100. eddybhmm, do you think interrupt transfers are good for something else than INs?
  101. eddybaddInterrupt and async* should be enough for the HCD...
  102. XanClicI heard something about floppy disk drives would use them
  103. eddybthen in UsbManager i'd do sync transactions by adding a sync one and waiting to finish...
  104. XanClicTo signal when a command has finished
  105. eddybbut isn't that an IN?
  106. eddyb*adding an async one
  107. eddybalso, what's that isochronus crap?
  108. XanClicMicrophones and so on
  109. eddybi know, i know, google translator...
  110. eddybhuh?
  111. XanClicTransferring data with a guaranteed bandwidth
  112. XanClicBut you don't know if the stuff is received as it was sent
  113. eddyblike you change the buffer when the last transfer was successful?
  114. XanClicA microphone uses for example 100 kbit/s
  115. eddybPIRQ and no success XD
  116. XanClicAnd those 100 kbit/s have to be transferred in any case
  117. XanClicRegardless of the correctness of the data
  118. eddybthat 4 means byte 4 or int 4?
  119. XanClicOffset 4 in PCI configuration spae
  120. XanClic*space
  121. eddybso what kind of 4?
  122. XanClicByte
  123. eddybok
  124. XanClicThat's the command register
  125. 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...
  126. eddybso it'd be 1 here :)
  127. XanClicBut don't forget that I'm modifying a word
  128. XanClicAnd not a dword
  129. eddybi wonder what's at 6 :P...
  130. XanClicLemme take a look...
  131. XanClicIt's the status register
  132. eddybgreat, nothing happens XD
  133. XanClicafk
  134. XanClicI didn't expect that to be the cause of your trouble anyway ;-)
  135. XanClicBecause the BIOS should have set that value
  136. eddybHOW THE FUCKING LINUX DOES IT!?
  137. XanClicHave you disabled legacy support?
  138. XanClicThat was my trouble's cause ;-)
  139. 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...
  140. eddyblegacy support?
  141. XanClicAha ;-)
  142. eddybwhat you mean?
  143. XanClicSee line 179
  144. XanClicuntil 246
  145. XanClicof init.c
  146. eddybsomething tells me i saw it already
  147. eddybyup, i did
  148. XanClicYou have to explicitly disable that legacy support (emulating PS/2 keyboard, mouse, int 13h drives, etc.)
  149. eddybi am doing it...
  150. eddybwriting 0x8f00 and then 0x2000(for that damn PIRQ)
  151. eddybisn't taht enough?
  152. XanClicI don't know, I do it the way Linux does it :D
  153. XanClicBut don't tell anyone, because my driver is MIT licensed ;-)
  154. eddybi mean, what you do and i don't?
  155. XanClicYou have my code, you're free to compare
  156. eddybbut what's to disable?
  157. eddybyou don't do more than those two calls i do, too
  158. XanClicHm, I write 0x8F00
  159. XanClicThen I reset all root ports
  160. XanClics/all root ports/the HC/
  161. XanClicDisable IRQs, power off all root ports...
  162. XanClicInitialise the frames (frame number, time between frames, frame base)
  163. XanClicAnd then I write 0x2000
  164. XanClicBut I don't have any opportunity to test it on VMware
  165. XanClicBut as said above, I doubt it'll work ;-)
  166. XanClicOn real hardware my driver at least generates stalled endpoints *g*
  167. eddybit can be that teh controller doesn't let you set INTR while there reset, or it's reseted after?
  168. XanClicI issue the reset command, wait until it's finished and set the interrupt registers then
  169. eddybfunny, IIRC i got a halt if i'd pool GRES to see when it's done...
  170. XanClicI use a timeout there
  171. eddybi know for sure i got a halt if i poll for reset bit in PORTSC...
  172. eddybok, how much?
  173. XanClic500 ms
  174. XanCliclines 205 to 209
  175. eddybi think i am so dumb to not see the silly little problem
  176. eddybok
  177. eddybah, there you are
  178. eddybdammitWeNeedABloodySleepFunctionAndThisSemaphoreIsRedundantBecauseWeDontHaveOne.acquire(1, 0, 5000);
  179. eddybthat is 5ms :)
  180. XanClicI think I'll continue on writing paloxena3 for now and then I'll write a native USB driver...
  181. XanClicIn GPL or whatever
  182. XanClicSo I'm free to include Linux code
  183. XanClicAnd that there'll be maybe a working CDI driver
  184. eddybpaloxena is C or C++?
  185. XanClicC
  186. eddybmeh :(
  187. XanClicThough there is a small test OS written in Sather, paloxena-s
  188. eddyba funny idea of matt was to write o compatibitily layer between CDI and linux...
  189. XanClicHey, that was my idea :-)
  190. XanClicAsk DerHartmut if he returns *g*
  191. eddybdoes CDI got a standard usb layer?
  192. eddybwhatever :)
  193. eddybi amy be able to port something dumb... a few defines will do(i think)
  194. eddyb*may
  195. XanClicWe're working on a bus interfae
  196. XanClic*interface
  197. XanClicI once sent a CDI.usb and CDI.usb-hcd proposal
  198. XanClicBut those were really bad
  199. eddybi just remembered i have to update the CDI module
  200. eddybbbs, food