>>>Lovely, the ServiceBindings are on a handle that resembles the NIC while the Pxebc is IP-type specific.? Looks like we should try to do a ServiceBinding based on Pxebc but fall back to MAC-based searching, saving all 3 handles, the image handle, Pxebc handle, and ServiceBinding handle.? Presumably the UDP and TCP handles _should_ be the same... -- -Gene <<< OK now it works. Everything is done within efi_create_binding(EFI_GUID *bguid, EFI_GUID *pguid) from image_DeviceHandle I get the right DevPath handle, I parse it and I get the MAC address. Next I LibLocateHandle(ByProtocol, bguid, NULL, &nr_handles, &handles) what gives me all the handles that include the Service Binding Protocol "bguid". For each of this handles I get the DevPath handle and I parse it looking for the matching MAC address. The bguid handle with the right MAC is used for binding. So far it works in the problematic HP 2570p but also in a Vmware 10 client with double NIC. I'll test a bit more and I'll upload the code. Best, Patrick
On Fri, Jul 3, 2015 at 11:05 AM, Patrick Masotta <masottaus at yahoo.com> wrote:>>>> > Lovely, the ServiceBindings are on a handle that resembles the NIC > while the Pxebc is IP-type specific. Looks like we should try to do a > ServiceBinding based on Pxebc but fall back to MAC-based searching, > saving all 3 handles, the image handle, Pxebc handle, and ServiceBinding handle. > Presumably the UDP and TCP handles _should_ be the same... > -- > -Gene > <<< > > OK now it works. > Everything is done within efi_create_binding(EFI_GUID *bguid, EFI_GUID *pguid) > from image_DeviceHandle I get the right DevPath handle, I parse it and I get the MAC address. > Next I LibLocateHandle(ByProtocol, bguid, NULL, &nr_handles, &handles) > what gives me all the handles that include the Service Binding Protocol "bguid". > For each of this handles I get the DevPath handle and I parse it looking for the matching MAC address. > The bguid handle with the right MAC is used for binding. > > So far it works in the problematic HP 2570p but also in a Vmware 10 client with double NIC. > I'll test a bit more and I'll upload the code.I'm just debating what's the best algorithm here. It would seem if the LoadeImage's DeviceHandle provides UDPv4Sb, use it as it's guaranteed to be the same interface. Otherwise, we need a MNPSb (EFI_MANAGED_NETWORK_SERVICE_BINDING) that provides UDPv4Sb across the same interface. Presumably it should also provide TCPv4Sb (rather than being on a separate handle). Additional note for reference: The HP EliteBook 2570p appears to have been announced in May of 2012 and use Ivy Bridge-based (Intel Core-i series third generation) processors. Relatively speaking, this should be a reasonably recent machine. -- -Gene
>>>I'm just debating what's the best algorithm here.? It would seem if the LoadeImage's DeviceHandle provides UDPv4Sb, use it as it's guaranteed to be the same interface.? Otherwise, we need a MNPSb (EFI_MANAGED_NETWORK_SERVICE_BINDING) that provides UDPv4Sb across the same interface.? Presumably it should also provide TCPv4Sb (rather than being on a separate handle). -- -Gene <<< What I've found: (from older to newer hardware) 1) There's not "any" SB protocol present (Elitebook 8460p/2560p) 2) SB protocols are loaded under a different that LoadeImage's DeviceHandle, while Pxebc is loaded under the LoadeImage's DeviceHandle. (Elitebook 8470p/2570p) 3) SB protocols and Pxebc are loaded under the LoadeImage's DeviceHandle (VMware Workstation 10). About MNPSb; even when it presents the same interface than all the Service Binding protocols remember we have to create a child of the particular matching protocol and those do not have the same interface. I kept testing my patch and so far it proved to work in a multi-NIC environment: I've set a VMware EFI client with 2 NICs connected to the same network, using the VMware DHCP server and Serva as proxyDHCP. Setting a MAC filter in Serva I forced the client not receiving PXE redirection parameters alternative on NIC_1 or NIC_2; the client always booted correctly from the NIC that received the full set of PXE parameters. It seems to work. It would be really interesting if the HP guys having this issue can give it a try... Please see the new code at https://github.com/ppatpat/syslinux/blob/master/efi/main.c Patched: efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table) {} efi_create_binding(EFI_GUID *bguid, EFI_GUID *pguid) {} Best, Patrick