Rafael –

Create a device path using the port/multiplier port information (see 
BuildDevicePath), then use LocateDevicePath.

From: Rafael Machado [mailto:rafaelrodrigues.mach...@gmail.com]
Sent: Wednesday, October 29, 2014 3:32 AM
To: edk2-devel
Subject: Re: [edk2] Get BlockIo protocol from Ata Device based on Port and 
Multiplier Port

Hi Feng

Thanks for the answer.
Just to explain better my scenario.

What I need to do is execute some ata commands, like read verify sector, this 
is done sending ata commands to some Port / Multiplier port, but in case this 
device has a Block Io protocol, I need to use this protocol instead of sending 
a specific ata command (so my application will be more generic)

This is why I need to know if a specific ata device has an associated block io 
protocol, based on its position (Port/Multiplier port location)

If my explanation is not that clear I can try to explain in another way.

Thanks a lot for the answer.
Rafael R. Machado


2014-10-28 22:55 GMT-02:00 Tian, Feng 
<feng.t...@intel.com<mailto:feng.t...@intel.com>>:
Rafael,

Why don’t you directly locate all handles at which BlockIo protocols are 
installed? After you get these handles, you can get device path from these 
handles to know which one is you want to access.

Thanks
Feng

From: Rafael Machado 
[mailto:rafaelrodrigues.mach...@gmail.com<mailto:rafaelrodrigues.mach...@gmail.com>]
Sent: Monday, October 27, 2014 18:40
To: edk2-devel
Subject: [edk2] Get BlockIo protocol from Ata Device based on Port and 
Multiplier Port

Hi everyone.

I have a system, that has a Storage device.
This device can be detected at Port 0, Multiplier 0 by the 
EFI_ATA_PASS_THRU_PROTOCOL.GetNextDevice()

typedef EFI_STATUS
(EFIAPI *EFI_ATA_PASS_THRU_GET_NEXT_DEVICE) (
IN EFI_ATA_PASS_THRU_PROTOCOL *This,
IN UINT16 Port,
IN OUT UINT16 *PortMultiplierPort
);

Now I need to know the EFI_BLOCK_IO_PROTOCOL "instance" that I need to use to 
access this device.
Is there a way to do this ?

Thanks and Regards
Rafael R. Machado

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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to