[ipxe-devel] [PATCH] [efi] install the HII config access protocol on a child of the SNP handle

Laszlo Ersek lersek at redhat.com
Tue Jul 5 10:32:31 UTC 2016


On 07/03/16 14:24, Michael Brown wrote:
> On 30/06/16 13:37, Laszlo Ersek wrote:
>> The device path for the child handle is traditionally derived by
>> appending
>> a Hardware Vendor Device Path node after the MAC() node. The VenHw()
>> nodes
>> in question consist of a GUID (by definition), and no trailing data (by
>> choice). The purpose of these VenHw() nodes is only that all the child
>> nodes can be uniquely identified by device path.
> 
> Can the device path for the child nodes be omitted?  (Equivalently: is
> it meaningful to look up one of these nodes by device path, given that
> the VenHw portion has no real meaning?)
> 
> I will believe an answer of "nobody knows; HII is so badly defined that
> it's impossible to tell".  :)

The devpath for the child handle is required in this case. Please refer to:

http://thread.gmane.org/gmane.comp.bios.edk2.devel/13494/focus=13529

(in particular the DmExtractDevicePathFromHiiHandle() function call).
Please see also "EFI_IFR_REF4.DevicePath" in the UEFI spec (v2.6,
"31.3.8.3.59 EFI_IFR_REF").

The point is that the EFI_IFR_REF4 opcode -- which I like to call "goto"
opcode, since edk2 creates them with the "HiiCreateGotoExOpCode" library
function -- stores a textual rendition of the devpath associated with
the jump-target form set. The GUID in the VenHw() node need not be a
well-known one, but it must enable the "goto" opcode to work, and for
that a devpath is necessary.

Without this patch, the device path installed directly on the SNP handle
is used for the same purpose anyway. That is fine per se, but we
shouldn't use the SNP handle for the HII config access protocol,
independently.

The argument goes like this:
- The HII config access protocol should be moved from the SNP handle to
a new child handle.
- The HII form set should therefore also be associated with the child
handle, not the SNP handle.
- The form set must be possible to reference by device path, as a "jump
target", for HII navigation (EFI_IFR_REF4) to work. Hence create a
devpath for the child handle.

... Please feel free to edit (or suggest edits to) the commit message :)

Thanks!
Laszlo



More information about the ipxe-devel mailing list