#tyndur · 2010-04-17
61 Nachrichten · Seite 1 von 1 · Original-CSV herunterladen
- eddybaaah
- eddybI was just wondering where did i9 go...
- eddybit's Gulftown/Core i7-980X :P
- eddybdammit, it's $1000
- eddybtaljieth: ping
- taljetheddyb: pong
- eddybso
- eddybmatt wants to write a CDI sata driver
- eddyband there is no scsi interface for CDI right now
- eddybam I right?
- taljethThere is something which is used for ATAPI, but it's most likely very incomplete
- eddybactually
- taljethHm, should I read yesterday's IRC logs for #pedigree?
- eddybwhy?
- eddybnothing there
- eddybafaik
- taljethAh, ok
- taljethWas just assuming that you discussed it with Matt there
- eddybnope
- eddybthe SCSI layer in pedigree was discussed long ago
- eddybyet only a couple a days ago i managed to write it
- taljethPushed already?
- eddybnope
- taljethOk
- 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);
- eddybalso a method to retrieve the number of units on the controller
- eddybconsidering the other part of the SCSI layer is implemented within the OS, that's all :D
- taljethhttp://git.tyndur.org/?p=cdi.git;a=blob;f=include/cdi/scsi.h;h=8edccbf6707c29ce5289b4f499e01a0d728e6e19;hb=HEAD
- taljethThis is how it's defined in CDI
- taljethHowever, I'm absolutely open for improving that interface
- taljethI think it was just hacked together then to be able to handle CD-ROM in some way
- eddybhmm
- eddybif you really want to use a structure(for the command), I'm ok with that
- taljethI think it's nicer than a function with lots of arguments
- taljethBut probably a matter of taste
- eddybyou'd only need to add a 8bit "lun" field to the structure
- eddyband that method to retrieve the number of units
- eddybor
- taljethThat's handled via the cdi_device* pointer passed to request()
- taljethA SCSI device surely should know its LUN
- eddyba 8bit "max_lun" field in cdi_scsi_driver
- eddybhmm
- taljethcdi_scsi_device I think.
- eddybmax lun as in number of units
- taljethAh, max_lun. Yes, that may be suited in the driver
- eddyb"considering the other part of the SCSI layer is implemented within the OS"
- eddybmatt asked for a SCSI layer *inside* pedigree, so cdi should only provide the minimal stuff
- 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
- eddybah, ok
- eddybsome while ago, while looking at some linux driver, I noticed the resemblance between linux drivers and CDI ones, and an idea came...
- eddybhow hard could it be to hack together some macros and functions and make them work under CDI?
- XanClicI got that idea, too, and I know another one who wonderend about that *g*
- taljethYou could have a try, but I'd say very hard
- 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
- eddyb*macros*
- taljethThat starts with their interface to upper layers and doesn't end with memory management and VFS access
- taljethIf there isn't a clear 1:1 mapping, writing macros to do that will prove hard
- taljethAnd I honestly doubt that there is a 1:1 mapping
- eddybyou underestimate me >:)
- taljethBut hey, I don't want to discourage you if you want to have a try. Might be an interesting project.
- taljethJust not something for one Saturday evening ;-)