#tyndur · 2010-04-17

61 Nachrichten · Seite 1 von 1 · Original-CSV herunterladen

  1. eddybaaah
  2. eddybI was just wondering where did i9 go...
  3. eddybit's Gulftown/Core i7-980X :P
  4. eddybdammit, it's $1000
  5. eddybtaljieth: ping
  6. taljetheddyb: pong
  7. eddybso
  8. eddybmatt wants to write a CDI sata driver
  9. eddyband there is no scsi interface for CDI right now
  10. eddybam I right?
  11. taljethThere is something which is used for ATAPI, but it's most likely very incomplete
  12. eddybactually
  13. taljethHm, should I read yesterday's IRC logs for #pedigree?
  14. eddybwhy?
  15. eddybnothing there
  16. eddybafaik
  17. taljethAh, ok
  18. taljethWas just assuming that you discussed it with Matt there
  19. eddybnope
  20. eddybthe SCSI layer in pedigree was discussed long ago
  21. eddybyet only a couple a days ago i managed to write it
  22. taljethPushed already?
  23. eddybnope
  24. taljethOk
  25. eddybwhat a SCSI controller driver has to implement is a method, in my code being void sendCommand(size_t nUnit, uintptr_t pCommand, uint8_t nCommandSize, uintptr_t pRespBuffer, uint16_t nRespBytes, bool bWrite);
  26. eddybalso a method to retrieve the number of units on the controller
  27. eddybconsidering the other part of the SCSI layer is implemented within the OS, that's all :D
  28. taljethhttp://git.tyndur.org/?p=cdi.git;a=blob;f=include/cdi/scsi.h;h=8edccbf6707c29ce5289b4f499e01a0d728e6e19;hb=HEAD
  29. taljethThis is how it's defined in CDI
  30. taljethHowever, I'm absolutely open for improving that interface
  31. taljethI think it was just hacked together then to be able to handle CD-ROM in some way
  32. eddybhmm
  33. eddybif you really want to use a structure(for the command), I'm ok with that
  34. taljethI think it's nicer than a function with lots of arguments
  35. taljethBut probably a matter of taste
  36. eddybyou'd only need to add a 8bit "lun" field to the structure
  37. eddyband that method to retrieve the number of units
  38. eddybor
  39. taljethThat's handled via the cdi_device* pointer passed to request()
  40. taljethA SCSI device surely should know its LUN
  41. eddyba 8bit "max_lun" field in cdi_scsi_driver
  42. eddybhmm
  43. taljethcdi_scsi_device I think.
  44. eddybmax lun as in number of units
  45. taljethAh, max_lun. Yes, that may be suited in the driver
  46. eddyb"considering the other part of the SCSI layer is implemented within the OS"
  47. eddybmatt asked for a SCSI layer *inside* pedigree, so cdi should only provide the minimal stuff
  48. taljethWe should enable OSes to do whatever they want to do, i.e. we can do more in CDI, but allow Pedigree to ignore that part
  49. eddybah, ok
  50. eddybsome while ago, while looking at some linux driver, I noticed the resemblance between linux drivers and CDI ones, and an idea came...
  51. eddybhow hard could it be to hack together some macros and functions and make them work under CDI?
  52. XanClicI got that idea, too, and I know another one who wonderend about that *g*
  53. taljethYou could have a try, but I'd say very hard
  54. taljethThe problem is that while the drivers' structure looks similar (they are drivers implementing the same, after all), Linux drivers use all kinds of Linux functions
  55. eddyb*macros*
  56. taljethThat starts with their interface to upper layers and doesn't end with memory management and VFS access
  57. taljethIf there isn't a clear 1:1 mapping, writing macros to do that will prove hard
  58. taljethAnd I honestly doubt that there is a 1:1 mapping
  59. eddybyou underestimate me >:)
  60. taljethBut hey, I don't want to discourage you if you want to have a try. Might be an interesting project.
  61. taljethJust not something for one Saturday evening ;-)