All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Salter <msalter@redhat.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"patches@linaro.org" <patches@linaro.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Will Deacon <Will.Deacon@arm.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"matt.fleming@intel.com" <matt.fleming@intel.com>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	"roy.franz@linaro.org" <roy.franz@linaro.org>
Subject: Re: [PATCH 1/3] arm64: add EFI stub
Date: Fri, 06 Dec 2013 08:34:30 -0500	[thread overview]
Message-ID: <1386336870.1861.155.camel@deneb.redhat.com> (raw)
In-Reply-To: <20131206122511.301D6C40757@trevor.secretlab.ca>

On Fri, 2013-12-06 at 12:25 +0000, Grant Likely wrote:
> On Thu, 5 Dec 2013 15:28:06 +0000, Catalin Marinas <catalin.marinas@arm.com> wrote:
> > On Thu, Dec 05, 2013 at 02:43:23PM +0000, Mark Salter wrote:
> > > On Thu, 2013-12-05 at 14:18 +0000, Catalin Marinas wrote:
> > > > On Fri, Nov 29, 2013 at 10:05:10PM +0000, Mark Salter wrote:
> > > > > This patch adds PE/COFF header fields to the start of the Image
> > > > > so that it appears as an EFI application to EFI firmware. An EFI
> > > > > stub is included to allow direct booting of the kernel Image. Due
> > > > > to EFI firmware limitations, only little endian kernels with 4K
> > > > > page sizes are supported at this time.
> > > > 
> > > > I don't fully understand the EFI firmware limitations but for big endian
> > > > we could have the EFI_STUB wrapper in little endian and get the kernel
> > > > to switch to big endian once booted. The image header should always be
> > > > little endian.
> > > 
> > > That would be fun. :) You'd also have to switch back and forth to make
> > > EFI runtime services calls.
> > 
> > OK, we'll have to live with this restriction.
> 
> Or just disable runtime services on the switch to big ending. Big endian
> should not disable the stub (but getting it to work could be a follow-up
> patch)
> 
The other problem with BE is that the PE/COFF masquerading is built into
head.S so the same Image can be used for EFI and non-EFI. I don't see
a BE opcode which we could us to provide the magic "MZ" at the start
of a BE kernel Image.

--Mark

WARNING: multiple messages have this Message-ID (diff)
From: msalter@redhat.com (Mark Salter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] arm64: add EFI stub
Date: Fri, 06 Dec 2013 08:34:30 -0500	[thread overview]
Message-ID: <1386336870.1861.155.camel@deneb.redhat.com> (raw)
In-Reply-To: <20131206122511.301D6C40757@trevor.secretlab.ca>

On Fri, 2013-12-06 at 12:25 +0000, Grant Likely wrote:
> On Thu, 5 Dec 2013 15:28:06 +0000, Catalin Marinas <catalin.marinas@arm.com> wrote:
> > On Thu, Dec 05, 2013 at 02:43:23PM +0000, Mark Salter wrote:
> > > On Thu, 2013-12-05 at 14:18 +0000, Catalin Marinas wrote:
> > > > On Fri, Nov 29, 2013 at 10:05:10PM +0000, Mark Salter wrote:
> > > > > This patch adds PE/COFF header fields to the start of the Image
> > > > > so that it appears as an EFI application to EFI firmware. An EFI
> > > > > stub is included to allow direct booting of the kernel Image. Due
> > > > > to EFI firmware limitations, only little endian kernels with 4K
> > > > > page sizes are supported at this time.
> > > > 
> > > > I don't fully understand the EFI firmware limitations but for big endian
> > > > we could have the EFI_STUB wrapper in little endian and get the kernel
> > > > to switch to big endian once booted. The image header should always be
> > > > little endian.
> > > 
> > > That would be fun. :) You'd also have to switch back and forth to make
> > > EFI runtime services calls.
> > 
> > OK, we'll have to live with this restriction.
> 
> Or just disable runtime services on the switch to big ending. Big endian
> should not disable the stub (but getting it to work could be a follow-up
> patch)
> 
The other problem with BE is that the PE/COFF masquerading is built into
head.S so the same Image can be used for EFI and non-EFI. I don't see
a BE opcode which we could us to provide the magic "MZ" at the start
of a BE kernel Image.

--Mark

  reply	other threads:[~2013-12-06 13:34 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 22:05 [PATCH 0/3] arm64: Add EFI stub and runtime services support Mark Salter
2013-11-29 22:05 ` Mark Salter
     [not found] ` < 1385762712-17043-2-git-send-email-msalter@redhat.com>
2013-11-29 22:05 ` [PATCH 1/3] arm64: add EFI stub Mark Salter
2013-11-29 22:05   ` Mark Salter
2013-12-03 18:38   ` Will Deacon
2013-12-03 18:38     ` Will Deacon
2013-12-03 18:38     ` Will Deacon
2013-12-03 19:31     ` Roy Franz
2013-12-03 19:31       ` Roy Franz
     [not found]     ` <20131203183844.GA22668-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2013-12-03 19:31       ` Mark Salter
2013-12-03 19:31         ` Mark Salter
2013-12-03 19:31         ` Mark Salter
2013-12-05 14:18   ` Catalin Marinas
2013-12-05 14:18     ` Catalin Marinas
2013-12-05 14:18     ` Catalin Marinas
     [not found]     ` <20131205141853.GA974-rtzwXk+D4rEjOxct69p1ducL+3YJyIBv@public.gmane.org>
2013-12-05 14:43       ` Mark Salter
2013-12-05 14:43         ` Mark Salter
2013-12-05 14:43         ` Mark Salter
     [not found]         ` <1386254603.1861.120.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2013-12-05 15:28           ` Catalin Marinas
2013-12-05 15:28             ` Catalin Marinas
2013-12-05 15:28             ` Catalin Marinas
     [not found]         ` < 20131205152806.GC974@darko.cambridge.arm.com>
     [not found]           ` <20131205152806.GC974-rtzwXk+D4rEjOxct69p1ducL+3YJyIBv@public.gmane.org>
2013-12-06 12:25             ` Grant Likely
2013-12-06 12:25               ` Grant Likely
2013-12-06 12:25               ` Grant Likely
2013-12-06 13:34               ` Mark Salter [this message]
2013-12-06 13:34                 ` Mark Salter
2013-12-06 13:38                 ` Leif Lindholm
2013-12-06 13:38                   ` Leif Lindholm
2013-12-06 13:38                   ` Leif Lindholm
2013-12-06 13:51                   ` Mark Salter
2013-12-06 13:51                     ` Mark Salter
2013-12-06 13:51                     ` Mark Salter
2013-12-06 14:55       ` Mark Salter
2013-12-06 14:55         ` Mark Salter
2013-12-06 14:55         ` Mark Salter
2013-12-16 15:46         ` Catalin Marinas
2013-12-16 15:46           ` Catalin Marinas
2013-12-06 12:12   ` Grant Likely
2013-12-06 12:12     ` Grant Likely
2013-12-06 12:12     ` Grant Likely
     [not found] ` <1385762712-17043-1-git-send-email-msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-11-29 22:05   ` [PATCH 2/3] doc: arm64: add description of EFI stub support Mark Salter
2013-11-29 22:05     ` Mark Salter
2013-11-29 22:05     ` Mark Salter
2013-11-29 22:05 ` [PATCH 3/3] arm64: add EFI runtime services Mark Salter
2013-11-29 22:05   ` Mark Salter
     [not found]   ` <1385762712-17043-4-git-send-email-msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-05 15:25     ` Catalin Marinas
2013-12-05 15:25       ` Catalin Marinas
2013-12-05 15:25       ` Catalin Marinas
     [not found]       ` <20131205152510.GB974-rtzwXk+D4rEjOxct69p1ducL+3YJyIBv@public.gmane.org>
2013-12-05 15:52         ` Mark Salter
2013-12-05 15:52           ` Mark Salter
2013-12-05 15:52           ` Mark Salter
     [not found]           ` <1386258761.1861.137.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2013-12-05 15:59             ` Catalin Marinas
2013-12-05 15:59               ` Catalin Marinas
2013-12-05 15:59               ` Catalin Marinas
2013-12-06 14:34         ` Mark Salter
2013-12-06 14:34           ` Mark Salter
2013-12-06 14:34           ` Mark Salter
2013-12-09 13:52     ` Leif Lindholm
2013-12-09 13:52       ` Leif Lindholm
2013-12-09 13:52       ` Leif Lindholm
     [not found]       ` <20131209135158.GH24997-GZEopFhza0F985/tl1ce8aaDwS/vmuI7@public.gmane.org>
2013-12-10 17:58         ` Mark Salter
2013-12-10 17:58           ` Mark Salter
2013-12-10 17:58           ` Mark Salter
     [not found] ` < 1385762712-17043-3-git-send-email-msalter@redhat.com>
     [not found]   ` <1385762712-17043-3-git-send-email-msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-05 12:53     ` [PATCH 2/3] doc: arm64: add description of EFI stub support Grant Likely
2013-12-05 12:53       ` Grant Likely
2013-12-05 12:53       ` Grant Likely

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=1386336870.1861.155.camel@deneb.redhat.com \
    --to=msalter@redhat.com \
    --cc=Will.Deacon@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=grant.likely@secretlab.ca \
    --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=matt.fleming@intel.com \
    --cc=patches@linaro.org \
    --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 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.