From: "Nikolay Bodunov" <for_internet_shops@mail.ru>
To: edk2-devel@lists.01.org
Subject: Can't open PciIo protocol in both qemu (Nt32Pkg) and VirtualBox EFI
Date: Thu, 26 Oct 2017 01:20:01 +0300 [thread overview]
Message-ID: <1508970001.253907598@f184.i.mail.ru> (raw)
Hello
I try to make work a code from "UEFI Driver Writer Guide", but always receive EFI_UNSUPPORTED status:
EFI_STATUS
EFIAPI
PciDriverOnlyDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
)
{
EFI_STATUS Status;
EFI_PCI_IO_PROTOCOL *PciIo;
Status = gBS->OpenProtocol (
ControllerHandle,
&gEfiPciIoProtocolGuid,
(VOID **)&PciIo,
This->DriverBindingHandle,
ControllerHandle,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
DEBUG((EFI_D_INFO, "Status is %r \r\n", Status));
if (EFI_ERROR (Status)) {
return Status;
}
return EFI_SUCCESS;
}
However, for example, with EFI_SIMPLE_FILE_SYSTEM_PROTOCOL instead of EFI_PCI_IO_PROTOCOL OpenProtocol() works fine and returns EFI_SUCCESS.
Driver project was created with UEFI Driver Wizard. Inf file contains gEfiPciIoProtocolGuid.
Where I could make a mistake?
WBR,
John
next reply other threads:[~2017-10-25 22:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 22:20 Nikolay Bodunov [this message]
2017-10-26 10:33 ` Can't open PciIo protocol in both qemu (Nt32Pkg) and VirtualBox EFI Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508970001.253907598@f184.i.mail.ru \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox