public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Problem in EFI_BOOT_SERVICES.OpenProtocol()
@ 2017-06-01 16:46 Amit kumar
  2017-06-01 16:58 ` Andrew Fish
  0 siblings, 1 reply; 8+ messages in thread
From: Amit kumar @ 2017-06-01 16:46 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Hi,
I am trying to open PciIoProtocol and facing some issue.

below is the code

EFI_PCI_IO_PROTOCOL *PciIo=NULL;
EFI_STATUS                      Status;

Status = gBS->OpenProtocol (
                  Controller,
                  &gEfiPciIoProtocolGuid,
                  (VOID **) &PciIo,
                  This->DriverBindingHandle,
                  Controller,
                  EFI_OPEN_PROTOCOL_BY_DRIVER
                  );

it returns Status = EFI_ALREADY_STARTED, but PciIo is not NULL.
Is it not supposed to return PciIo as NULL ?
As per UEFI 2.6 Spec Section 6.3 page 182. 

There are a number of reasons that this function call can return an error. If an error is returned, then
AgentHandle, ControllerHandle, and Attributes are not added to the list of agents
consuming the protocol interface specified by Handle and Protocol, and Interface is
returned unmodified.

Thanks And Regards
Amit 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-01 17:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-01 16:46 Problem in EFI_BOOT_SERVICES.OpenProtocol() Amit kumar
2017-06-01 16:58 ` Andrew Fish
2017-06-01 17:13   ` Amit kumar
2017-06-01 17:29     ` Andrew Fish
2017-06-01 17:37       ` Amit kumar
2017-06-01 17:38         ` Andrew Fish
2017-06-01 17:40           ` Amit kumar
2017-06-01 17:41             ` Andrew Fish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox