svn commit: r327606 - head/stand/i386/libi386
Sean Bruno
sbruno at FreeBSD.org
Fri Jan 5 23:50:51 UTC 2018
Author: sbruno
Date: Fri Jan 5 23:50:50 2018
New Revision: 327606
URL: https://svnweb.freebsd.org/changeset/base/327606
Log:
Handle misconfigured/nonexistent pcidev for comconsole instead of BTX panic.
PR: 203319
Reviewed by: imp jhb
MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D13776
Modified:
head/stand/i386/libi386/comconsole.c
Modified: head/stand/i386/libi386/comconsole.c
==============================================================================
--- head/stand/i386/libi386/comconsole.c Fri Jan 5 23:21:47 2018 (r327605)
+++ head/stand/i386/libi386/comconsole.c Fri Jan 5 23:50:50 2018 (r327606)
@@ -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);
More information about the svn-src-all
mailing list