Please check the partition driver. It does the BY_DRIVER attribute for the DISKIO protocol. So from application if you try BY_DRIVER again , it would return access denied error.
Status = gBS->OpenProtocol (
ControllerHandle,
&gEfiDiskIoProtocolGuid,
(VOID **) &DiskIo,
This->DriverBindingHandle,
ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
Thanks,
Ramesh
From: Li, Elvin [mailto:[email protected]]
Sent: Friday, October 18, 2013 10:43 AM
To: [email protected]
Subject: Re: [edk2] problem in openprotocol
Like Mike said: The BY_DRIVER open mode is a request to open the protocol and
then prevent other drivers from opening the same protocol.
So you met the error as other driver has opened DiskIo with BY_DRIVER.
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]]
Sent: Friday, October 18, 2013 1:07 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [edk2] problem in openprotocol
Dell - Internal Use - Confidential
Hi Ramesh,
This much I did but problem occurred when I do openprotocol with BY_DRIVER so
it gives error.
Regards
Param
From: Ramesh R. [mailto:[email protected]]
Sent: Friday, October 18, 2013 10:24 AM
To: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
[mailto:[email protected]]
Sent: Friday, October 18, 2013 10:02 AM
To: [email protected]<mailto:[email protected]>
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:[email protected]]
Sent: Thursday, October 17, 2013 9:48 PM
To: [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
[mailto:[email protected]]
Sent: Thursday, October 17, 2013 5:55 AM
To: [email protected]<mailto:[email protected]>
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:[email protected]]
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 [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
