SATA AHCI Driver GSoC - Update
by amaneureka | July 25, 2016
Links
Short Brief
Supported Features:
Driver Testing
Platform: Virtual Machine (Vmware)
Operating System: Windows Server 2003 x86 Free Build
Device Management Window
Detected Devices: "2 3 SCSI Disk Driver"
2, 3 are actually faked VendorId and Product ID, Please refer to code for more detail.
Vmware Settings Tab
Disk Management
Though windows is not able to detect NTFS formatted partition (Disk 2, Partition 1) maybe because It was expecting a write support first. So, I tried to dump partition and compared it with raw virtual hard disk file(VHD) dump, So Reading Feature is working perfectly.
Active Disk Editor - VHD mounted image (Host PC, Windows 10)
Active Disk Editor - Win2k3 (Vmware)
SCSIOP_READ
Routine: DeviceRequestReadWrite
Description: This Routine Handles Read & Write SRB_FUNCTION_EXECUTE_SCSI Requests, but currently supports Read Request only.
Unsupported Features:
I am unsure about CommandReg value (considering all cases) and that is why I am not able to program TaskFile for write request, though Routine is perfectly implemented and a correct value of CommandReg will make it work.
on a side note, I tried to set CommandReg = IDE_COMMAND_WRITE_DMA, But It crashed with Fatal Error (TFES : TaskFileErrorStatus != 0)
SCSIOP_INQUIRY
Routine: DeviceInquiryRequest
Description: This Routine Handles EVPD and VPD Requests.
Unsupported Features:
Known Issues
Well, There is only one issue which I was able to find while testing the driver. It is the file system detection, Though It maybe because windows was expecting a write support too, and hence failed to detect filesystem; But I am not really sure on this point so I have better decided to put this into known issue section.
Why no blog?
Well It is known that I didn't made any blog entry for past 3 weeks, Below I have listed the reason
Short Brief
Supported Features:
- Device Adapter Detection
- Non-Fatal Error Handling
- Adapter Srb PNP Request
- SCSIOP_INQUIRY : Device Inquiry
- SCSIOP_REPORT_LUNS : Report LUN
- SCSIOP_READ_CAPACITY : Device Geometry
- SCSIOP_TEST_UNIT_READY
- SCSIOP_READ : Device Read Request
- Fatal Error Handling
- SCSIOP_MODE_SENSE
- SCSIOP_WRITE
- NCQ : Native Command Queuing
- Cache and Priority Requests
Driver Testing
Platform: Virtual Machine (Vmware)
Operating System: Windows Server 2003 x86 Free Build
Device Management Window
Detected Devices: "2 3 SCSI Disk Driver"
2, 3 are actually faked VendorId and Product ID, Please refer to code for more detail.
Vmware Settings Tab
Disk Management
Though windows is not able to detect NTFS formatted partition (Disk 2, Partition 1) maybe because It was expecting a write support first. So, I tried to dump partition and compared it with raw virtual hard disk file(VHD) dump, So Reading Feature is working perfectly.
Active Disk Editor - VHD mounted image (Host PC, Windows 10)
Active Disk Editor - Win2k3 (Vmware)
SCSIOP_READ
Routine: DeviceRequestReadWrite
Description: This Routine Handles Read & Write SRB_FUNCTION_EXECUTE_SCSI Requests, but currently supports Read Request only.
Unsupported Features:
- SCSIOP_WRITE
- NCQ
- Non Lba48BitMode
- SectorCount < 0x100
I am unsure about CommandReg value (considering all cases) and that is why I am not able to program TaskFile for write request, though Routine is perfectly implemented and a correct value of CommandReg will make it work.
on a side note, I tried to set CommandReg = IDE_COMMAND_WRITE_DMA, But It crashed with Fatal Error (TFES : TaskFileErrorStatus != 0)
SCSIOP_INQUIRY
Routine: DeviceInquiryRequest
Description: This Routine Handles EVPD and VPD Requests.
Unsupported Features:
- VPD_SERIAL_NUMBER (storport.h)
- VPD_DEVICE_IDENTIFIERS (storport.h)
- VPD_MEDIA_SERIAL_NUMBER (storport.h)
- VPD_NETWORK_MANAGEMENT_ADDRESSES (storport.h)
- VPD_EXTENDED_INQUIRY_DATA (storport.h)
- VPD_MODE_PAGE_POLICY (storport.h)
- VPD_SCSI_PORTS (storport.h)
Known Issues
Well, There is only one issue which I was able to find while testing the driver. It is the file system detection, Though It maybe because windows was expecting a write support too, and hence failed to detect filesystem; But I am not really sure on this point so I have better decided to put this into known issue section.
Why no blog?
Well It is known that I didn't made any blog entry for past 3 weeks, Below I have listed the reason
- Week 6: I was selected for Indian Programming Camp organised by CodeChef, They shortlisted 22 candidates (sport programmers) to join the camp and learn some advance tricks to tackle programming contest's problems. I don't want to miss this oppurtunity so I talked to my mentor and he supported my decision of halting project for few days and join the camp.
Though I wasn't really inactive on project, I completed Dpc handling routine while traveling and fixed many bugs whenever I got time in camp. - Week 7: I was back to home, but interrupt bug actually pissed me, and I was giving 100% of my time in debugging stuffs.
- Week 8: Well, All bugs were fixed by the end of week 7; But I was little tensed about project timeline so I worked on unsupported feature and decided to create blog entry once I am done with Read Request feature