Re: [edk2] three SNP questions

Subject: Re: [edk2] three SNP questions

From: Laszlo Ersek <>


Date: 2013-04-30 05:10:47

On 04/29/13 20:19, Laszlo Ersek wrote:
> Hi.
> I've been staring for hours at the Driver Writer's Guide and the Spec,
> plus existing (apparently, with each other inconsistent) SNP
> implementations in the edk2 tree. I think I'm finally able to ask two
> (maybe three) questions.
> (1) Can I ignore implementing (= set to NULL) the WaitForPacket event?
> Existing code suggests so, and the spec doesn't document it at all.
> (2) "25.6 Simple Network Protocol Implementations" in the DWG says
>   Create child handle in Driver Binding Protocol Start() and install
>   the Simple Network Protocol and the Device Path Protocol. Also
>   allocate and initialize an EFI_SIMPLE_NETWORK_MODE structure in the
>   Simple Network Protocol.
> *Why* is a child handle (apperently with messaging type, MAC subtype)
> necessary? I'm not writing a bus driver.
> (3) Supposing I want to procude a child handle just to conform to the
> spec, I'm completely confused about how to do it, and how to interpret
> the RemainingDevicePath parameter (NULL vs. non-NULL and end-of-devpath
> vs. non-NULL and also not end-of-devpath). The examples I can find in
> the tree don't present a unified picture.
> I sort of understand the arcane install-what-protocols-on-what-handles
> steps, but some freedom seems to be given to the driver (like produce
> all children at first invocation vs. produce one child per invocation
> vs. produce one child per invocation but only starting with the second
> invocation). I'm unable to choose any of these because all I care is an
> SNP on my PCI device.

DWG 6.2.7 Bus drivers that produce all children in Start():

  If a bus driver is always required to enumerate all of its child
  devices, then the RemainingDevicePath parameter should be ignored in
  the Supported() and Start() services of the
  EFI_DRIVER_BINDING_PROTOCOL. All of the child handles should be
  produced in the first call to Start().

Perfect! I'll ignore RemainingDevicePath and produce the grand total of
one child handle in Start().


Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt!
edk2-devel mailing list