On 08/06/14 05:15, Chris Cuthbert wrote:
> Thanx. I fixed it but did not make things better. I tried to debug
> this further with "ping" command and it looks like UEFI Shell cannot
> find the IPv4/IPv6 protocol handle. When I built a DEBUG release, I
> can see the network stack modules being loaded. So I do not understand
> why those protocol handles cannot be found. Is there a way to dump the
> handle database and check which protocols are instantiated ?

(As others explained,) the problem is likely that although your SNP
driver loads, it does not bind the PCI handle that you want it to bind.
Therefore the SNP protocol instance is not produced / installed, and
the dependent drivers don't bind either.

(As others explained,) I recommend to run

  dh -d -v -p SimpleNetwork

and see if anything turns up.

For example, in OVMF, after configuring one virtio-net device in QEMU,
the above UEFI shell command prints

Shell> dh -d -v -p SimpleNetwork
9B: UnknownDevice LoadFile PXEBaseCode MTFTPv4ServiceBinding
DHCPv4ServiceBinding UDPv4ServiceBinding TCPv4ServiceBinding
IPv4ServiceBinding IPv4Config ARPServiceBinding UnknownDevice
ManagedNetworkServiceBinding EfiVlanConfigProtocolGuid DevicePath
PciRoot(0x0)/Pci(0x3,0x0)/MAC(52540069721E,0x1) SimpleNetwork
   Controller Name    : Virtio Network Device
   Device Path        : PciRoot(0x0)/Pci(0x3,0x0)/MAC(52540069721E,0x1)
   Controller Type    : BUS
   Configuration      : NO
   Diagnostics        : NO
   Managed by         :
     Drv[6B]          : MNP Network Service Driver
     Drv[6C]          : VLAN Configuration Driver
     Drv[6F]          : IP4 CONFIG Network Service Driver
   Parent Controllers :
     Parent[88]       : Virtio Network Device
   Child Controllers  :
     Child[9D]        : MNP (MAC=52-54-00-69-72-1E, ProtocolType=0x806, 
VlanId=0)
     Child[9E]        : MNP (Not started)
     Child[A0]        : MNP (MAC=52-54-00-69-72-1E, ProtocolType=0x800, 
VlanId=0)
     Child[9C]        : 
PciRoot(0x0)/Pci(0x3,0x0)/MAC(52540069721E,0x1)/VenHw(D79DF6B0-EF44-43BD-9797-43E93BCF5FA8)
     Child[9F]        : 
PciRoot(0x0)/Pci(0x3,0x0)/MAC(52540069721E,0x1)/VenHw(D8944553-C4DD-41F4-9B30-E1397CFB267B)

"IPv4Config" is present on the handle.

The "-p SymbolicNameOfProtocol" option of "dh" will filter the handle
database for handles that have an instance of the specified protocol
installed. The help text says

-p            Dumps all handles of a protocol specified by the GUID.

It doesn't explain that you can use symbolic names.

You can find the symbolic names in two places:
- UEFI shell documentation (PDF, google it),
- in the source code.

The source code is a bit impenetrable. Consider the following shell
script, called "uni-grep":

  #!/bin/bash
  set -u -C

  for F in $(git ls-files '*.uni'); do
    iconv -f UTF-16LE -t UTF-8 -- "$F" \
    | grep -H --label="$F" --color=auto "$@"
  done

With this script,

  uni-grep -E '\<SimpleNetwork\>'

will find the message catalog that contains it, and in that file, you'll
see the other names as well (with an UCS-2 capable text editor):

  ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni

(For example, IPv4Config is there too.)

Laszlo

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&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