From: Tim Deegan <tim@xen.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: julien.grall@linaro.org, stefano.stabellini@eu.citrix.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH v2 6/9] xen: arm: rewrite start of day page table and cpu bring up
Date: Thu, 26 Sep 2013 15:31:45 +0100 [thread overview]
Message-ID: <20130926143145.GJ54428@ocelot.phlegethon.org> (raw)
In-Reply-To: <1380200362.29483.81.camel@kazak.uk.xensource.com>
At 13:59 +0100 on 26 Sep (1380203962), Ian Campbell wrote:
> From cd92dd41a1bb8de3cf145f90f89e645a5c9049bf Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ian.campbell@citrix.com>
> Date: Thu, 29 Aug 2013 16:25:00 +0100
> Subject: [PATCH] xen: arm: rewrite start of day page table and cpu bring up
>
> This is unfortunately a rather large monolithic patch.
>
> Rather than bringing up all CPUs in lockstep as we setup paging and relocate
> Xen instead create a simplified set of dedicated boot time pagetables.
>
> This allows secondary CPUs to remain powered down or in the firmware until we
> actually want to enable them. The bringup is now done later on in C and can be
> driven by DT etc. I have included code for the vexpress platform, but other
> platforms will need to be added.
>
> The mechanism for deciding how to bring up a CPU differs between arm32 and
> arm64. On arm32 it is essentially a per-platform property, with the exception
> of PSCI which can be implemented globally (but isn't here). On arm64 there is a
> per-cpu property in the device tree.
>
> Secondary CPUs are brought up directly into the relocated Xen image, instead of
> relying on being able to launch on the unrelocated Xen and hoping that it
> hasn't been clobbered.
>
> As part of this change drop support for switching from secure mode to NS HYP as
> well as the early CPU kick. Xen now requires that it is launched in NS HYP
> mode and that firmware configure things such that secondary CPUs can be woken
> up by a primarly CPU in HYP mode. This may require fixes to bootloaders or the
> use of a boot wrapper.
>
> The changes done here (re)exposed an issue with relocating Xen and the compiler
> spilling values to the stack between the copy and the actual switch to the
> relocaed copy of Xen in setup_pagetables. Therefore switch to doing the copy
> and switch in a single asm function where we can control precisely what gets
> spilled to the stack etc.
>
> Since we now have a separate set of boot pagetables it is much easier to build
> the real Xen pagetables inplace before relocating rather than the more complex
> approach of rewriting the pagetables in the relocated copy before switching.
>
> This will also enable Xen to be loaded above the 4GB boundary on 64-bit.
>
> Still TODO:
> - integrate with Julien's "Dissociate logical and hardware CPU ID"
> - cpu initialisation for other platforms
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
next prev parent reply other threads:[~2013-09-26 14:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 10:48 [PATCH v2 0/9] xen: arm: rework early bring up Ian Campbell
2013-09-26 10:49 ` [PATCH v2 1/9] xen: arm: Load xen under 4GB on 32-bit Ian Campbell
2013-09-26 10:49 ` [PATCH v2 2/9] xen: arm: Log the raw MIDR on boot Ian Campbell
2013-09-26 10:49 ` [PATCH v2 3/9] xen: arm: make sure we stay within the memory bank during mm setup Ian Campbell
2013-09-26 11:14 ` Julien Grall
2013-09-26 13:17 ` Tim Deegan
2013-09-26 10:49 ` [PATCH v2 4/9] xen: arm: add two new device tree helpers Ian Campbell
2013-09-26 10:49 ` [PATCH v2 5/9] xen: arm: implement arch/platform SMP and CPU initialisation framework Ian Campbell
2013-09-26 13:47 ` Tim Deegan
2013-09-26 14:06 ` Julien Grall
2013-09-26 14:12 ` Ian Campbell
2013-09-26 10:49 ` [PATCH v2 6/9] xen: arm: rewrite start of day page table and cpu bring up Ian Campbell
2013-09-26 12:59 ` Ian Campbell
2013-09-26 14:31 ` Tim Deegan [this message]
2013-09-26 10:49 ` [PATCH v2 7/9] xen: arm: use symbolic names for MPIDR bits Ian Campbell
2013-09-26 13:22 ` Tim Deegan
2013-09-26 13:35 ` Ian Campbell
2013-09-26 13:45 ` Tim Deegan
2013-09-26 10:49 ` [PATCH v2 8/9] xen: arm: configure TCR_EL2 for 40 bit physical address space Ian Campbell
2013-09-26 10:49 ` [PATCH v2 9/9] xen: arm: split cpu0's domheap mapping PTs out from xen_second Ian Campbell
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=20130926143145.GJ54428@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=Ian.Campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).