Date: Thu, 24 Nov 2016 09:43:42 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309092 - head/sys/dev/firewire Message-ID: <201611240943.uAO9hgUb056723@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611240943.uAO9hgUb056723>