From owner-svn-src-head@FreeBSD.ORG Sat May 24 21:02:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D18634FA; Sat, 24 May 2014 21:02:30 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id B282B2DF9; Sat, 24 May 2014 21:02:30 +0000 (UTC) Received: from bender.Home (97e07ba1.skybroadband.com [151.224.123.161]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id A97D75DEBC; Sat, 24 May 2014 21:02:22 +0000 (UTC) Date: Sat, 24 May 2014 22:02:15 +0100 From: Andrew Turner To: Michael Tuexen Subject: Re: svn commit: r266083 - in head/sys/arm: arm include Message-ID: <20140524220215.79032279@bender.Home> In-Reply-To: <083E3DCB-F49A-4757-9CF8-689D04267E26@freebsd.org> References: <201405141911.s4EJBFZZ097826@svn.freebsd.org> <537D0952.2040001@selasky.org> <7610C8E6-3F01-4317-BC1A-67645A162CD7@FreeBSD.org> <083E3DCB-F49A-4757-9CF8-689D04267E26@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: Hans Petter Selasky , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mark R V Murray X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2014 21:02:30 -0000 On Sat, 24 May 2014 21:09:56 +0200 Michael Tuexen wrote: > On 22 May 2014, at 09:09, Mark R V Murray wrote: > > > > > On 21 May 2014, at 21:15, Hans Petter Selasky > > wrote: > > > >> On 05/14/14 21:11, Mark Murray wrote: > >>> Author: markm > >>> Date: Wed May 14 19:11:15 2014 > >>> New Revision: 266083 > >>> URL: http://svnweb.freebsd.org/changeset/base/266083 > >>> > >>> Log: > >>> Give suitably-endowed ARMs a register similar to the x86 TSC > >>> register. > >>> > >> > >> Hi, > >> > >> Regression issue: > >> This commit prevents RPI-B from booting. > > > > Thanks, I’ll look at it ASAP. > Doesn't the ARM1176 use for example > MRC p15, 0, , c15, c12, 1 ; Read Cycle Counter Register > to read the value, whereas the > you use > __asm __volatile("mrc p15, 0, %0, c9, c13, 0": "=r" (ccnt)); On ARMv6 there is no guarantee of a cycle count register. On the ARM1176 there is one in an implementation defined section of the system control coprocessor. This is the c15 section above, and is accessible as shown. On ARMv7 there are optional performance monitor extensions. These are in parts of the c9 section of the coprocessor. As it is optional there is no requirement for implementers to include this functionality, however I would expect the ARM designs to include it, and most non-ARM designs are likely aiming for performance so will also include them. If the ARMv7 processor has the performance extensions the existing code appears correct to retrieve it. Andrew