Hi everyone...
So, i done a code to issue command to ATA device. The command is B0/DAh to
verify the result of the SHORT SELF TEST.


Packet.Protocol                                 =       
EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA;
        Packet.Length                                   =       
EFI_ATA_PASS_THRU_LENGTH_BYTES;
        Packet.Asb                                              =       &Asb;
        Packet.Acb                                              =       &Acb;
        Packet.InDataBuffer                     =       Buffer;
        Packet.InTransferLength                 =       512;
        Packet.Timeout                                  =       
ATA_PASS_THRU_TIMEOUT;

        Acb.AtaCommand                                  =       ATA_CMD_SMART; 
//b0
        Acb.AtaFeatures                                 =       
ATA_SMART_RETURN_STATUS; //da
        Acb.AtaCylinderLow                              =       
ATA_CONSTANT_4F; //4f
        Acb.AtaCylinderHigh                             =       
ATA_CONSTANT_C2; //c2


        Status = instance->PassThru(instance,Port,PortMultiplier,&Packet,NULL);


        if(!EFI_ERROR(Status))
        {
                Print(L"\n ----------------------------\nPassThru Command 
B0/%x: %r
",ATA_SMART_RETURN_STATUS,Status);
                PrintBuffer(Buffer);

        }else if(!EFI_ERROR(  Status = 
instance->PassThru(instance,Port,ATA_VALUE_PORT,&Packet,NULL)   ))
        {
                Print(L"\n ----------------------------\nPassThru Command 
B0/%x: %r
",ATA_SMART_RETURN_STATUS,Status);
                PrintBuffer(Buffer);
        }else if(!EFI_ERROR(  Status =
instance->PassThru(instance,Port,0,&Packet,NULL)  ))
        {
                Print(L"\n ----------------------------\nPassThru Command 
B0/%x: %r
",ATA_SMART_RETURN_STATUS,Status);
                PrintBuffer(Buffer);
        }
        else
        {
                Print(L"\n ----------------------------\nPassThru Command 
B0/%x: %r
",ATA_SMART_RETURN_STATUS,Status);
                Print(L"\nSend error");
                Print(L"\nDevice Port: %x",Port);
                Print(L"\nDevice MultiplierPort: %x\n\n",PortMultiplier);
        }
        Print(L"\nAcb LBA MIDDLE %x",Acb.AtaCylinderLow);
        Print(L"\nAcb LBA HIGH %x",Acb.AtaCylinderHigh);
        Print(L"\nAcb LBA %x",Acb.AtaCylinderLowExp);
        Print(L"\nAcb LBA %x",Acb.AtaCylinderHighExp);
        Print(L"\nAsb LBA MIDDLE %x",Asb.AtaCylinderLow);
        Print(L"\nAsb LBA HIGH %x",Asb.AtaCylinderHigh);
        Print(L"\nAsb LBA  %x",Asb.AtaCylinderHighExp);
        Print(L"\nAsb LBA  %x",Asb.AtaCylinderLowExp);




When the PC are in AHCI mode ...Acb show LBA MIDDLE and HIGH, when change to
IDE mode. All LBA ( Asb and Acb ) are showed.

My question is:

Why was the Acb variable only in AHCI mode shown?  Am I verifying the right
variable?

When I use the Acb and the Asb ?!


Thx.
Vieira.


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to