Mailing List Archive

Starting to port xen on beagleboard-x15 (GSoC 2019 project)
Hello,

I was trying to boot xen on bb-x15, here is my starting point:
I built xen with:
make dist-xen debug=y XEN_TARGET_ARCH=arm32
CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
(omap5432 and omap5729 have the same serial debug address)
and I got the output:
https://pastebin.com/FdmGz6i2

I would appreciate any suggestions on how to proceed with this and how
to debug (how to see the call stack).

--
Regards, Denis Obrezkov
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
On 6/16/19 4:19 PM, Denis Obrezkov wrote:
> Hello,

Hi,


> I was trying to boot xen on bb-x15, here is my starting point:
> I built xen with:
> make dist-xen debug=y XEN_TARGET_ARCH=arm32
> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
> (omap5432 and omap5729 have the same serial debug address)
> and I got the output:
> https://pastebin.com/FdmGz6i2

From the log

- CPU 00000001 booting -
- Xen must be entered in NS Hyp mode -
- Please update the bootloader -
- Boot failed

This means that U-boot bring-up secondary CPU in hypervisor mode
(probably it is in secure mode or kernel mode). Which U-boot are you using?

>
> I would appreciate any suggestions on how to proceed with this and how
> to debug (how to see the call stack).

Call stack is not always useful to have. In this case, this is assembly
code. An alternative is to grep the error message and see where it comes
from.

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hi,


On 6/16/19 10:18 PM, Julien Grall wrote:
>
>
> On 6/16/19 4:19 PM, Denis Obrezkov wrote:
>> Hello,
>
> Hi,
>
>
>> I was trying to boot xen on bb-x15, here is my starting point:
>> I built xen with:
>> make dist-xen debug=y XEN_TARGET_ARCH=arm32
>> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
>> (omap5432 and omap5729 have the same serial debug address)
>> and I got the output:
>> https://pastebin.com/FdmGz6i2
>
> From the log
>
> - CPU 00000001 booting -
> - Xen must be entered in NS Hyp mode -
> - Please update the bootloader -
> - Boot failed
>
> This means that U-boot bring-up secondary CPU in hypervisor mode
> (probably it is in secure mode or kernel mode). Which U-boot are you using?
I use the latest u-boot - 2019.04.
>
>>
>> I would appreciate any suggestions on how to proceed with this and how
>> to debug (how to see the call stack).
>
> Call stack is not always useful to have. In this case, this is assembly
> code. An alternative is to grep the error message and see where it comes
> from.
Ok, I will do it.
>
> Cheers,
>

--
Regards, Denis Obrezkov
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hi,

On 6/16/19 9:46 PM, Denis Obrezkov wrote:
> On 6/16/19 10:18 PM, Julien Grall wrote:
>>
>>
>> On 6/16/19 4:19 PM, Denis Obrezkov wrote:
>>> Hello,
>>> I was trying to boot xen on bb-x15, here is my starting point:
>>> I built xen with:
>>> make dist-xen debug=y XEN_TARGET_ARCH=arm32
>>> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
>>> (omap5432 and omap5729 have the same serial debug address)
>>> and I got the output:
>>> https://pastebin.com/FdmGz6i2
>>
>> From the log
>>
>> - CPU 00000001 booting -
>> - Xen must be entered in NS Hyp mode -
>> - Please update the bootloader -
>> - Boot failed
>>
>> This means that U-boot bring-up secondary CPU in hypervisor mode
>> (probably it is in secure mode or kernel mode). Which U-boot are you using?
> I use the latest u-boot - 2019.04.

lain suggested to use a patched version of U-boot (See his e-mail for
the 29th of May). So one possibility is some of the patches didn't reach
upstream.

I would recommend to try the same U-boot version first to see if
secondary CPUs are brought up in Hyp mode.

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hi,

On 6/16/19 10:53 PM, Julien Grall wrote:
> Hi,
>
> On 6/16/19 9:46 PM, Denis Obrezkov wrote:
>> On 6/16/19 10:18 PM, Julien Grall wrote:
>>>
>>>
>>> On 6/16/19 4:19 PM, Denis Obrezkov wrote:
>>>> Hello,
>>>> I was trying to boot xen on bb-x15, here is my starting point:
>>>> I built xen with:
>>>> make dist-xen debug=y XEN_TARGET_ARCH=arm32
>>>> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
>>>> (omap5432 and omap5729 have the same serial debug address)
>>>> and I got the output:
>>>> https://pastebin.com/FdmGz6i2
>>>
>>>  From the log
>>>
>>> - CPU 00000001 booting -
>>> - Xen must be entered in NS Hyp mode -
>>> - Please update the bootloader -
>>> - Boot failed
>>>
>>> This means that U-boot bring-up secondary CPU in hypervisor mode
>>> (probably it is in secure mode or kernel mode). Which U-boot are you
>>> using?
>> I use the latest u-boot - 2019.04.
>
> lain suggested to use a patched version of U-boot (See his e-mail for
> the 29th of May). So one possibility is some of the patches didn't reach
> upstream.
>
> I would recommend to try the same U-boot version first to see if
> secondary CPUs are brought up in Hyp mode.
I will try to apply 0004 patch to the modern u-boot, I think it will
have the similar effect.
I don't quite understand how to use Kconfig. I can't find some options
with menuconfig, so, I am interested in how programmers find out what
options they need to choose?
>
> Cheers,
>

--
Regards, Denis Obrezkov
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hi Denis,

patch 0004 was not actually applied to the u-boot build (and should
have been removed from the patch set). The only change that was
applied was 0001-for-xen-build-set-envboot-as-default-mmc.patch (line
123 in build-x15-xen.sh).

Do you have CONFIG_ARMV7_LPAE=y in your configs/am57xx_evm_defconfig
file? and is this the defconfig you have selected?
Iain


On Sun, 16 Jun 2019 at 23:29, Denis Obrezkov <denisobrezkov@gmail.com> wrote:
>
> Hi,
>
> On 6/16/19 10:53 PM, Julien Grall wrote:
> > Hi,
> >
> > On 6/16/19 9:46 PM, Denis Obrezkov wrote:
> >> On 6/16/19 10:18 PM, Julien Grall wrote:
> >>>
> >>>
> >>> On 6/16/19 4:19 PM, Denis Obrezkov wrote:
> >>>> Hello,
> >>>> I was trying to boot xen on bb-x15, here is my starting point:
> >>>> I built xen with:
> >>>> make dist-xen debug=y XEN_TARGET_ARCH=arm32
> >>>> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
> >>>> (omap5432 and omap5729 have the same serial debug address)
> >>>> and I got the output:
> >>>> https://pastebin.com/FdmGz6i2
> >>>
> >>> From the log
> >>>
> >>> - CPU 00000001 booting -
> >>> - Xen must be entered in NS Hyp mode -
> >>> - Please update the bootloader -
> >>> - Boot failed
> >>>
> >>> This means that U-boot bring-up secondary CPU in hypervisor mode
> >>> (probably it is in secure mode or kernel mode). Which U-boot are you
> >>> using?
> >> I use the latest u-boot - 2019.04.
> >
> > lain suggested to use a patched version of U-boot (See his e-mail for
> > the 29th of May). So one possibility is some of the patches didn't reach
> > upstream.
> >
> > I would recommend to try the same U-boot version first to see if
> > secondary CPUs are brought up in Hyp mode.
> I will try to apply 0004 patch to the modern u-boot, I think it will
> have the similar effect.
> I don't quite understand how to use Kconfig. I can't find some options
> with menuconfig, so, I am interested in how programmers find out what
> options they need to choose?
> >
> > Cheers,
> >
>
> --
> Regards, Denis Obrezkov
>

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hi,

On 6/17/19 10:11 AM, Iain Hunter wrote:
> Hi Denis,
>
> patch 0004 was not actually applied to the u-boot build (and should
> have been removed from the patch set). The only change that was
> applied was 0001-for-xen-build-set-envboot-as-default-mmc.patch (line
> 123 in build-x15-xen.sh).
But only the fourth patch changes something related to hypervisor?
Also, I boot via tftp not via mmc. Should I use the patch?
>
> Do you have CONFIG_ARMV7_LPAE=y in your configs/am57xx_evm_defconfig
> file? and is this the defconfig you have selected?
> Iain
yes, to both questions.
>
>
> On Sun, 16 Jun 2019 at 23:29, Denis Obrezkov <denisobrezkov@gmail.com> wrote:
>>
>> Hi,
>>
>> On 6/16/19 10:53 PM, Julien Grall wrote:
>>> Hi,
>>>
>>> On 6/16/19 9:46 PM, Denis Obrezkov wrote:
>>>> On 6/16/19 10:18 PM, Julien Grall wrote:
>>>>>
>>>>>
>>>>> On 6/16/19 4:19 PM, Denis Obrezkov wrote:
>>>>>> Hello,
>>>>>> I was trying to boot xen on bb-x15, here is my starting point:
>>>>>> I built xen with:
>>>>>> make dist-xen debug=y XEN_TARGET_ARCH=arm32
>>>>>> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
>>>>>> (omap5432 and omap5729 have the same serial debug address)
>>>>>> and I got the output:
>>>>>> https://pastebin.com/FdmGz6i2
>>>>>
>>>>> From the log
>>>>>
>>>>> - CPU 00000001 booting -
>>>>> - Xen must be entered in NS Hyp mode -
>>>>> - Please update the bootloader -
>>>>> - Boot failed
>>>>>
>>>>> This means that U-boot bring-up secondary CPU in hypervisor mode
>>>>> (probably it is in secure mode or kernel mode). Which U-boot are you
>>>>> using?
>>>> I use the latest u-boot - 2019.04.
>>>
>>> lain suggested to use a patched version of U-boot (See his e-mail for
>>> the 29th of May). So one possibility is some of the patches didn't reach
>>> upstream.
>>>
>>> I would recommend to try the same U-boot version first to see if
>>> secondary CPUs are brought up in Hyp mode.
>> I will try to apply 0004 patch to the modern u-boot, I think it will
>> have the similar effect.
>> I don't quite understand how to use Kconfig. I can't find some options
>> with menuconfig, so, I am interested in how programmers find out what
>> options they need to choose?
>>>
>>> Cheers,
>>>
>>
>> --
>> Regards, Denis Obrezkov
>>

--
Regards, Denis Obrezkov
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
I can't remember the history of that patch. What I couldn't figure out
today was what its effect would be. I could not find any u-boot code
that used the CONFIG_XXX values added in the patch.
So, best ignore it.

Do you have an emulator available yet?
If so the easiest way I found to debug this type of issue was to:

1. Insert an infinite loop just before where I thought I had a problem
- in a .S file with
loopHere: b loopHere

- in a C file with

volatile unsigned char loopHere=1;

function()
{ ....
while(loopHere);
....
}

2 boot the board
3 connect the emulator to the target and then load the symbols for the
executable (u-boot.img or xen)
4 in the emulator set the PC to first instruction after the loop and
then step over the code. Then you can check the register values to see
if hypevisor is enabled etc

Iain

On Mon, 17 Jun 2019 at 09:53, Denis Obrezkov <denisobrezkov@gmail.com> wrote:
>
> Hi,
>
> On 6/17/19 10:11 AM, Iain Hunter wrote:
> > Hi Denis,
> >
> > patch 0004 was not actually applied to the u-boot build (and should
> > have been removed from the patch set). The only change that was
> > applied was 0001-for-xen-build-set-envboot-as-default-mmc.patch (line
> > 123 in build-x15-xen.sh).
> But only the fourth patch changes something related to hypervisor?
> Also, I boot via tftp not via mmc. Should I use the patch?
> >
> > Do you have CONFIG_ARMV7_LPAE=y in your configs/am57xx_evm_defconfig
> > file? and is this the defconfig you have selected?
> > Iain
> yes, to both questions.
> >
> >
> > On Sun, 16 Jun 2019 at 23:29, Denis Obrezkov <denisobrezkov@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> On 6/16/19 10:53 PM, Julien Grall wrote:
> >>> Hi,
> >>>
> >>> On 6/16/19 9:46 PM, Denis Obrezkov wrote:
> >>>> On 6/16/19 10:18 PM, Julien Grall wrote:
> >>>>>
> >>>>>
> >>>>> On 6/16/19 4:19 PM, Denis Obrezkov wrote:
> >>>>>> Hello,
> >>>>>> I was trying to boot xen on bb-x15, here is my starting point:
> >>>>>> I built xen with:
> >>>>>> make dist-xen debug=y XEN_TARGET_ARCH=arm32
> >>>>>> CROSS_COMPILE=arm-linux-gnueabihf- CONFIG_EARLY_PRINTK=omap5432
> >>>>>> (omap5432 and omap5729 have the same serial debug address)
> >>>>>> and I got the output:
> >>>>>> https://pastebin.com/FdmGz6i2
> >>>>>
> >>>>> From the log
> >>>>>
> >>>>> - CPU 00000001 booting -
> >>>>> - Xen must be entered in NS Hyp mode -
> >>>>> - Please update the bootloader -
> >>>>> - Boot failed
> >>>>>
> >>>>> This means that U-boot bring-up secondary CPU in hypervisor mode
> >>>>> (probably it is in secure mode or kernel mode). Which U-boot are you
> >>>>> using?
> >>>> I use the latest u-boot - 2019.04.
> >>>
> >>> lain suggested to use a patched version of U-boot (See his e-mail for
> >>> the 29th of May). So one possibility is some of the patches didn't reach
> >>> upstream.
> >>>
> >>> I would recommend to try the same U-boot version first to see if
> >>> secondary CPUs are brought up in Hyp mode.
> >> I will try to apply 0004 patch to the modern u-boot, I think it will
> >> have the similar effect.
> >> I don't quite understand how to use Kconfig. I can't find some options
> >> with menuconfig, so, I am interested in how programmers find out what
> >> options they need to choose?
> >>>
> >>> Cheers,
> >>>
> >>
> >> --
> >> Regards, Denis Obrezkov
> >>
>
> --
> Regards, Denis Obrezkov
>

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
(+ Andre and Oleksandr)

Hi Denis & lain,

I have discussed with Andre Przywara (in CC) who did some work around
virtualization support in U-boot.

I have also CCed Oleksandr, who IIRC worked on a platform using the same SoC
(DRA7) in the past.

On 17/06/2019 10:03, Iain Hunter wrote:
> I can't remember the history of that patch. What I couldn't figure out
> today was what its effect would be. I could not find any u-boot code
> that used the CONFIG_XXX values added in the patch.
> So, best ignore it.

lain, did you manage to get SMP working back then?

>
> Do you have an emulator available yet?
> If so the easiest way I found to debug this type of issue was to:
>
> 1. Insert an infinite loop just before where I thought I had a problem
> - in a .S file with
> loopHere: b loopHere
>
> - in a C file with
>
> volatile unsigned char loopHere=1;
>
> function()
> { ....
> while(loopHere);
> ....
> }
>
> 2 boot the board
> 3 connect the emulator to the target and then load the symbols for the
> executable (u-boot.img or xen)
> 4 in the emulator set the PC to first instruction after the loop and
> then step over the code. Then you can check the register values to see
> if hypevisor is enabled etc

Both CPUs are Cortex-A15, hence virtualization should be supported. It is a
matter of correctly initializing the secondary CPU.

The platform is not using PSCI but instead a custom SMP bring-up (see
omap5_smp_init in Xen). From my understanding the ROM should bring-up the
secondary CPU to hyp mode if the boot CPU is in hyp mode.

It would be interesting to try Linux on baremetal and see if it brings-up the
secondary CPUs in hyp mode. If it does, then it seems that the problem lies in
Xen. Otherwise it would be in the ROM.

On a side note, I would not spend too much time looking at the SMP now. Instead
you can disable the secondary CPUs.

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hi Julien,
SMP triggered a memory. No I didn't get it working.
kernel/0007-remove-cpu1-to-leave-single-core-in-DT.patch
was my workaround.


Denis,
Are you able to get something working with my build script? I'd
suggest validating that gets you to a linux kernel trying to load a
filesystem. Once that is working with the "old" versions you can try
updating them one by one until you are at an equivalent functional
level with the component versions you want to work with.
Iain

On Mon, 17 Jun 2019 at 11:09, Julien Grall <julien.grall@arm.com> wrote:
>
> (+ Andre and Oleksandr)
>
> Hi Denis & lain,
>
> I have discussed with Andre Przywara (in CC) who did some work around
> virtualization support in U-boot.
>
> I have also CCed Oleksandr, who IIRC worked on a platform using the same SoC
> (DRA7) in the past.
>
> On 17/06/2019 10:03, Iain Hunter wrote:
> > I can't remember the history of that patch. What I couldn't figure out
> > today was what its effect would be. I could not find any u-boot code
> > that used the CONFIG_XXX values added in the patch.
> > So, best ignore it.
>
> lain, did you manage to get SMP working back then?
>
> >
> > Do you have an emulator available yet?
> > If so the easiest way I found to debug this type of issue was to:
> >
> > 1. Insert an infinite loop just before where I thought I had a problem
> > - in a .S file with
> > loopHere: b loopHere
> >
> > - in a C file with
> >
> > volatile unsigned char loopHere=1;
> >
> > function()
> > { ....
> > while(loopHere);
> > ....
> > }
> >
> > 2 boot the board
> > 3 connect the emulator to the target and then load the symbols for the
> > executable (u-boot.img or xen)
> > 4 in the emulator set the PC to first instruction after the loop and
> > then step over the code. Then you can check the register values to see
> > if hypevisor is enabled etc
>
> Both CPUs are Cortex-A15, hence virtualization should be supported. It is a
> matter of correctly initializing the secondary CPU.
>
> The platform is not using PSCI but instead a custom SMP bring-up (see
> omap5_smp_init in Xen). From my understanding the ROM should bring-up the
> secondary CPU to hyp mode if the boot CPU is in hyp mode.
>
> It would be interesting to try Linux on baremetal and see if it brings-up the
> secondary CPUs in hyp mode. If it does, then it seems that the problem lies in
> Xen. Otherwise it would be in the ROM.
>
> On a side note, I would not spend too much time looking at the SMP now. Instead
> you can disable the secondary CPUs.
>
> Cheers,
>
> --
> Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hello all.

Sorry for the top-posting.

> I have also CCed Oleksandr, who IIRC worked on a platform using the same SoC
> (DRA7) in the past.

Yes. I worked with DRA7 sometime ago. Unfortunately, I don't remember this platform in details, but, there is a Wiki page describing how to run Xen on this platform which *may* help:
https://wiki.xenproject.org/wiki/User:Xen_intruction_setup_for_dra7xx-evm_board
Please note, it is related to old Xen and TI GLSDK versions.

Regarding secondary CPU boot.
The special monitor API is used to enable Hyp mode. U-Boot brings secondary CPU up, which, it turn, switches to Hyp mode and enters WFE until Xen wakes it up.
Take a look at the following patch:
https://github.com/inisider/gl_patches/blob/master/dra7xx-evm/glsdk/0007-Add-virtualization-support-for-dra7xx-evm.patch#L591


OLEKSANDR TYSHCHENKO

Lead Software Engineer



Office: +380 44 390 5457<tel:+380%2044%20390%205457> x 66821<tel:66821> Cell: +380 93 661 6198<tel:+380%2093%20661%206198> Email: oleksandr_tyshchenko@epam.com<mailto:oleksandr_tyshchenko@epam.com>

Kyiv, Ukraine (GMT+3) epam.com<http://www.epam.com>



CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains information that is legally privileged and confidential. If you are not the intended recipient, or the person responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. All unintended recipients are obliged to delete this message and destroy any printed copies.

________________________________
From: Julien Grall <julien.grall@arm.com>
Sent: Monday, June 17, 2019 13:09
To: Iain Hunter; Denis Obrezkov
Cc: xen-users@lists.xenproject.org; Stefano Stabellini; Hunyue Yau; Andre Przywara; Oleksandr Tyshchenko
Subject: Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project)

(+ Andre and Oleksandr)

Hi Denis & lain,

I have discussed with Andre Przywara (in CC) who did some work around
virtualization support in U-boot.

I have also CCed Oleksandr, who IIRC worked on a platform using the same SoC
(DRA7) in the past.

On 17/06/2019 10:03, Iain Hunter wrote:
> I can't remember the history of that patch. What I couldn't figure out
> today was what its effect would be. I could not find any u-boot code
> that used the CONFIG_XXX values added in the patch.
> So, best ignore it.

lain, did you manage to get SMP working back then?

>
> Do you have an emulator available yet?
> If so the easiest way I found to debug this type of issue was to:
>
> 1. Insert an infinite loop just before where I thought I had a problem
> - in a .S file with
> loopHere: b loopHere
>
> - in a C file with
>
> volatile unsigned char loopHere=1;
>
> function()
> { ....
> while(loopHere);
> ....
> }
>
> 2 boot the board
> 3 connect the emulator to the target and then load the symbols for the
> executable (u-boot.img or xen)
> 4 in the emulator set the PC to first instruction after the loop and
> then step over the code. Then you can check the register values to see
> if hypevisor is enabled etc

Both CPUs are Cortex-A15, hence virtualization should be supported. It is a
matter of correctly initializing the secondary CPU.

The platform is not using PSCI but instead a custom SMP bring-up (see
omap5_smp_init in Xen). From my understanding the ROM should bring-up the
secondary CPU to hyp mode if the boot CPU is in hyp mode.

It would be interesting to try Linux on baremetal and see if it brings-up the
secondary CPUs in hyp mode. If it does, then it seems that the problem lies in
Xen. Otherwise it would be in the ROM.

On a side note, I would not spend too much time looking at the SMP now. Instead
you can disable the secondary CPUs.

Cheers,

--
Julien Grall
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
On 18/06/2019 11:33, Oleksandr Tyshchenko wrote:
> Hello all.

Hi,

> Sorry for the top-posting.
>
>> I have also CCed Oleksandr, who IIRC worked on a platform using the same SoC
>> (DRA7) in the past.
>
> Yes. I worked with DRA7 sometime ago. Unfortunately, I don't remember this
> platform in details, but, there is a Wiki page describing how to run Xen on this
> platform which *may* help:
> https://wiki.xenproject.org/wiki/User:Xen_intruction_setup_for_dra7xx-evm_board
> Please note, it is related to old Xen and TI GLSDK versions.
>
> Regarding secondary CPU boot.
> The special monitor API is used to enable Hyp mode. U-Boot brings secondary CPU
> up, which, it turn, switches to Hyp mode and enters WFE until Xen wakes it up.
> Take a look at the following patch:
> https://github.com/inisider/gl_patches/blob/master/dra7xx-evm/glsdk/0007-Add-virtualization-support-for-dra7xx-evm.patch#L591

I am a bit confused. Linux is able to bring-up CPU in hyp mode with the current
U-boot. Why would we need more changes for Xen?

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
Hi Julien.

Again, sorry for the possible format issue an top-posting.

> I am a bit confused. Linux is able to bring-up CPU in hyp mode with the current
> U-boot. Why would we need more changes for Xen?

I have added Andrii, who, I hope, will shed some light on this.


OLEKSANDR TYSHCHENKO

Lead Software Engineer



Office: +380 44 390 5457<tel:+380%2044%20390%205457> x 66821<tel:66821> Cell: +380 93 661 6198<tel:+380%2093%20661%206198> Email: oleksandr_tyshchenko@epam.com<mailto:oleksandr_tyshchenko@epam.com>

Kyiv, Ukraine (GMT+3) epam.com<http://www.epam.com>



CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains information that is legally privileged and confidential. If you are not the intended recipient, or the person responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. All unintended recipients are obliged to delete this message and destroy any printed copies.

________________________________
From: Julien Grall <julien.grall@arm.com>
Sent: Tuesday, June 18, 2019 13:40
To: Oleksandr Tyshchenko; Iain Hunter; Denis Obrezkov
Cc: xen-users@lists.xenproject.org; Stefano Stabellini; Hunyue Yau; Andre Przywara
Subject: Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project)

On 18/06/2019 11:33, Oleksandr Tyshchenko wrote:
> Hello all.

Hi,

> Sorry for the top-posting.
>
>> I have also CCed Oleksandr, who IIRC worked on a platform using the same SoC
>> (DRA7) in the past.
>
> Yes. I worked with DRA7 sometime ago. Unfortunately, I don't remember this
> platform in details, but, there is a Wiki page describing how to run Xen on this
> platform which *may* help:
> https://wiki.xenproject.org/wiki/User:Xen_intruction_setup_for_dra7xx-evm_board
> Please note, it is related to old Xen and TI GLSDK versions.
>
> Regarding secondary CPU boot.
> The special monitor API is used to enable Hyp mode. U-Boot brings secondary CPU
> up, which, it turn, switches to Hyp mode and enters WFE until Xen wakes it up.
> Take a look at the following patch:
> https://github.com/inisider/gl_patches/blob/master/dra7xx-evm/glsdk/0007-Add-virtualization-support-for-dra7xx-evm.patch#L591

I am a bit confused. Linux is able to bring-up CPU in hyp mode with the current
U-boot. Why would we need more changes for Xen?

Cheers,

--
Julien Grall
Re: Starting to port xen on beagleboard-x15 (GSoC 2019 project) [ In reply to ]
+xen-devel

Hello Julien,

> I am a bit confused. Linux is able to bring-up CPU in hyp mode with the current
> U-boot. Why would we need more changes for Xen?

TI's ROM code starts all CPUs in NS PL1, doesn't matter if it is boot or secondary core.
If you look at Linux code [1], you'll see, that after the secondary core bringup Linux does switch that core from NS PL1 to PL2 (hyp mode) using ROM code interface (smc 0).
At some moment XEN dropped all to-hyp-mode switching code. So I did switch secondaries to hyp mode in u-boot with the loop which replicates the ROM Code logic in terms of waiting for an event and checking aux registers.

[1] https://elixir.bootlin.com/linux/v5.1/source/arch/arm/mach-omap2/omap-headsmp.S#L62

ANDRII ANISOV

Lead Systems Engineer

 

Office: +380 44 390 5457 x 66766   Cell: +380 50 573 8852   Email: andrii_anisov@epam.com

Kyiv, Ukraine (GMT+3)   epam.com

 

CONFIDENTIALITY CAUTION AND DISCLAIMER
This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains information that is legally privileged and confidential. If you are not the intended recipient, or the person responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. All unintended recipients are obliged to delete this message and destroy any printed copies.


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