svn commit: r309092 - head/sys/dev/firewire

Andriy Gapon avg at FreeBSD.org
Thu Nov 24 09:43:43 UTC 2016


Author: avg
Date: Thu Nov 24 09:43:42 2016
New Revision: 309092
URL: https://svnweb.freebsd.org/changeset/base/309092

Log:
  fwohci: report whether PhysicalUpperBound register is implemented
  
  Please see section 5.15 of 1394 OHCI Specification.
  If the register is not implemented, then the physical response unit is
  limited to the first 4GB of the physical memory.
  In that case the non-cooperative debugging over firewire (using /dev/fwmem)
  can not be expected to work if a target has more RAM than that.
  The method is described in gdb.4 and the Developer's Handbook.
  
  It seems that most of the consumer hardware does not implement
  PhysicalUpperBound register.
  
  MFC after:	1 week

Modified:
  head/sys/dev/firewire/fwohci.c

Modified: head/sys/dev/firewire/fwohci.c
==============================================================================
--- head/sys/dev/firewire/fwohci.c	Thu Nov 24 09:39:00 2016	(r309091)
+++ head/sys/dev/firewire/fwohci.c	Thu Nov 24 09:43:42 2016	(r309092)
@@ -1860,6 +1860,16 @@ fwohci_intr_core(struct fwohci_softc *sc
 				prequpper = OHCI_PREQUPPER_MAX;
 			}
 			OWRITE(sc, OHCI_PREQUPPER, prequpper & 0xffffffff);
+			if (OREAD(sc, OHCI_PREQUPPER) !=
+			    (prequpper & 0xffffffff)) {
+				device_printf(fc->dev,
+				   "PhysicalUpperBound register is not "
+				   "implemented.  Physical memory access "
+				   "is limited to the first 4GB\n");
+				device_printf(fc->dev,
+				   "PhysicalUpperBound = 0x%08x\n",
+				    OREAD(sc, OHCI_PREQUPPER));
+			}
 		}
 		/* Set ATRetries register */
 		OWRITE(sc, OHCI_ATRETRY, 1<<(13 + 16) | 0xfff);


More information about the svn-src-head mailing list