qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: edgar.iglesias@gmail.com, qemu-devel@nongnu.org,
	john.williams@petalogix.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given
Date: Fri, 22 Jun 2012 23:54:28 +1000	[thread overview]
Message-ID: <CAEgOgz7n+zsZZ2Z-KySq6pXNPNeY4v8hj9JFc6_oDaKCwUmZDw@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-_joGfDKrOcEOqJiq9kREgnNxa23qi6gppzBOnPZsz4A@mail.gmail.com>

On Fri, Jun 22, 2012 at 11:36 PM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 22 June 2012 14:27, Peter Crosthwaite
> <peter.crosthwaite@petalogix.com> wrote:
>> Ping!
>>
>> Any thoughts Peter?
>
> Still sounds too specific to your odd use case and hardware to me.
>
> I'd accept some reasonable way of saying "this ELF file is a Linux kernel",
> but magically doing it if you also said -dtb isn't it. I also care about
> backcompat with previous command lines and with being consistent about
> how -kernel works across architectures where possible.

Speaking of other archs, microblaze will accept -dtb with an elf and
implement the r2=foo style behviour before loading the elf entry. A
provocative thought, how bout always using a Linux style bootloader no
matter what? Does it really matter if your elf is bootstrapped by half
a dozen instructions?

Further to that, can we get rid of the bootloader blob altogether and
just setup the cpu->env like other architectures do?

  23 /* The worlds second smallest bootloader.  Set r0-r2, then jump
to kernel.  */
  24 static uint32_t bootloader[] = {
  25   0xe3a00000, /* mov     r0, #0 */
  26   0xe59f1004, /* ldr     r1, [pc, #4] */
  27   0xe59f2004, /* ldr     r2, [pc, #4] */
  28   0xe59ff004, /* ldr     pc, [pc, #4] */
  29   0, /* Board ID */
  30   0, /* Address of kernel args.  Set by integratorcp_init.  */
  31   0  /* Kernel entry point.  Set by integratorcp_init.  */
  32 };

All this code does is set registers and an entry point, which several
bootloaders do just though cpu->env manipulation.

> a somewhat contradictory set of requirements.)
>
> -- PMM

  parent reply	other threads:[~2012-06-22 13:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-18  1:35 [Qemu-devel] [PATCH v2 0/2] These two patches add some flexibilities to the arm bootloader Peter A. G. Crosthwaite
2012-06-18  1:35 ` [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given Peter A. G. Crosthwaite
2012-06-19 13:06   ` Peter Maydell
2012-06-20  1:45     ` Peter Crosthwaite
2012-06-22 13:27       ` Peter Crosthwaite
2012-06-22 13:36         ` Peter Maydell
2012-06-22 13:43           ` Peter Crosthwaite
2012-06-22 13:54           ` Peter Crosthwaite [this message]
2012-06-18  1:35 ` [Qemu-devel] [PATCH v2 2/2] arm_boot: Conditionalised DTB command line update Peter A. G. Crosthwaite
2012-06-19 13:08   ` 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=CAEgOgz7n+zsZZ2Z-KySq6pXNPNeY4v8hj9JFc6_oDaKCwUmZDw@mail.gmail.com \
    --to=peter.crosthwaite@petalogix.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=john.williams@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 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).