From owner-svn-src-head@freebsd.org Wed Aug 12 17:06:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B02B99F44D; Wed, 12 Aug 2015 17:06:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA4CF1B; Wed, 12 Aug 2015 17:06:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7CH6NY7033695; Wed, 12 Aug 2015 17:06:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7CH6Nlv033694; Wed, 12 Aug 2015 17:06:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201508121706.t7CH6Nlv033694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 12 Aug 2015 17:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286674 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 12 Aug 2015 17:06:23 -0000 Author: andrew Date: Wed Aug 12 17:06:22 2015 New Revision: 286674 URL: https://svnweb.freebsd.org/changeset/base/286674 Log: Set the counter-timer virtual offset to a know value, it may not have been set by the boot code and are reset to an implementation defined value that may be unknown. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Wed Aug 12 16:53:37 2015 (r286673) +++ head/sys/arm64/arm64/locore.S Wed Aug 12 17:06:22 2015 (r286674) @@ -220,6 +220,14 @@ drop_to_el1: /* Don't trap to EL2 for CP15 traps */ msr hstr_el2, xzr + /* Enable access to the physical timers at EL1 */ + mrs x2, cnthctl_el2 + orr x2, x2, #(CNTHCTL_EL1PCTEN | CNTHCTL_EL1PCEN) + msr cnthctl_el2, x2 + + /* Set the counter offset to a known value */ + msr cntvoff_el2, xzr + /* Hypervisor trap functions */ adr x2, hyp_vectors msr vbar_el2, x2