Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Oct 2020 21:01:53 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r366588 - stable/12/stand/efi/loader
Message-ID:  <202010092101.099L1rxQ060369@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Oct  9 21:01:53 2020
New Revision: 366588
URL: https://svnweb.freebsd.org/changeset/base/366588

Log:
  MFC: r366216 imp
  
  Fix video on PCI heuristic
  
  The video on PCI heuristic was broken. It was supposed to infer a
  video device when the last element of the path was a PCI DEVICE PATH
  node. However, the last node in the device path is an END node, so
  this heuristic never fired.
  
  This leads, among other things, to bhyve only producing output in the
  serial connection once we leave the boot loader. This restores the
  dual headed boot on bhyve + UEFI (as we did in 11.2), but will favor
  serial in the absence of other config which may be a change from 11.2.
  
  MFC After: 3 days
  Differential Revision: https://reviews.freebsd.org/D26572

Modified:
  stable/12/stand/efi/loader/main.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/stand/efi/loader/main.c
==============================================================================
--- stable/12/stand/efi/loader/main.c	Fri Oct  9 20:31:42 2020	(r366587)
+++ stable/12/stand/efi/loader/main.c	Fri Oct  9 21:01:53 2020	(r366588)
@@ -717,6 +717,10 @@ parse_uefi_con_out(void)
 	ep = buf + sz;
 	node = (EFI_DEVICE_PATH *)buf;
 	while ((char *)node < ep) {
+		if (IsDevicePathEndType(node)) {
+			if (pci_pending && vid_seen == 0)
+				vid_seen = ++seen;
+		}
 		pci_pending = false;
 		if (DevicePathType(node) == ACPI_DEVICE_PATH &&
 		    DevicePathSubType(node) == ACPI_DP) {
@@ -749,8 +753,6 @@ parse_uefi_con_out(void)
 		}
 		node = NextDevicePathNode(node); /* Skip the end node */
 	}
-	if (pci_pending && vid_seen == 0)
-		vid_seen = ++seen;
 
 	/*
 	 * Truth table for RB_MULTIPLE | RB_SERIAL



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