Selvaraj

You need know the EDKII ATA stack hierarchy first. I would suggest you dig into 
every module's INF file which describes the module's behavior.

AtaPassThruDxe driver consumes IDE_CONTROLLER_INIT and produces ATA_PASS_THRU & 
EXT_SCSI_PASS_THRU.
AtaBus driver consumes ATA_PASS_THRU to manage/enumerate ATA devices and 
produces BLOCK_IO and DISK_INFO for every ATA devices.
ScsiBus drive consumes EXT_SCSI_PASS_THRU to manage/enumerate ATAPI/SCSI 
devices and produce SCSI_IO for every ATAPI/SCSI devices.
ScsiDisk driver consumes SCSI_IO to produce BLOCK_IO and DISK_INFO for managed 
ATAPI/SCSI devices.
DiskIo driver consumes BLOCK_IO to produce DISK_IO protocol.

All of them are needed to be built-in. And the platform you are using must 
produce IDE_CONTROLLER_INIT protocol. You also need make sure there is no 3rd 
driver to open those protocol with BY_DRIVER mode.

Feng

-----Original Message-----
From: Murali Selvaraj [mailto:[email protected]] 
Sent: Monday, September 23, 2013 22:06
To: Tian, Feng; [email protected]
Subject: RE: Identify IDE devices and device information in UEFI

Hi Feng,

Thanks for your information. I could able to find EFI_DISK_INFO protocol 
implementation in AtaBus driver code.
>From  EFI_DISK_INFO protocol, we can find the necessary information 
>(Devicetype,Modelno and etc) as per my requirement.

I built this driver code(AtaBusDxe)but while loading this driver, I am always 
facing the error while opening AtaPassThruProtocol (gEfiAtaPassThruProtocolGuid 
) and it returns the status as EFI_UNSUPPORTED.

I couldn't able to find the reason for this error. As per my knowledge after 
successfully installed/opened AtaPassThruProtocol in my driver, I could fetch 
my required information through EFI_DISK_INFO protocol.

I got struck at this point, It would be grateful if you could help me to 
resolve the same.

Thanks
Murali.S

________________________________________
From: Tian, Feng [[email protected]]
Sent: Monday, September 23, 2013 7:25 AM
To: Murali Selvaraj; [email protected]
Cc: Tian, Feng
Subject: RE: Identify IDE devices and device information  in UEFI

All of data you required are from IDENTIFY data, that's why I suggest you to 
directly use DISK_INFO protocol rather than ATA_PASS_THRU.

If you search EFI_DISK_INFO_IDE_INTERFACE_GUID or 
EFI_DISK_INFO_AHCI_INTERFACE_GUID keyword, it's easy to find out that 
DISK_INFO's implementation is in AtaBus driver in MdeModulePkg/Bus/Ata.

-----Original Message-----
From: Murali Selvaraj [mailto:[email protected]]
Sent: Sunday, September 22, 2013 19:19
To: [email protected]; Tian, Feng
Subject: FW: Identify IDE devices and device information in UEFI

Hi Feng,

 EFI_DISK_INFO_PROTOCOLprovides a data field called "Interface" (a GUID) that 
identifies the data format for the Inquiry(), Identify(), and
SenseData() functions that it also provides.

For IDE mode ,I couldn't find EFI_DISK_INFO_PROTOCOL implementation on my edk2 
source code.If it is available for IDE please let me know the source path.

As I mentioned , I would like at least to print  device type,size of the device 
.

Do I need to include AtaAtapiPassThru protocol or not?

Is it possible to include EFI_DISK_INFO_PROTOCOL to my driver?

So far,my driver is able to detected controller mode as IDE mode.Please guide 
me how to proceed from this stage.

Thanks
Murali.S



________________________________________
From: Tian, Feng [[email protected]]
Sent: Sunday, September 22, 2013 1:45 PM
To: Murali Selvaraj; [email protected]
Cc: Tian, Feng
Subject: RE: Identify IDE devices and device information  in UEFI

 EDKIIATA stack was designed to support IDE & AHCI mode.

For your special requirement to get Model Name, Serial No and others, you just 
need locate EFI_DISK_INFO_PROTOCOL and call its Identify() API. For detail 
description of EFI_DISK_INFO_PROTOCOL, please refer to PI spec.

-----Original Message-----
From: Murali Selvaraj [mailto:[email protected]]
Sent: Sunday, September 22, 2013 15:17
To: [email protected]; Tian, Feng
Subject: RE: Identify IDE devices and device information in UEFI

Hi Feng,

Thanks for your detailed explanation.From my driver code I have confirmed that 
my controller detected  as a IDE mode using IDE controller PCI configuration 
space class code ( 0x0101xx ) If I installed the 
MdeModulePkg/Bus/Ata/AtaAtapiPassThr driver will work for my requirement ( I 
need to display device type and device model name,serial no and other details ) 
Or Do I need to customize that code as per my IDE controller?

Please clarify my doubts.

Thanks
Murali.S

________________________________________
From: Tian, Feng [[email protected]]
Sent: Sunday, September 22, 2013 12:35 PM
To: Murali Selvaraj; [email protected]
Cc: Tian, Feng
Subject: RE: Identify IDE devices and device information  in UEFI

No. IdeBusDxe in IntelFrameworkModulePkg is not recommended for use. It is 
obsolete.

 AtaBus& AtaAtapiPassThru in MdeModulePkg is the replacement of IdeBusDxe.

-----Original Message-----
From: Murali Selvaraj [mailto:[email protected]]
Sent: Sunday, September 22, 2013 14:51
To: [email protected]; Tian, Feng
Subject: RE: Identify IDE devices and device information in UEFI

Hi Feng,

Thanks for your information.

I have found one more similar kind of implementation to identify ATA/ATAPI 
devices in UEFI.

IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe

Ata.c
Atapi.c
ComponentName.c
ComponentName.h
DriverConfiguration.c
DriverDiagnostics.c
Ide.c
Ide.h
IdeBus.c
IdeBus.h
IdeBusDxe.inf
IdeData.h


Shall I use this driver for requirement?.Please let me know.

Regards,
Murali.S


________________________________________
From: [email protected] 
[[email protected]]
Sent: Sunday, September 22, 2013 10:40 AM
To: [email protected]
Subject: edk2-devel Digest, Vol 45, Issue 113

Send edk2-devel mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/edk2-devel
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of edk2-devel digest..."


Today's Topics:

   1. Re: Identify IDE devices and device information  in UEFI
      (Tian, Feng)
   2. Re: [PATCH] EdkShellPkg: Add Aarch64 support (Ni, Ruiyu)
   3. Re: BaseTools compilation error (Gao, Liming)


----------------------------------------------------------------------

Message: 1
Date: Sun, 22 Sep 2013 02:00:26 +0000
From: "Tian, Feng" <[email protected]>
Subject: Re: [edk2] Identify IDE devices and device information  in
        UEFI
To: "[email protected]"
        <[email protected]>
Message-ID:
        <7f1bad85adea444d97065a60d2e97ee501a0a...@shsmsx101.ccr.corp.intel.com>

Content-Type: text/plain; charset="us-ascii"

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 :

 UEFIMode:

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-develmailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel



------------------------------

Message: 2
Date: Sun, 22 Sep 2013 02:02:46 +0000
From: "Ni, Ruiyu" <[email protected]>
Subject: Re: [edk2] [PATCH] EdkShellPkg: Add Aarch64 support
To: Olivier Martin <[email protected]>
Cc: "[email protected]"
        <[email protected]>
Message-ID:
        <734d49ccebeef84792f5b80ed585239d0a7f6...@shsmsx103.ccr.corp.intel.com>

Content-Type: text/plain; charset="us-ascii"

Olivier,

Reviewed-by: Ruiyu Ni <[email protected]>

Please remember to update the EdkShellPkg/ReadMe.txt when checking in.

Thanks,
Ray

From: Olivier Martin [mailto:[email protected]]
Sent: Friday, September 20, 2013 4:28 AM
To: Ni, Ruiyu
Cc: [email protected]
Subject: [PATCH] EdkShellPkg: Add Aarch64 support

Dear EdkSehllPkg maintainer,

Please find the attached patch that adds support for AArch64 (ARM 64bit 
architecture) to EdkShellPkg.

This patch:
* Updates the EFI Shell patch to use SVN rev 64 (was rev 61)
* Modifies the build system to enable AArch64 architecture
* Modifies patch to apply on EdkShell sources to add support for Aarch64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin 
<[email protected]<mailto:[email protected]>>

Best Regards,
Olivier
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 3
Date: Sun, 22 Sep 2013 05:09:49 +0000
From: "Gao, Liming" <[email protected]>
Subject: Re: [edk2] BaseTools compilation error
To: "[email protected]"
        <[email protected]>
Message-ID:
        <4a89e2ef3dfedb4c8bfde51014f606a11174e...@shsmsx102.ccr.corp.intel.com>

Content-Type: text/plain; charset="us-ascii"

Hi,
  I don't find such issue on GCC44 and GCC45.

  Do you modify BaseTools Compiler option? Or you use the different GCC version?

Thanks
Liming
From: Sergey Isakov [mailto:[email protected]]
Sent: Saturday, September 21, 2013 4:49 PM
To: [email protected]
Subject: Re: [edk2] BaseTools compilation error

Next
--------------
g++ -c -DPCCTS_USE_NAMESPACE_STD -I Pccts/h -I .. -I ../Include/Common -I 
../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I 
../Include/X64/   VfrSyntax.cpp -o VfrSyntax.o
VfrSyntax.cpp:56:3: warning: control reaches end of non-void function 
[-Wreturn-type]
  }
  ^
VfrSyntax.cpp:3543:88: warning: expression result unused [-Wunused-value]
  ...) {zzfailed_pred("  mCompatibleMode",0 /* report */, { 0; /* no user 
action */ } );}
                                                            ^
Pccts/h/AParser.h:340:44: note: expanded from macro 'zzfailed_pred'
    zzfailed_pred_action(_p,_hasuseraction,_useraction) \
                                           ^
Pccts/h/AParser.h:351:27: note: expanded from macro 'zzfailed_pred_action'
    if (_hasuseraction) { _useraction } else { failedSemanticPredicate(_p); }
                          ^
VfrSyntax.cpp:3564:88: warning: expression result unused [-Wunused-value]
  ...) {zzfailed_pred("  mCompatibleMode",0 /* report */, { 0; /* no user 
action */ } );}
                                                            ^
Pccts/h/AParser.h:340:44: note: expanded from macro 'zzfailed_pred'
    zzfailed_pred_action(_p,_hasuseraction,_useraction) \
                                           ^
Pccts/h/AParser.h:351:27: note: expanded from macro 'zzfailed_pred_action'
    if (_hasuseraction) { _useraction } else { failedSemanticPredicate(_p); }
                          ^
3 warnings generated.
g++  -I Pccts/h -I .. -I ../Include/Common -I ../Include/ -I 
../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/   -c -o 
VfrFormPkg.o VfrFormPkg.cpp
VfrFormPkg.cpp:98:13: error: addition of default argument on redeclaration 
makes this
      constructor a default constructor
  IN UINT32 BufferSize = 4096
            ^            ~~~~
./VfrFormPkg.h:127:3: note: previous declaration is here
  CFormPkg (IN UINT32 BufferSize);
  ^
1 error generated.
make[1]: *** [VfrFormPkg.o] Error 1
make: *** [VfrCompile] Error 2

---------------


On 21.09.2013, at 12:43, Sergey Isakov 
<[email protected]<mailto:[email protected]>> wrote:


In addition, what to do here?
--------------
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -nostdlib -Wall -Werror -c -g  
-I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I 
../Common/ -I .. -I . -I ../Include/X64/  LzmaCompress.c -o LzmaCompress.o
LzmaCompress.c:46:48: error: explicitly assigning a variable of type 'void *' 
to itself
      [-Werror,-Wself-assign]
static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
                                             ~ ^ ~
LzmaCompress.c:47:48: error: explicitly assigning a variable of type 'void *' 
to itself
      [-Werror,-Wself-assign]
static void SzFree(void *p, void *address) { p = p; MyFree(address); }
                                             ~ ^ ~
2 errors generated.
make[1]: *** [LzmaCompress.o] Error 1
make: *** [LzmaCompress] Error 2

---------------

On 21.09.2013, at 12:38, Sergey Isakov 
<[email protected]<mailto:[email protected]>> wrote:


Dear sirs,
Please consider
---------------------
make -C GenVtf
gcc  -c -MD -fshort-wchar -fno-strict-aliasing -nostdlib -Wall -Werror -c -g  
-I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I 
../Common/ -I .. -I . -I ../Include/X64/  GenVtf.c -o GenVtf.o
GenVtf.c:1725:20: error: comparison of unsigned expression >= 0 is always true
      [-Werror,-Wtautological-compare]
  if ((BaseAddress >= 0) && (FwVolSize > 0x40) && ((BaseAddress + FwVolSize) % 
8 == 0)) {
       ~~~~~~~~~~~ ^  ~
1 error generated.
make[1]: *** [GenVtf.o] Error 1

----------------------
May be (BaseAddress != 0) ?

Sergey
------------------------------------------------------------------------------
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-develmailing list
[email protected]<mailto:[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-develmailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
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-develmailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel


End of edk2-devel Digest, Vol 45, Issue 113
********************************************************************************************************************
 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 
*************************************************************************
************************************************************************* 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 
*************************************************************************
*************************************************************************

 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

 *************************************************************************
************************************************************************* 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 
*************************************************************************
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to