[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1 4/4] xen/arm: Reuse R-Car Gen2 platform code for Stout board



Hi Julien.

On Thu, Aug 9, 2018 at 7:20 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
>
>
> On 08/09/2018 05:18 PM, Oleksandr Tyshchenko wrote:
>>
>> On Thu, Aug 9, 2018 at 7:10 PM, Julien Grall <julien.grall@xxxxxxx> wrote:
>>>
>>> Somehow I thought the platform was 64-bit and found a SOC name very
>>> similar
>>> to it. Sorry for the confusion. PSCI seems indeed not supported for that
>>> platform.
>>
>> R-Car Gen3 is ARM64 (H2 SoC -> r8a7790) and does support PSCI.
>> But R-Car Gen2 is ARM32 (H2 SoC -> r8a7790)
>>
>>>
>>> However, the code looks fairly different than what we have in Xen. For
>>> instance secondary CPU seems to require to initialize CNTVOFF, the
>>> function
>>> to power on a CPU also looks different.
>>
>> Sorry, which code you are taking about, U-Boot or Linux?
>
>
> The SMP code in Linux vs the SMP code in Xen for the R-Car. In most of the
> cases, Xen should replicate what Linux does.
>
> I am trying to understand why such differences at the moment.

As I understand, the SMP code for Linux can't be used in Xen, since
the requirement is to boot into Xen with cores already being in
Hypervisor mode.
But, all cores seems to start in Monitor mode after powering them up.
So, they must be switched into Hypervisor mode beforehand, correct?

U-Boot brings non-boot cores up (using ported from Linux's
platsmp-apmu code functions). Then U-Boot switches all cores to HYP
mode.
While jump into Xen on a boot core, all non-boot cores are left in
U-Boot to wait to be "woken up by Xen" (actually rcar2_smp_init() is
used for).
Platform R-Car2 code in Xen doesn't power on cores, it just "brings
them to Xen".

Please correct me if I am wrong.

Also, U-Boot seems to reset to zero CNTVOFF on all cores before
leaving Monitor mode.

>
> Cheers,
>
> --
> Julien Grall



-- 
Regards,

Oleksandr Tyshchenko

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.