On Wed, Jan 13, 2016 at 10:24:00AM -0800, Josh Triplett wrote: > On Wed, Jan 13, 2016 at 01:43:38PM +0100, Laszlo Ersek wrote: > > I just noticed that the most recent release of BITS provides a > > standalone HTTP client! > > > > http://biosbits.org/news/bits-2070/ > > > > Josh, a couple of points: > > > > - edk2 doesn't provide EFI_IP4_CONFIG_PROTOCOL any longer; it provides > > EFI_IP4_CONFIG2_PROTOCOL. I haven't tested this new release of BITS > > just yet, but I know this caused problems for a few consumers of edk2. > > Most existing BIOSes we've worked with don't provide the newer protocol, > though. So at a minimum we'll have to support both. Probably not too > difficult to do, though.
The latest release of BITS (bits-2073, released today) now uses EFI_IP4_CONFIG2_PROTOCOL, and falls back to EFI_IP4_CONFIG_PROTOCOL. We also added support for using the existing configuration if already configured, and only kicking off DHCP if not already configured. In particular, if you have manual IP configuration set up in your firmware, or manually configure IP via the shell, BITS will use that configuration. A couple of questions about EFI_IP4_CONFIG2_PROTOCOL: First, as far as I can tell, the implementation in edk2 does not trigger any of the events possible to register via RegisterDataNotify when DHCP completes. Switching to Ip4Config2PolicyDhcp will wipe the three manual configuration items (and signal the events for them), and any call to SetData will signal the corresponding event, but DHCP completion just sets the various configuration information without signaling an event. As a result, we ended up just polling GetData of Ip4Config2DataTypeInterfaceInfo until it returned a valid IP. Second, how can we explicitly tell EFI_IP4_CONFIG2_PROTOCOL to obtain an address via DHCP, if it hasn't already? To kick off DHCP, we ended up having to change the policy from DHCP to static and back to DHCP (since SetData won't call Ip4StartAutoConfig unless the policy changes to DHCP from something other than DHCP). - Josh Triplett _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

