While revisiting problem discussed
http://sourceforge.net/p/edk2/mailman/message/32171128/ I tried to
understand why using EXCLUSIVE as suggested in this thread did not
work. I added print of EFI status code from protocol open and to my
surprise it was 3 (UNSUPPORTED). This happens in this code:

  handles = grub_efi_locate_handle (GRUB_EFI_BY_PROTOCOL, &net_io_guid,
                                    0, &num_handles);
  if (! handles)
    return;
  for (handle = handles; num_handles--; handle++)
    {
      grub_efi_simple_network_t *net;
      struct grub_net_card *card;

      net = grub_efi_open_protocol (*handle, &net_io_guid,
                                    GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
      if (! net)
        /* This should not happen... Why?  */
        continue;

The problem is, original grub2 code is using
GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL here and works. I do not understand
how it can return UNSUPPORTED, when we just located handles that claim
support simple network protocol. And if it fails with EXCLUSIVE, why it
works wit GET_PROTOCOL?

What is more puzzling, when called later the same open succeeds.

I probably miss something obvious here; any hints appreciated.

I'm using 64 bit OVMF at commit SVN 16106; qemu is called as

qemu-system-x86_64 -bios /usr/share/qemu/ovmf-x86_64.bin -net nic,model=virtio 
-net user,tftp=/tmp/tftpboot,bootfile=/boot/grub/x86_64-efi/core.efi

Thank you!

-andrei

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to