What do you mean by "right value for EFI_LAB"? You should know  which LAB you 
are going to write the data.

Thanks,
Ramesh

From: parmeshwr_pra...@dell.com [mailto:parmeshwr_pra...@dell.com]
Sent: Friday, October 18, 2013 11:53 AM
To: edk2-devel@lists.sourceforge.net; af...@apple.com
Subject: Re: [edk2] problem in openprotocol


Dell - Internal Use - Confidential
How to get right value for EFI_LBA ?

From: Tian, Feng [mailto:feng.t...@intel.com]
Sent: Friday, October 18, 2013 11:48 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>; 
Andrew Fish (af...@apple.com<mailto:af...@apple.com>)
Subject: Re: [edk2] problem in openprotocol

Right. For his case, I only could think out a way, that is raise & restore tpl 
to CALLBACK level to prevent hot-plug event happen on critical region. This way 
could protect BlockIo/DiskIo interface from being released and avoid hang.

Here I have an assumption that all UEFI implementations on handling hot-plug 
event happen at TPL_CALLBACK... If not, then raise/restore tpl is also not a 
good solution.

I think UEFI would have to add such limitation, otherwise application has no a 
safe way to use interface at below scenario. Do you agree?

Andrew, do you have any comment on this topic?

From: Ramesh R. [mailto:rame...@ami.com]
Sent: Friday, October 18, 2013 13:58
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] problem in openprotocol

Agree. It's a good point. But OpenProtocol with BY_DRIVER attribute is not 
possible from application as other BIOS driver already opened the DISKIO 
protocol using the BY_DRIVER attribute. The application should take care of the 
handling of the Hot Pluggable devices.

Thanks,
Ramesh

From: Tian, Feng [mailto:feng.t...@intel.com]
Sent: Friday, October 18, 2013 10:38 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] problem in openprotocol

Please be aware that it would be better to use SafeOpenPotocol lib if the 
DiskIo is installed at the device which could be hot-plugged.

From: Ramesh R. [mailto:rame...@ami.com]
Sent: Friday, October 18, 2013 12:54
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] problem in openprotocol

Hi Parmeshwr,

   Do you need to write the data into all the DISK ? If so

Use LocateHandleBuffer to get all the DiskIO handle and use the HandleProtocol 
on each handle to get the DiskIO protocol.

Thanks,
Ramesh

From: parmeshwr_pra...@dell.com<mailto:parmeshwr_pra...@dell.com> 
[mailto:parmeshwr_pra...@dell.com]
Sent: Friday, October 18, 2013 10:02 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] problem in openprotocol


Dell - Internal Use - Confidential
Hi Michael,

My intention is to write some data in Disk using UEFI application.
To achieve this how I have to modify my code ?
Regards
Parmeshwr

From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
Sent: Thursday, October 17, 2013 9:48 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] problem in openprotocol

Parmeshwr,

Likely because a different driver has already opened that specific Disk I/O 
protocol instance.  The BY_DRIVER open mode is a request to open the protocol 
and then prevent other drivers from opening the same protocol.  If you use the 
openinfo shell command on the handle that contains the Disk I/O protocol, you 
will see which drivers have already opened that protocol.

Are you working on an app that need temporary exclusive access to that 
protocol, or a driver that will eventually be part of the platform firmware?

Thanks,

Mike

From: parmeshwr_pra...@dell.com<mailto:parmeshwr_pra...@dell.com> 
[mailto:parmeshwr_pra...@dell.com]
Sent: Thursday, October 17, 2013 5:55 AM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: [edk2] problem in openprotocol


Hi all,

I am working on some project where I need to open Disk protocol.
Below is my code-

        Status = gBS->OpenProtocol(ControllerHandle 
,&gEfiDiskIoProtocolGuid,(VOID **) &DiskIo, gImageHandle, NULL, 
EFI_OPEN_PROTOCOL_BY_DRIVER);
        if (EFI_ERROR(Status)) {
        Print(L"Disk IO error %d\n",Status);
                return Status;
        }

Why this code always goes to error condition.
If I use EFI_OPEN_PROTOCOL_GET_PROTOCOL as parameter it will not go to error 
condition, how to get rid of this problem ?
Best Regards,
Parmeshwr Prasad

[cid:image002.png@01CE781A.38F61FE0]


The information contained in this message may be confidential and proprietary 
to American Megatrends, Inc. This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited. Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then delete or destroy all copies of the transmission.

The information contained in this message may be confidential and proprietary 
to American Megatrends, Inc. This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited. Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then delete or destroy all copies of the transmission.

The information contained in this message may be confidential and proprietary 
to American Megatrends, Inc.  This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited.  Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then delete or destroy all copies of the transmission.

<<inline: image001.png>>

------------------------------------------------------------------------------
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=60135031&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to