[syslinux] patch for UEFI PXE booting bugs

Patrick Masotta masottaus at yahoo.com
Wed May 6 07:08:32 PDT 2015


I analyzed your patch a bit more

I think if we change at 
pxe.c\net_parse_dhcp()
 -     if (mode->DhcpAckReceived)
 +    if (mode->PxeReplyReceived || mode->ProxyOfferReceived)
things would work well.

I see you keep globally 
UINTN nic_idx = 0;      //holds the instance of the handle that carried the PXE transaction 
UINTN nic_num = 0;    //holds the total number of PXE handles.

Now lets see what you do at
main.c\efi_create_binding()
this function is used to bind 2 possible protocols:
EFI_UDP4_SERVICE_BINDING_PROTOCOL
EFI_TCP4_SERVICE_BINDING_PROTOCOL.

Here syslinux uses the same technique calling first to LibLocateHandle(By,Protocol,...)
then we have to detect among the returned handles the one that is associated to the NIC
that was used in the successful PXE transaction. Then you create a handle index like:

i = (nic_idx * nr_handles) / nic_num;           // nr_handles is the number of handles returned by  LibLocateHandle(By,Protocol,...)

where did you get that relationship from??

I can understand that when the # of PXE handles equals the # of EFI_XXX4_SERVICE_BINDING_PROTOCOL handles
the equation is right but I cannot see it working when nr_handles != nic_num.

Please forgive me if I'm skipping some obvious detail here...
i.e. is the number of PXE handles ever different than the # of EFI_XXX4_SERVICE_BINDING_PROTOCOL ?
I have seen EFI FW that implemented PXE protocols but did not implemented Binding protocols
http://h30434.www3.hp.com/t5/Notebook-Operating-Systems-and-Software/EFI-firmware-bug-on-HP-EliteBook-2560p-8460p/td-p/4931486
but I do not if this is just a non fixed HP bug ;-)

what do you think?

Best,
Patrick











More information about the Syslinux mailing list