[syslinux] patch for UEFI PXE booting bugs

Cao, Da-Shi (EG-China-Presales-CPC-GZ) thomas-ds.cao at hp.com
Wed May 6 18:53:17 PDT 2015


Hi Patrick
As I've said with the patch, the equation " i = (nic_idx * nr_handles) / nic_num;" is a guess and best shoot to get the working handle after the first decision (more dependable by checking the Ack). It is assumed that the all handles lines in the same sequence in all cases in one session. The number of handles are not required to be the same, but the position of the working handle should lie in the same relative position. That's the reasoning behind the equation.

After the patch is applied, the pxelinux configuration, the kernel and the initramfs can be downloaded, but the kernel cannot be started and the box just reboots. I've tried two particular kernel. One is the Redhat 6.5 installtion kernel, which is "2.6.32-431.el6.x86_64". The other one is a customize made kernel by me, which is " 3.18.12dscao01+". Both of which can be started by ELILO through network booting.

Regards,
Dashi Cao

> -----Original Message-----
> From: Patrick Masotta [mailto:masottaus at yahoo.com]
> Sent: Wednesday, May 06, 2015 22:09
> To: syslinux at zytor.com; Da Shi Cao; Cao, Da-Shi (EG-China-Presales-CPC-
> GZ)
> Subject: RE: [syslinux] patch for UEFI PXE booting bugs
> 
> 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