From: Peter Maydell <peter.maydell@linaro.org>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: "Alexander Graf" <agraf@suse.de>,
"Mian M. Hamayun" <m.hamayun@virtualopensystems.com>,
"Patch Tracking" <patches@linaro.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
"Andreas Färber" <afaerber@suse.de>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Subject: Re: [Qemu-devel] [PATCH 5/7] hw/arm/boot: Allow easier swapping in of different loader code
Date: Fri, 13 Dec 2013 10:05:47 +0000 [thread overview]
Message-ID: <CAFEAcA8Ep3LTC=wMOXxGf3mb2a92WB46GC9QhCT_eT43a6Qiag@mail.gmail.com> (raw)
In-Reply-To: <CAEgOgz4tnRJnUaa4nRF_2iO2dKx7EXXpQ-nGxJeeqr+SfVe7GQ@mail.gmail.com>
On 13 December 2013 03:19, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> Why do we need blobs at all? Cant we just fix arm/boot to directly
> setup the CPU state to the desired? Rather than complex blobs that
> execute ARM instructions just manipulate the regs directly.
We could in theory do this for the primary bootloader, but
the secondary CPU blob has to have a loop in it so we
can sit around waiting for the guest code running in the
primary to tell us it's time to go:
>> +static const ARMInsnFixup smpboot[] = {
>> + { 0xe59f2028 }, /* ldr r2, gic_cpu_if */
>> + { 0xe59f0028 }, /* ldr r0, startaddr */
>> + { 0xe3a01001 }, /* mov r1, #1 */
>> + { 0xe5821000 }, /* str r1, [r2] - set GICC_CTLR.Enable */
>> + { 0xe3a010ff }, /* mov r1, #0xff */
>> + { 0xe5821004 }, /* str r1, [r2, 4] - set GIC_PMR.Priority to 0xff */
>> + { 0, FIXUP_DSB }, /* dsb */
>> + { 0xe320f003 }, /* wfi */
>> + { 0xe5901000 }, /* ldr r1, [r0] */
>> + { 0xe1110001 }, /* tst r1, r1 */
>> + { 0x0afffffb }, /* beq <wfi> */
>> + { 0xe12fff11 }, /* bx r1 */
>> + { 0, FIXUP_GIC_CPU_IF },
>> + { 0, FIXUP_BOOTREG },
>> + { 0, FIXUP_TERMINATOR }
>> };
We're also writing to devices here, and it's cleaner to do that
by running a guest code instruction than by somehow having
the boot code ferret around inside the device's implementation
pre-start, I think.
thanks
-- PMM
next prev parent reply other threads:[~2013-12-13 10:06 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 13:33 [Qemu-devel] [PATCH 0/7] target-arm: Support AArch64 KVM Peter Maydell
2013-11-28 13:33 ` [Qemu-devel] [PATCH 1/7] target-arm/kvm: Split 32 bit only code into its own file Peter Maydell
2013-12-16 23:39 ` Christoffer Dall
2013-11-28 13:33 ` [Qemu-devel] [PATCH 2/7] target-arm: Clean up handling of AArch64 PSTATE Peter Maydell
2013-12-16 23:39 ` Christoffer Dall
2013-12-17 0:15 ` Peter Maydell
2013-12-17 4:45 ` Christoffer Dall
2013-12-17 11:42 ` Peter Maydell
2013-12-17 18:44 ` Christoffer Dall
2013-11-28 13:33 ` [Qemu-devel] [PATCH 3/7] target-arm: Add minimal KVM AArch64 support Peter Maydell
2013-12-16 23:39 ` Christoffer Dall
2013-12-17 0:21 ` Peter Maydell
2013-12-17 4:46 ` Christoffer Dall
2013-11-28 13:33 ` [Qemu-devel] [PATCH 4/7] configure: Enable KVM for aarch64 host/target combination Peter Maydell
2013-12-16 23:40 ` Christoffer Dall
2013-11-28 13:33 ` [Qemu-devel] [PATCH 5/7] hw/arm/boot: Allow easier swapping in of different loader code Peter Maydell
2013-12-13 3:19 ` Peter Crosthwaite
2013-12-13 10:05 ` Peter Maydell [this message]
2013-12-17 0:52 ` Peter Crosthwaite
2013-12-17 0:58 ` Peter Maydell
2013-12-17 1:24 ` Peter Crosthwaite
2013-12-17 4:56 ` Christoffer Dall
2013-12-17 10:31 ` Peter Maydell
2013-12-17 11:36 ` Peter Crosthwaite
2013-12-17 11:47 ` Peter Maydell
2013-12-17 12:02 ` Peter Crosthwaite
2013-12-16 23:40 ` Christoffer Dall
2013-12-17 0:23 ` Peter Maydell
2013-11-28 13:33 ` [Qemu-devel] [PATCH 6/7] hw/arm/boot: Add boot support for AArch64 processor Peter Maydell
2013-12-16 23:40 ` Christoffer Dall
2013-12-17 0:25 ` Peter Maydell
2013-12-17 4:50 ` Christoffer Dall
2013-11-28 13:33 ` [Qemu-devel] [PATCH 7/7] default-configs: Add config for aarch64-softmmu Peter Maydell
2013-12-16 23:40 ` Christoffer Dall
2013-12-17 0:27 ` Peter Maydell
2013-12-17 13:33 ` Christopher Covington
2013-12-05 15:23 ` [Qemu-devel] [PATCH 0/7] target-arm: Support AArch64 KVM Peter Maydell
2013-12-12 16:41 ` Peter Maydell
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='CAFEAcA8Ep3LTC=wMOXxGf3mb2a92WB46GC9QhCT_eT43a6Qiag@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=m.hamayun@virtualopensystems.com \
--cc=patches@linaro.org \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.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).