On Thu, Jun 25, 2015 at 7:28 PM, Gene Cumm <gene.cumm at gmail.com> wrote:> On Thu, Jun 25, 2015 at 11:54 AM, Patrick Masotta <masottaus at yahoo.com> wrote: > >> Yes I know what you mean; >> "I think" the handle of the running image (our code) has a "path" telling us where >> was laded from. That would solve this thing. > > I just found we already found the handle before in a more reliable > manner and we already found it in the beginning of execution in > efi_main(). > > -- > -GeneCommit 23b2707 should resolve this. Please let me know if you need test binaries -- -Gene
>>>Commit 23b2707 should resolve this.? Please let me know if you need test binaries -- -Gene <<< 1) About the Service Binding protocols, PXE protocol, etc having the same handle# is clear if we see that the number is in fact the "Device Handle" supporting all those protocols. (clearly said at UEFI_Driver_Writer_Guide_V1.0.1_120308.pdf) 2) about your last commit 2.1) I think I found a couple of issues check them corrected at https://github.com/ppatpat/syslinux/ a) a missing return; on an error condition at efi/pxe.c\net_parse_dhcp() b) you close a protocol before creating its child at efi/main.c\efi_create_binding() 2.2) I think "image_DeviceHandle" instead of "pxe_DeviceHandle" produces a code easier to follow; specially when we end up using that handle to create a TCP4 or UDP4 child... Best, Patrick
On Fri, Jun 26, 2015 at 10:49 AM, Patrick Masotta <masottaus at yahoo.com> wrote:>>>> > Commit 23b2707 should resolve this. Please > let me know if you need > test binaries > > -- > -Gene > <<< > > > 1) About the Service Binding protocols, PXE protocol, etc having the same handle# is clear if we > see that the number is in fact the "Device Handle" supporting all those protocols. > (clearly said at UEFI_Driver_Writer_Guide_V1.0.1_120308.pdf)It's a handle to the device that loaded Syslinux, in this case a NIC plus IP-stack (IPv4 or IPv6).> 2) about your last commit > 2.1) I think I found a couple of issues check them corrected at > https://github.com/ppatpat/syslinux/ > > a) a missing return; on an error condition at efi/pxe.c\net_parse_dhcp() > b) you close a protocol before creating its child at efi/main.c\efi_create_binding()Rewrote the commit messages and it's in at commit ID 5186539> 2.2) I think "image_DeviceHandle" instead of "pxe_DeviceHandle" produces a code easier to follow; > specially when we end up using that handle to create a TCP4 or UDP4 child...Not all handles are devices but all usable devices have handles. The image_handle is a type EFI_LOADED_IMAGE_PROTOCOL, not a device. pxe_handle could perhaps be renamed as nic_handle or device_handle. -- -Gene