Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2018 17:25:35 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r329070 - stable/11/sys/boot/i386/libi386
Message-ID:  <201802091725.w19HPZFC067705@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Feb  9 17:25:34 2018
New Revision: 329070
URL: https://svnweb.freebsd.org/changeset/base/329070

Log:
  MFC r327606: Handle misconfigured/nonexistent pcidev for comconsole instead
  of BTX panic.
  
  [This is effectively a direct commit to stable/11 due to path restructuring
  in head. Diffs have simply been applied to previous location]
  
  PR:		203319

Modified:
  stable/11/sys/boot/i386/libi386/comconsole.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/boot/i386/libi386/comconsole.c
==============================================================================
--- stable/11/sys/boot/i386/libi386/comconsole.c	Fri Feb  9 17:01:30 2018	(r329069)
+++ stable/11/sys/boot/i386/libi386/comconsole.c	Fri Feb  9 17:25:34 2018	(r329070)
@@ -267,6 +267,16 @@ comc_pcidev_handle(uint32_t locator)
 		printf("Cannot read bar at 0x%x\n", locator);
 		return (CMD_ERROR);
 	}
+
+	/* 
+	 * biospci_read_config() sets port == 0xffffffff if the pcidev
+	 * isn't found on the bus.  Check for 0xffffffff and return to not
+	 * panic in BTX.
+	 */
+	if (port == 0xffffffff) {
+		printf("Cannot find specified pcidev\n");
+		return (CMD_ERROR);
+	}
 	if (!PCI_BAR_IO(port)) {
 		printf("Memory bar at 0x%x\n", locator);
 		return (CMD_ERROR);



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