From: Julien Grall <julien.grall@linaro.org>
To: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
Cc: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
tim@xen.org, Ian Campbell <ian.campbell@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v1 3/3] xen/arm: Introduce support for Renesas R-Car Gen2 platform
Date: Fri, 16 Jan 2015 19:34:29 +0000 [thread overview]
Message-ID: <54B967C5.5010903@linaro.org> (raw)
In-Reply-To: <CABc08zLX5edqKa3WthQvfBtnMLiMsTwJEdfGeJOM=PzA3qBepg@mail.gmail.com>
On 16/01/15 19:11, Iurii Konovalenko wrote:
> On Fri, Jan 16, 2015 at 6:31 PM, Julien Grall <julien.grall@linaro.org> wrote:
>>
>> 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?
>>
>
> Now I understand it.
> So I will set up frequency and enable timer in u-boot.
> As there is no way to change frequency in Hypervisor mode, I will
> remove from board file mode checking and frequency related staff.
> So time init function is like:
>
> static int __init shmobile_init_time(void)
> {
> void __iomem *tmu;
>
> /* Remap "armgcnt address map" space */
> tmu = ioremap_nocache(SHMOBILE_ARCH_TIMER_BASE, PAGE_SIZE);
> if ( !tmu )
> {
> dprintk(XENLOG_ERR, "Unable to map TMU\n");
> return -ENOMEM;
> }
> /* Enable the timer if it is not running */
> if ( (readl_relaxed(tmu + SHMOBILE_ARCH_TIMER_CNTCR) & 1) == 0 )
> writel_relaxed(1, tmu + SHMOBILE_ARCH_TIMER_CNTCR);
>
> iounmap(tmu);
>
> return 0;
> }
>
> Am I right?
While you are modifying U-boot, can you also enable the timer? It would
avoid to do specific timer initialization for this board.
>> 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?
>
> I added PSCI node to dom0 Device Tree:
> psci {
> compatible = "arm,psci";
> method = "hvc";
> cpu_on = <2>;
> };
You don't need to add it. Xen will create the PSCI node for DOM0 during
the domain building.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-01-16 19:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 12:50 [PATCH v1 0/3] arm: introduce basic Renesas R-Car Gen2 platform support Iurii Konovalenko
2015-01-16 12:50 ` [PATCH v1 1/3] xen/arm: Add R-Car Gen2 support for early printk Iurii Konovalenko
2015-01-16 13:05 ` Julien Grall
2015-01-16 13:08 ` Ian Campbell
2015-01-16 13:11 ` Julien Grall
2015-01-16 13:15 ` Ian Campbell
2015-01-16 13:26 ` Oleksandr Tyshchenko
2015-01-16 13:36 ` Ian Campbell
2015-01-16 12:50 ` [PATCH v1 2/3] xen/arm: Add new driver for R-Car Gen2 UART Iurii Konovalenko
2015-01-16 13:19 ` Julien Grall
2015-01-16 15:53 ` Oleksandr Tyshchenko
2015-01-16 12:50 ` [PATCH v1 3/3] xen/arm: Introduce support for Renesas R-Car Gen2 platform Iurii Konovalenko
2015-01-16 14:08 ` Julien Grall
2015-01-16 15:29 ` Iurii Konovalenko
2015-01-16 15:32 ` Julien Grall
2015-01-16 16:17 ` Iurii Konovalenko
2015-01-16 16:31 ` Julien Grall
2015-01-16 19:11 ` Iurii Konovalenko
2015-01-16 19:34 ` Julien Grall [this message]
2015-01-17 20:55 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54B967C5.5010903@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=iurii.konovalenko@globallogic.com \
--cc=oleksandr.tyshchenko@globallogic.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.