Hi All,

Currently, I am developing a EFI driver which will communicate with my IDE 
controller and dump ModelName,sectors_per_track,heads and Firmware version.
My EFI driver able to communicate and it is identified two IDE channel also 
detect the connected device as Hard disk. I have no issues it is working as 
expecting.

I have sent  IDENTIFY command to the device to dump those fields with the help 
of EFI_IDENTIFY_DATA.


if (DeviceType == EfiIdeHarddisk) {
      Status = AtaIdentify (Instance, IdeChannel, IdeDevice, &Buffer, NULL);


  The above snippet code AtaIdentify() returns Status as success . So I assumed 
the Buffer will contains the output of  IDENTIFY command.
I have tried to dump ModelName [   ((ATA5_IDENTIFY_DATA 
*)(&Buffer.AtaData))->ModelName  ] which returns unrelated values. Also other 
values sectors_per_track,heads were invalid values.



IdeMode.c  :

 //
    // Send IDENTIFY cmd to the device to test if it is really attached.
    //
    if (DeviceType == EfiIdeHarddisk) {
      Status = AtaIdentify (Instance, IdeChannel, IdeDevice, &Buffer, NULL);
      //
      // if identifying ata device is failure, then try to send identify packet 
cmd.
      //
      if (EFI_ERROR (Status)) {
        REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_PERIPHERAL_FIXED_MEDIA | 
EFI_P_EC_NOT_DETECTED));

        DeviceType = EfiIdeCdrom;
        Status     = AtaIdentifyPacket (Instance, IdeChannel, IdeDevice, 
&Buffer, NULL);
      }
    } else {
      Status = AtaIdentifyPacket (Instance, IdeChannel, IdeDevice, &Buffer, 
NULL);
      //
      // if identifying atapi device is failure, then try to send identify cmd.
      //
      if (EFI_ERROR (Status)) {
        DeviceType = EfiIdeHarddisk;
        Status     = AtaIdentify (Instance, IdeChannel, IdeDevice, &Buffer, 
NULL);
      }
    }


It would be useful for me ,if anyone clarify my doubts. If possible please 
share your inputs to dump those fields.


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
 *************************************************************************

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to