Re: [linux-sunxi] [RFC PATCH 8/8] sunxi: enable PSCI for A83T SoC

2018-02-03 Thread Mr . Fülöp
Hello!

First of all I would like to thank you all for your amazing contribution! More 
I dive into understanding the kernel, more I appreciate your work and more I 
learn.

As Marc Zyngier said:
"Now, if someone could try and run guests on this turd and report whether 
this works correctly or not, that'd be an interesting data point. 
Because in the absence of a TEE running on the secure side, 
virtualization is basically the only thing you gain from running on the 
non-secure side. "

I am that "someone" who wants to run Xen on a A83T chipset. I managed to build 
the latest kernel 4.15, the Xen hypervisor and got stuck on compiling the 
u-boot kernel with virtualization, HYP enabled and boot non secure:

 bool "sun8i (Allwinner A83T)" 
 select CPU_V7 
+select CPU_V7_HAS_NONSEC 
+select CPU_V7_HAS_VIRT 
+select ARCH_SUPPORT_PSCI 
 select SUNXI_GEN_SUN6I 
 select SUPPORT_SPL 
+select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT 

Not knowing if A83T supports virtualization and the above mentioned features, I 
tried to enable these in Kconfig and build the latest u-boot kernel. 
Unfortunatelly even if it compiled, I have a strange loop at boot...I think it 
is related to the CPU allocation...
 
  
As you can see I am a noob in terms of kernel hacking, but I want, with your 
help, to achieve this implementation of Xen.

In this regard I would appreciate your help and guidance.

Can you provide the files/patches and/or a tutorial on how I could accomplish 
my goal?


Many thanks!


Alex

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [RFC PATCH 8/8] sunxi: enable PSCI for A83T SoC

2018-02-05 Thread Mr . Fülöp
This is the loop I was talking about:

U-Boot 2018.03-rc1-00078-gb215307-dirty (Feb 05 2018 - 12:50:50 +)

Loading Environment from FAT... Unable to use mmc 1:0... Failed (-5)
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)
In:serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
USB0:   data abort
pc : []  lr : []
reloc pc : [<4a01ba3a>]lr : [<4a01ba1d>]
sp : bbf4ec40  ip : bbf584ec fp : 0002
r10: bffb577c  r9 : bbf50ee8 r8 : 
r7 :   r6 : bbf5773c r5 : bffb39a4  r4 : bbf57550
r3 :   r2 : 01c4 r1 : 3f8f  r0 : 
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...



Any hints? Thank you!

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [RFC PATCH 8/8] sunxi: enable PSCI for A83T SoC

2018-02-05 Thread Mr . Fülöp
Thank you all for your help! I really appreciate your feedback!

Following your advice I booted XEN ... Yeeeyyy 
BUT got stuck here:

 Xen 4.11-unstable
(XEN) Xen version 4.11-unstable (@) (arm-linux-gnueabi-gcc (Debian 6.1.1-9) 
6.1.1 20160705) debug=y  Fri Feb  2 16:48:36 UTC 2018
(XEN) Latest ChangeSet: Fri Nov 3 16:43:02 2017 + git:4c7e478
(XEN) Processor: 410fc075: "ARM Limited", variant: 0x0, part 0xc07, rev 0x5
(XEN) 32-bit Execution:
(XEN)   Processor Features: 1131:00011011
(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN) Extensions: GenericTimer Security
(XEN)   Debug Features: 02010555
(XEN)   Auxiliary Features: 
(XEN)   Memory Model Features: 10101105 4000 0124 02102211
(XEN)  ISA Features: 02101110 13112111 21232041 2131 10011142 
(XEN) Using PSCI-0.1 for SMP bringup
(XEN) SMP: Allowing 8 CPUs
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 24000 KHz
(XEN) GICv2 initialization:
(XEN) gic_dist_addr=01c81000
(XEN) gic_cpu_addr=01c82000
(XEN) gic_hyp_addr=01c84000
(XEN) gic_vcpu_addr=01c86000
(XEN) gic_maintenance_irq=25
(XEN) GICv2: 224 lines, 8 cpus, secure (IID 0200143b).
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 64 KiB.
(XEN) VFP implementer 0x41 architecture 2 part 0x30 variant 0x7 rev 0x5
(XEN) Bringing up CPU1 

I am trying to recompile Xen and see if I can get further...
I will keep you updated with my progress... :)

Please let me know your opinion on this!
Is it feasible?

Thank you guys!

Alex

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [RFC PATCH 8/8] sunxi: enable PSCI for A83T SoC

2018-02-07 Thread Mr . Fülöp
Hi Guys,

I think I reached a dead end...
Can you please tell me why does it hang on "(XEN) Bringing up CPU1"?
I compiled many xen version, but my feeling is that in the u-boot is sth. that 
makes Xen hang...

Any suggestions?

Thank you in advance!

=

 Xen 4.11-unstable
(XEN) Xen version 4.11-unstable (@) (arm-linux-gnueabi-gcc (Debian 6.1.1-9) 
6.1.1 20160705) debug=y  Fri Feb  2 16:48:36 UTC 2018
(XEN) Latest ChangeSet: Fri Nov 3 16:43:02 2017 + git:4c7e478
(XEN) Processor: 410fc075: "ARM Limited", variant: 0x0, part 0xc07, rev 0x5
(XEN) 32-bit Execution:
(XEN)   Processor Features: 1131:00011011
(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN) Extensions: GenericTimer Security
(XEN)   Debug Features: 02010555
(XEN)   Auxiliary Features: 
(XEN)   Memory Model Features: 10101105 4000 0124 02102211
(XEN)  ISA Features: 02101110 13112111 21232041 2131 10011142 
(XEN) Using PSCI-0.1 for SMP bringup
(XEN) SMP: Allowing 8 CPUs
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 24000 KHz
(XEN) GICv2 initialization:
(XEN) gic_dist_addr=01c81000
(XEN) gic_cpu_addr=01c82000
(XEN) gic_hyp_addr=01c84000
(XEN) gic_vcpu_addr=01c86000
(XEN) gic_maintenance_irq=25
(XEN) GICv2: 224 lines, 8 cpus, secure (IID 0200143b).
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 64 KiB.
(XEN) VFP implementer 0x41 architecture 2 part 0x30 variant 0x7 rev 0x5
(XEN) Bringing up CPU1- HERE IT HANGS -

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [RFC PATCH 8/8] sunxi: enable PSCI for A83T SoC

2018-02-12 Thread Mr . Fülöp
Hi Icenowy,

Thank you for your reply!
I worked much and got this close, so I really want to make this thing work 
:) 
Do you have any suggestions/patches/directions? This "ugly hack" is there 
somewhere? :)

I think the issue resides on the "switching" to the next cpu...

Thank you in advance!

Alex


On Wednesday, February 7, 2018 at 8:04:41 PM UTC+2, Icenowy Zheng wrote:
>
>
>
> 于 2018年2月8日 GMT+08:00 上午2:02:39, "Mr. Fülöp"  > 写到: 
> >Hi Guys, 
> > 
> >I think I reached a dead end... 
> >Can you please tell me why does it hang on "(XEN) Bringing up CPU1"? 
> >I compiled many xen version, but my feeling is that in the u-boot is 
> >sth. that makes Xen hang... 
> > 
> >Any suggestions? 
> > 
> >Thank you in advance! 
> > 
> >= 
> > 
> > Xen 4.11-unstable 
> >(XEN) Xen version 4.11-unstable (@) (arm-linux-gnueabi-gcc (Debian 
> >6.1.1-9) 6.1.1 20160705) debug=y  Fri Feb  2 16:48:36 UTC 2018 
> >(XEN) Latest ChangeSet: Fri Nov 3 16:43:02 2017 + git:4c7e478 
> >(XEN) Processor: 410fc075: "ARM Limited", variant: 0x0, part 0xc07, rev 
> >0x5 
> >(XEN) 32-bit Execution: 
> >(XEN)   Processor Features: 1131:00011011 
> >(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle 
> >(XEN) Extensions: GenericTimer Security 
> >(XEN)   Debug Features: 02010555 
> >(XEN)   Auxiliary Features:  
> >(XEN)   Memory Model Features: 10101105 4000 0124 02102211 
> >(XEN)  ISA Features: 02101110 13112111 21232041 2131 10011142 
> > 
> >(XEN) Using PSCI-0.1 for SMP bringup 
> >(XEN) SMP: Allowing 8 CPUs 
> >(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 24000 KHz 
> >(XEN) GICv2 initialization: 
> >(XEN) gic_dist_addr=01c81000 
> >(XEN) gic_cpu_addr=01c82000 
> >(XEN) gic_hyp_addr=01c84000 
> >(XEN) gic_vcpu_addr=01c86000 
> >(XEN) gic_maintenance_irq=25 
> >(XEN) GICv2: 224 lines, 8 cpus, secure (IID 0200143b). 
> >(XEN) Using scheduler: SMP Credit Scheduler (credit) 
> >(XEN) Allocated console ring of 64 KiB. 
> >(XEN) VFP implementer 0x41 architecture 2 part 0x30 variant 0x7 rev 0x5 
> >(XEN) Bringing up CPU1- HERE IT HANGS - 
>
> I think you just met the bug we mentioned in this thread. 
> With this patchset applied a Linux kernel will also hang 
> here without ugly hack. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [RFC PATCH 8/8] sunxi: enable PSCI for A83T SoC

2018-03-26 Thread Mr . Fülöp
Thanks! I will try it out and let you know the result!

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.