From: Dave P Martin <Dave.Martin@arm.com>
To: Roy Franz <roy.franz@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matt.fleming@intel.com" <matt.fleming@intel.com>,
Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH 6/7] Add EFI stub for ARM
Date: Tue, 6 Aug 2013 11:40:24 +0100 [thread overview]
Message-ID: <20130806104023.GE2791@e103592.cambridge.arm.com> (raw)
In-Reply-To: <CAFECyb-WciwMu0MBmZ8LzkaM=VxnaOH5e9V5f_AP3ZbLA9CW9A@mail.gmail.com>
On Tue, Aug 06, 2013 at 01:06:17AM +0100, Roy Franz wrote:
> On Mon, Aug 5, 2013 at 8:33 AM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > On Mon, Aug 05, 2013 at 03:11:49PM +0100, Dave Martin wrote:
> >> > diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
> >> > index 75189f1..4c70b9e 100644
> >> > --- a/arch/arm/boot/compressed/head.S
> >> > +++ b/arch/arm/boot/compressed/head.S
> >> > @@ -122,19 +122,106 @@
> >> > .arm @ Always enter in ARM state
> >> > start:
> >> > .type start,#function
> >> > - .rept 7
> >> > +#ifdef CONFIG_EFI_STUB
> >> > + @ Magic MSDOS signature for PE/COFF + ADD opcode
> >> > + .word 0x62805a4d
Is BE8 supported? If so, this would put the bytes
62 80 5A 4D
in the binary, which is not the right magic.
For this magic, you could use .byte instead.
To help future maintainers, I suggest noting in a comment that
executing through this magic relies on little-endian instruction byte
order (so, LE or BE8), and the ARM instruction set.
What about the endianness of the other PE/COFF header fields? Are they
always little-endian, or are some fields native-endian (and if so, how
is the endianness of the header determined by the loader)?
> >>
> >> What about BE32?
> >
> > The ARM bindings for UEFI specify that the processor must be in
> > little-endian mode.
> >
> >> In that case, the instruction is a coprocessor load, that loads from a
> >> random address to a coprocessor that almost certainly doesn't exist.
> >> This will probably fault.
> >>
> >> Since BE32 is only for older platforms (<v6) and this is not easily
> >> solvable, it might be sensible to make the EFI stub support depend on
> >> !CPU_ENDIAN_BE32.
> >
> > Well, it would make more sense to make EFI_STUB depend on EFI and
> > EFI depend on !CPU_ENDIAN_BE32. Which is something I can add to
> > my next set of general ARM UEFI patches. Thanks.
> > /
> > Leif
>
> I had EFI_STUB depend on EFI at one point during my development, but took
> it out because there was no actual dependency (the stub will work fine without
> other EFI features.) The features will most likely be used together,
> but I wasn't
> sure if we would want to enforce this with a config dependency. I
> don't care one
> way or the other, I'd just like the dependencies to be correct and
> follow best practices.
I guess it's up to you, so long as the constraint is expressed in Kconfig
somehow.
Cheers
---Dave
next prev parent reply other threads:[~2013-08-06 10:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 21:29 [PATCH 0/7] RFC: " Roy Franz
2013-08-02 21:29 ` [PATCH 1/7] EFI stub documentation updates Roy Franz
2013-08-05 14:12 ` Dave Martin
2013-08-05 23:56 ` Roy Franz
2013-08-06 10:30 ` Dave P Martin
2013-08-02 21:29 ` [PATCH 2/7] Move common EFI stub code from x86 arch code to common location Roy Franz
2013-08-06 13:53 ` Matt Fleming
2013-08-02 21:29 ` [PATCH 3/7] Change EFI helper APIs to be more flexible Roy Franz
2013-08-06 13:53 ` Matt Fleming
2013-08-02 21:29 ` [PATCH 4/7] Add proper definitions for some EFI function pointers Roy Franz
2013-08-06 13:19 ` Matt Fleming
2013-08-02 21:29 ` [PATCH 5/7] Add strstr to compressed string.c for ARM Roy Franz
2013-08-02 21:29 ` [PATCH 6/7] Add EFI stub " Roy Franz
2013-08-05 14:11 ` Dave Martin
2013-08-05 15:33 ` Leif Lindholm
2013-08-06 0:06 ` Roy Franz
2013-08-06 10:40 ` Dave P Martin [this message]
2013-08-06 10:31 ` Dave P Martin
2013-08-06 3:35 ` Roy Franz
2013-08-02 21:29 ` [PATCH 7/7] Add config EFI_STUB " Roy Franz
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=20130806104023.GE2791@e103592.cambridge.arm.com \
--to=dave.martin@arm.com \
--cc=leif.lindholm@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=matt.fleming@intel.com \
--cc=roy.franz@linaro.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
all inboxes | Powered by JetHome®