From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
"Andreas Färber" <afaerber@suse.de>,
"Paul Brook" <paul@codesourcery.com>
Subject: Re: [Qemu-devel] ARM bootloader boot blobbing.
Date: Wed, 26 Sep 2012 23:52:10 +0200 [thread overview]
Message-ID: <20120926215210.GA1604@zapo> (raw)
In-Reply-To: <CAEgOgz4F82hSx993vQYvBWte5jwUBGVgZjj8qKOOEu_S9zjX+g@mail.gmail.com>
On Wed, Sep 26, 2012 at 04:27:57PM +1000, Peter Crosthwaite wrote:
> Hi All,
>
> Can anyone think of a reason why the arm primary bootloader cant be
> done by just direct interaction with the CPU? Currently we have this
> ...
>
> /* The worlds second smallest bootloader. Set r0-r2, then jump to kernel. */
> static uint32_t bootloader[] = {
> 0xe3a00000, /* mov r0, #0 */
> 0xe59f1004, /* ldr r1, [pc, #4] */
> 0xe59f2004, /* ldr r2, [pc, #4] */
> 0xe59ff004, /* ldr pc, [pc, #4] */
> 0, /* Board ID */
> 0, /* Address of kernel args. Set by integratorcp_init. */
> 0 /* Kernel entry point. Set by integratorcp_init. */
> };
>
> ... which gets injected into RAM then we set the PC to this blob and
> go. But couldnt we just set R0-2 directly from the bootloader and just
> straight to the kernel entry point? Why do we have to blob in a
> lightweight bootloader?
Hi Peter,
I can't speak for this specific case but I've used similar approaches
for other boards when needing more realistic emulation, e.g if emulating
possible boot loaders in rom and supporting warm jumps back to the rom etc.
Cheers
next prev parent reply other threads:[~2012-09-26 21:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 6:27 [Qemu-devel] ARM bootloader boot blobbing Peter Crosthwaite
2012-09-26 21:52 ` Edgar E. Iglesias [this message]
2012-09-27 1:14 ` Peter Crosthwaite
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=20120926215210.GA1604@zapo \
--to=edgar.iglesias@gmail.com \
--cc=afaerber@suse.de \
--cc=paul@codesourcery.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.