Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2018 05:08:58 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336733 - head/stand/efi/loader
Message-ID:  <201807260508.w6Q58w8c064501@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Jul 26 05:08:58 2018
New Revision: 336733
URL: https://svnweb.freebsd.org/changeset/base/336733

Log:
  Ignore Device Paths in the Boot Info that don't have Media path
  nodes. These show up in default entries on SuperMicro motherboards and
  elsewhere. Before, we couldn't find a block device associated with the
  device path and return BAD_CHOICE which was an instant
  failure. However, a VendHw node isn't specifc, so when we don't find a
  media path, return NOT_SPECIFIC so that the rest of the algorithms
  work.
  
  Sponsored by: Netflix.

Modified:
  head/stand/efi/loader/main.c

Modified: head/stand/efi/loader/main.c
==============================================================================
--- head/stand/efi/loader/main.c	Thu Jul 26 04:12:31 2018	(r336732)
+++ head/stand/efi/loader/main.c	Thu Jul 26 05:08:58 2018	(r336733)
@@ -355,9 +355,14 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char *
 
 	/*
 	 * If there's only one item in the list, then nothing was
-	 * specified.
+	 * specified. Or if the last path doesn't have a media
+	 * path in it. Those show up as various VenHw() nodes
+	 * which are basically opaque to us. Don't count those
+	 * as something specifc.
 	 */
 	if (last_dp == first_dp)
+		return NOT_SPECIFIC;
+	if (efi_devpath_to_media_path(last_dp) == NULL)
 		return NOT_SPECIFIC;
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807260508.w6Q58w8c064501>