Selvaraj,

I don't think you need write such driver again as it has been existing for a 
long time.

Please refer MdeModulePkg/Bus/Ata/AtaAtapiPassThru driver.

Thanks
Feng

-----Original Message-----
From: Murali Selvaraj [mailto:[email protected]] 
Sent: Saturday, September 21, 2013 11:46
To: [email protected]
Subject: [edk2] Identify IDE devices and device information in UEFI

Hi All,

I am developing UEFI driver which will identify ATA/ATAPI devices information 
on EFI shell.

Find the algorithm of my driver and share your suggestions and ideas.

1. AHCI mode & IDE mode
2. scan PCI devices for class code 0x010601 and 0x0101 3. if AHCI mode, get 
AHCI bar, and check Ports implement, use ATAPassThru protocol to send Identify 
cmd 4. if UEFI mode, get command ports and control ports by reading ide 
controller PCI configure offset 0x10~0x1F.


As of now, I have written my driver till this identification (AHCI or IDE 
mode).For me,IDE controller mode detected (DE controller class code = 0x0101xx).


The rest of algorithm to be implemented in my driver :

UEFI Mode:

Command and Control Block the access mode for the IO Space, there IO BARs, 
defined in the SATA / ATA PCI Configuration Space offset 0x10, 0x14, 0x18, 
0x1c, as follows:
    -Offset 10h-Primary Command Block Base Address
    -Offset 14h-Primary Control Block Base Address
    -Offset 18h-Secondary Command Block Base Address
    -Offset 1Ch-Secondary Control Block Base Address


With the help of above registers how can I send IDENTIFY command and other ATA 
commands to get device present status as well as device information (serial No 
and Model No).


Query:


Do I need to use  ATAPassThru protocol for IDE mode to send ATA commands to the 
device?


>From SATA / ATA PCI Configuration Space offset 0x10, 0x14, 0x18, 0x1c, (IDE 
>mode) Shall I send ATA command through this registers?


Is ATAPassThru protocol necessary for ide mode to send ATA commands?




Thanks
Murali.S

The contents of this e-mail and any attachment(s) may contain confidential or 
privileged information for the intended recipient(s). Unintended recipients are 
prohibited from taking action on the basis of information in this e-mail and  
using or disseminating the information,  and must notify the sender and delete 
it from their system. L&T Infotech will not accept responsibility or liability 
for the accuracy or completeness of, or the presence of any virus or disabling 
code in this e-mail"
*************************************************************************
 This email and attachments have been scanned for  potential proprietary or 
sensitive information leakage.
 Websense Data Security, Protecting Your Information from the Inside Out.
 www.websense.com
 *************************************************************************

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes 
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to