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

Re: [Xen-devel] bootwrapper can't be compiled for cubieboard2



On 08/30/2013 10:06 AM, Ian Campbell wrote:
On Fri, 2013-08-30 at 15:12 +0800, Josh Zhao wrote:
Hi Ian,
I try compile the bootwrapper for cubieboard2 like this:

Hi Josh,

cubieboards2 support is not really in place yet, so I'm afraid there
will currently be rough edges like this.

That said I think this worked for me, but based on the discussions I
think the better approach is to merge Andre's u-boot patches to support
entry in HYP mode into the cubieboard branch. I'll only work on
bootwrapper any further if some interesting platform comes along for
which there is no possibility of updating the bootloader, so for now you
should consider it dead/dormant.

Anyhow, I've tried inserting Andre's patches into the cubieboard2 uboot
and stumbled across a problem -- it turns out that u-boot has enabled
the MMU (SCTLR.M), apparently because it is required for the caches to
be on (see arch/arm/lib/cache-cp15.c:cache_enable). unfortunately SCTLR
is banked so when nonsec-virt.S:_secure_monitor enabled SCR.NS
everything falls apart. Naïvely enabling SCTLR.M while in monitor mode
didn't seem to help.

Ah, good point. My whole code approach was relying on the fact that u-boot runs with MMU _off_. With the MMU differences in HYP mode we may run into troubles here, it may work if we switch late enough, though.

Calling cleanup_before_linux() early in armv7_switch_nonsec() seemed to
do the job -- Andre, do you think that is the right fix?

Do you have a pointer to a u-boot repository with the cubieboard patches? Then I'd take a look.

Not sure why this didn't affect vexpress etc -- perhaps caches aren't
enabled for that platform?

AFAIK it's rather normal for u-boot to run with at least some caches off. These only get turned on if really necessary. So I'd refrain from enabling the MMU just to support some cache levels on a bootloader.

Thanks for looking at this!
Andre.

Even with this fixed things don't quite work for me, I don't quite
remember how/why (I last looked at this 7 days ago). I've been trying to
set aside Friday as "cubieboard hacking day", but I've ended up with a
bunch of meetings today, hopefully I'll still manage to investigate a
bit.

Ian.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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