From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: ipxe.org, ip: 212.13.204.60, mailfrom: mcb30@ipxe.org) Received: from duck.fensystems.co.uk (duck.fensystems.co.uk [212.13.204.60]) by groups.io with SMTP; Thu, 23 May 2019 03:35:19 -0700 Received: from pudding.home (pudding.qs.unipart.io [IPv6:2001:470:1dbe:1:ffff::c5f1]) by duck.fensystems.co.uk (Postfix) with ESMTPSA id 21B4B19B0F; Thu, 23 May 2019 11:35:16 +0100 (BST) Subject: Re: [edk2-devel] iSCSI and iBFT To: devel@edk2.groups.io, tpilar@solarflare.com, Laszlo Ersek References: <3644c44636fb4fe5b719128ec1443b4c@ukex01.SolarFlarecom.com> <1c6545291d0f460fac20abf2187a551c@ukex01.SolarFlarecom.com> <29d7e6a4-667a-7929-f4e3-96303ed0d39d@solarflare.com> <006adde9-25fd-bdd8-1bda-bbea4302e777@ipxe.org> From: "Michael Brown" Message-ID: <209c21f7-3989-37e5-f97c-49908cda8300@ipxe.org> Date: Thu, 23 May 2019 11:35:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit On 23/05/2019 10:46, Tomas Pilar (tpilar) wrote: > I was mostly puzzled by the double step. First find a parent device to LoadedImage that support NII. Rather than using that device we will scan all devices to see if any of them has the same NII protocol and if so we use that one. I am not sure there is any advantage compared to just using the original parent device? The problem is that we may need to attach to a parent of that original parent device. The relevant commit in iPXE is: http://git.ipxe.org/ipxe.git/commitdiff/4c5b7945c [efi] Use the SNP protocol instance to match the SNP chainloading device Some systems will install a child of the SNP device and use this as our loaded image's device handle, duplicating the installation of the underlying SNP protocol onto the child device handle. On such systems, we want to end up driving the parent device (and disconnecting any other drivers, such as MNP, which may be attached to the parent device). Fix by recording the SNP protocol instance at initialisation time, and using this to match against device handles (rather than simply comparing the handles themselves). That commit predates the iPXE NII/UNDI driver and so refers only to SNP, but the same principle is applied for NII. Michael