Author: ambrisko Date: Fri Jan 30 18:25:53 2015 New Revision: 277943 URL: https://svnweb.freebsd.org/changeset/base/277943
Log: Fix UEFI PXE boot on a NIC that isn't the first NIC. In UEFI it appears all available NICS are present to pass network traffic. This gives the capability to load the loader.efi from disk then set currdev="net3:" and then all I/O will over over the 2nd NIC. On this machine is appears the first handle is the first NIC in IPv4 mode and then the 2nd handle is the first NIC in IPv6 mode. The 3rd handle is the 2nd NIC in IPv4 mode. The fix is to index into the handle based on the unit cached from boot device passed into the loader. Some testing info from a test boot via kenv: currdev="net3:" loaddev="net3:" boot.netif.name="igb1" Modified: head/sys/boot/efi/libefi/efinet.c Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Fri Jan 30 18:19:22 2015 (r277942) +++ head/sys/boot/efi/libefi/efinet.c Fri Jan 30 18:25:53 2015 (r277943) @@ -99,8 +99,11 @@ dump_mode(EFI_SIMPLE_NETWORK_MODE *mode) static int efinet_match(struct netif *nif, void *machdep_hint) { + struct devdesc *dev = machdep_hint; - return (1); + if (dev->d_unit - 1 == nif->nif_unit) + return (1); + return(0); } static int _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"