From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v1 3/3] xen/arm: Introduce support for Renesas R-Car Gen2 platform Date: Fri, 16 Jan 2015 16:31:34 +0000 Message-ID: <54B93CE6.1080106@linaro.org> References: <1421412610-19313-1-git-send-email-oiurii.konovalenko@globallogic.com> <1421412610-19313-4-git-send-email-oiurii.konovalenko@globallogic.com> <54B91B56.1060206@linaro.org> <54B92F23.7060507@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Iurii Konovalenko Cc: Oleksandr Tyshchenko , Stefano Stabellini , tim@xen.org, Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 16/01/15 16:17, Iurii Konovalenko wrote: > I tried to add instruction: asm volatile("mcr p15, 0, %0, c14, c0, 0" : > : "r" (freq)); > Also I tried to write it via Xen API: WRITE_SYSREG32(freq, CNTFRQ_EL0); > > But unfortunately Xen fails on both this instructions with "Undefined > instruction" exception. > You can see log in attachment. > Could you please suggest reason, why it happens? CNTFRQ can only be written in Secure PL1 mode. I have the feeling CNTFRQ is not update automatically when Xen is writing in CNTFID0. So the frequency may mismatch. Assuming this, I'm wondering if we hit the second part of the if sentence [1] and therefore this code useful? BWT I see in the log: (XEN) /psci method must be smc, but is: "hvc" Does it mean your platform support PSCI? Or did you add the PSCI node for DOM0? Regards, [1] readl_relaxed(tmu + SHMOBILE_ARCH_TIMER_CNTFID0) != freq -- Julien Grall