All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] EFI/arm64 updates
@ 2014-10-02  1:11 Roy Franz
  2014-10-02  1:11 ` [RFC PATCH 1/2] EFI: Update documentation for arm64 Roy Franz
  2014-10-02  1:11 ` [RFC PATCH 2/2] arm64: Create xen.efi binary " Roy Franz
  0 siblings, 2 replies; 9+ messages in thread
From: Roy Franz @ 2014-10-02  1:11 UTC (permalink / raw)
  To: xen-devel, ian.campbell, stefano.stabellini, tim, jbeulich, keir
  Cc: Roy Franz, fu.wei

I overlooked updating the EFI configuration file documentation in my patchset
adding EFI boot support.  While reviewing the documentation, I realized that
the 'install' target was broken for arm64, as there is no separate xen.efi
binary created.
I have a proposed documentation update, as well as some minor Makefile updates
that add support for the 'install' target for the arm64 EFI binary.  I'm not
sure if the '/usr/lib64/efi' is the correct path for arm64 (maybe just /usr/lib
in this case?)


Roy Franz (2):
  EFI: Update documentation for arm64
  arm64: Create xen.efi binary for arm64

 config/arm64.mk        |  2 ++
 docs/misc/efi.markdown | 30 ++++++++++++++++++++++++------
 xen/arch/arm/Makefile  |  4 ++++
 3 files changed, 30 insertions(+), 6 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [RFC PATCH 1/2] EFI: Update documentation for arm64
  2014-10-02  1:11 [RFC PATCH 0/2] EFI/arm64 updates Roy Franz
@ 2014-10-02  1:11 ` Roy Franz
  2014-10-02  8:34   ` Jan Beulich
  2014-10-02  1:11 ` [RFC PATCH 2/2] arm64: Create xen.efi binary " Roy Franz
  1 sibling, 1 reply; 9+ messages in thread
From: Roy Franz @ 2014-10-02  1:11 UTC (permalink / raw)
  To: xen-devel, ian.campbell, stefano.stabellini, tim, jbeulich, keir
  Cc: Roy Franz, fu.wei

The arm64 EFI boot support added a new 'dtb' value to the configuration file.
Update the documentation to describe this and how the coniguration file is not
used when GRUB loads the modules. Updates 'ucode' description to indicate that
it is x86 only.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
---
 docs/misc/efi.markdown | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/docs/misc/efi.markdown b/docs/misc/efi.markdown
index 19b987a..ad8da93 100644
--- a/docs/misc/efi.markdown
+++ b/docs/misc/efi.markdown
@@ -1,8 +1,19 @@
-Building xen.efi requires gcc 4.5.x or above (4.6.x or newer recommended, as
-4.5.x was probably never really tested for this purpose) and binutils 2.22 or
-newer. Additionally, the binutils build must be configured to include support
-for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
-of equivalent effect should be passed to the configure script).
+For x86, building xen.efi requires gcc 4.5.x or above (4.6.x or newer
+recommended, as 4.5.x was probably never really tested for this purpose) and
+binutils 2.22 or newer.  Additionally, the binutils build must be configured to
+include support for the x86_64-pep emulation (i.e.
+`--enable-targets=x86_64-pep` or an option of equivalent effect should be
+passed to the configure script).
+
+For arm64, the PE/COFF header is open-coded in assembly, so no toolchain
+support for PE/COFF is required.  Also, the PE/COFF header co-exists with the
+normal Image format, so a single binary may be booted as an Image file or as an
+EFI application.  When booted as an EFI application, Xen requires a
+configuration file as described below unless a bootloader, such as GRUB, has
+loaded the modules and describes them in the device tree provided to Xen.  If a
+bootloader provides a device tree containing modules then any configuration
+files are ignored, and the bootloader is responsible for populating all
+relevant device tree nodes.
 
 Once built, `make install-xen` will place the resulting binary directly into
 the EFI boot partition, provided `EFI_VENDOR` is set in the environment (and
@@ -73,7 +84,14 @@ Specifies an XSM module to load.
 
 ###`ucode=<filename>`
 
-Specifies a CPU microcode blob to load.
+Specifies a CPU microcode blob to load. (x86 only)
+
+###`dtb=<filename>`
+
+Specifies a device tree file to load.  The platform firmware may provide a
+DTB in an EFI configuration table, so this field is optional in that
+case. A dtb specified in the configuration file will override a device tree
+provided in the EFI configuration table. (ARM only)
 
 ###`chain=<filename>`
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC PATCH 2/2] arm64: Create xen.efi binary for arm64
  2014-10-02  1:11 [RFC PATCH 0/2] EFI/arm64 updates Roy Franz
  2014-10-02  1:11 ` [RFC PATCH 1/2] EFI: Update documentation for arm64 Roy Franz
@ 2014-10-02  1:11 ` Roy Franz
  2014-10-02 13:03   ` Ian Campbell
  1 sibling, 1 reply; 9+ messages in thread
From: Roy Franz @ 2014-10-02  1:11 UTC (permalink / raw)
  To: xen-devel, ian.campbell, stefano.stabellini, tim, jbeulich, keir
  Cc: Roy Franz, fu.wei

The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
copy it to xen.efi so that the 'make install' processing is shared with
x86. Prior to this 'make install' was broken on arm64.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
---
 config/arm64.mk       | 2 ++
 xen/arch/arm/Makefile | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/config/arm64.mk b/config/arm64.mk
index 4e57b3a..6eafda2 100644
--- a/config/arm64.mk
+++ b/config/arm64.mk
@@ -15,3 +15,5 @@ LDFLAGS_DIRECT += -EL
 CONFIG_LOAD_ADDRESS ?= 0x80000000
 
 IOEMU_CPU_ARCH ?= aarch64
+
+EFI_DIR ?= /usr/lib64/efi
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index f330302..9a25290 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -49,6 +49,9 @@ ALL_OBJS := $(TARGET_SUBARCH)/head.o $(ALL_OBJS)
 
 $(TARGET): $(TARGET)-syms $(TARGET).axf
 	$(OBJCOPY) -O binary -S $< $@
+ifeq (arm64,$(XEN_TARGET_ARCH))
+	ln -sf $(notdir $@)  ../../$(notdir $@).efi
+endif
 
 $(TARGET).axf: $(TARGET)-syms
 	# XXX: VE model loads by VMA so instead of
@@ -100,3 +103,4 @@ clean::
 	rm -f asm-offsets.s xen.lds
 	rm -f $(BASEDIR)/.xen-syms.[0-9]*
 	rm -f $(TARGET).axf
+	rm -f $(TARGET).efi
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [RFC PATCH 1/2] EFI: Update documentation for arm64
  2014-10-02  1:11 ` [RFC PATCH 1/2] EFI: Update documentation for arm64 Roy Franz
@ 2014-10-02  8:34   ` Jan Beulich
  2014-10-02 14:10     ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2014-10-02  8:34 UTC (permalink / raw)
  To: Roy Franz; +Cc: keir, ian.campbell, tim, xen-devel, stefano.stabellini, fu.wei

>>> On 02.10.14 at 03:11, <roy.franz@linaro.org> wrote:
> The arm64 EFI boot support added a new 'dtb' value to the configuration file.
> Update the documentation to describe this and how the coniguration file is 
> not
> used when GRUB loads the modules. Updates 'ucode' description to indicate 
> that
> it is x86 only.
> 
> Signed-off-by: Roy Franz <roy.franz@linaro.org>

Acked-by: Jan Beulich <jbeulich@suse.com>

> ---
>  docs/misc/efi.markdown | 30 ++++++++++++++++++++++++------
>  1 file changed, 24 insertions(+), 6 deletions(-)
> 
> diff --git a/docs/misc/efi.markdown b/docs/misc/efi.markdown
> index 19b987a..ad8da93 100644
> --- a/docs/misc/efi.markdown
> +++ b/docs/misc/efi.markdown
> @@ -1,8 +1,19 @@
> -Building xen.efi requires gcc 4.5.x or above (4.6.x or newer recommended, as
> -4.5.x was probably never really tested for this purpose) and binutils 2.22 
> or
> -newer. Additionally, the binutils build must be configured to include 
> support
> -for the x86_64-pep emulation (i.e. `--enable-targets=x86_64-pep` or an option
> -of equivalent effect should be passed to the configure script).
> +For x86, building xen.efi requires gcc 4.5.x or above (4.6.x or newer
> +recommended, as 4.5.x was probably never really tested for this purpose) 
> and
> +binutils 2.22 or newer.  Additionally, the binutils build must be 
> configured to
> +include support for the x86_64-pep emulation (i.e.
> +`--enable-targets=x86_64-pep` or an option of equivalent effect should be
> +passed to the configure script).
> +
> +For arm64, the PE/COFF header is open-coded in assembly, so no toolchain
> +support for PE/COFF is required.  Also, the PE/COFF header co-exists with 
> the
> +normal Image format, so a single binary may be booted as an Image file or 
> as an
> +EFI application.  When booted as an EFI application, Xen requires a
> +configuration file as described below unless a bootloader, such as GRUB, 
> has
> +loaded the modules and describes them in the device tree provided to Xen.  
> If a
> +bootloader provides a device tree containing modules then any configuration
> +files are ignored, and the bootloader is responsible for populating all
> +relevant device tree nodes.
>  
>  Once built, `make install-xen` will place the resulting binary directly into
>  the EFI boot partition, provided `EFI_VENDOR` is set in the environment 
> (and
> @@ -73,7 +84,14 @@ Specifies an XSM module to load.
>  
>  ###`ucode=<filename>`
>  
> -Specifies a CPU microcode blob to load.
> +Specifies a CPU microcode blob to load. (x86 only)
> +
> +###`dtb=<filename>`
> +
> +Specifies a device tree file to load.  The platform firmware may provide a
> +DTB in an EFI configuration table, so this field is optional in that
> +case. A dtb specified in the configuration file will override a device tree
> +provided in the EFI configuration table. (ARM only)
>  
>  ###`chain=<filename>`
>  
> -- 
> 2.1.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC PATCH 2/2] arm64: Create xen.efi binary for arm64
  2014-10-02  1:11 ` [RFC PATCH 2/2] arm64: Create xen.efi binary " Roy Franz
@ 2014-10-02 13:03   ` Ian Campbell
  2014-10-02 13:09     ` Jan Beulich
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-10-02 13:03 UTC (permalink / raw)
  To: Roy Franz; +Cc: keir, tim, xen-devel, stefano.stabellini, jbeulich, fu.wei

On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
> copy it to xen.efi so that the 'make install' processing is shared with
> x86. Prior to this 'make install' was broken on arm64.
> 
> Signed-off-by: Roy Franz <roy.franz@linaro.org>

If the affect of this is only to install Xen (and some symlinks)
into /usr/lib64/efi and optionally into the ESP then:
        Acked-by: Ian Campbell <ian.campbell@citrix.com>
        
What I don't want is for an extra xen.efi to show up in the
regular /boot directory. I think this patch doesn't do that though.

Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
XenProject by default (i.e. installing into the ESP by default)?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC PATCH 2/2] arm64: Create xen.efi binary for arm64
  2014-10-02 13:03   ` Ian Campbell
@ 2014-10-02 13:09     ` Jan Beulich
  2014-10-02 14:08       ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2014-10-02 13:09 UTC (permalink / raw)
  To: Ian Campbell; +Cc: keir, tim, xen-devel, Roy Franz, stefano.stabellini, fu.wei

>>> On 02.10.14 at 15:03, <Ian.Campbell@citrix.com> wrote:
> On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
>> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
>> copy it to xen.efi so that the 'make install' processing is shared with
>> x86. Prior to this 'make install' was broken on arm64.
>> 
>> Signed-off-by: Roy Franz <roy.franz@linaro.org>
> 
> If the affect of this is only to install Xen (and some symlinks)
> into /usr/lib64/efi and optionally into the ESP then:
>         Acked-by: Ian Campbell <ian.campbell@citrix.com>
>         
> What I don't want is for an extra xen.efi to show up in the
> regular /boot directory. I think this patch doesn't do that though.
> 
> Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
> XenProject by default (i.e. installing into the ESP by default)?

The respective directory on the EFI partition ought to exist (and
I don't think we should be creating it). This part of the installation
being only an aid for developers anyway, I'd prefer keeping
EFI_VENDOR undefined (and hence skipping that installation step)
by default.

Jan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC PATCH 2/2] arm64: Create xen.efi binary for arm64
  2014-10-02 13:09     ` Jan Beulich
@ 2014-10-02 14:08       ` Ian Campbell
  2014-10-02 16:56         ` Roy Franz
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Campbell @ 2014-10-02 14:08 UTC (permalink / raw)
  To: Jan Beulich; +Cc: keir, tim, xen-devel, Roy Franz, stefano.stabellini, fu.wei

On Thu, 2014-10-02 at 14:09 +0100, Jan Beulich wrote:
> >>> On 02.10.14 at 15:03, <Ian.Campbell@citrix.com> wrote:
> > On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
> >> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
> >> copy it to xen.efi so that the 'make install' processing is shared with
> >> x86. Prior to this 'make install' was broken on arm64.
> >> 
> >> Signed-off-by: Roy Franz <roy.franz@linaro.org>
> > 
> > If the affect of this is only to install Xen (and some symlinks)
> > into /usr/lib64/efi and optionally into the ESP then:
> >         Acked-by: Ian Campbell <ian.campbell@citrix.com>
> >         
> > What I don't want is for an extra xen.efi to show up in the
> > regular /boot directory. I think this patch doesn't do that though.
> > 
> > Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
> > XenProject by default (i.e. installing into the ESP by default)?
> 
> The respective directory on the EFI partition ought to exist (and
> I don't think we should be creating it). This part of the installation
> being only an aid for developers anyway, I'd prefer keeping
> EFI_VENDOR undefined (and hence skipping that installation step)
> by default.

Makes sense to me, thanks.

Ian.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC PATCH 1/2] EFI: Update documentation for arm64
  2014-10-02  8:34   ` Jan Beulich
@ 2014-10-02 14:10     ` Ian Campbell
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Campbell @ 2014-10-02 14:10 UTC (permalink / raw)
  To: Jan Beulich; +Cc: keir, tim, xen-devel, Roy Franz, stefano.stabellini, fu.wei

On Thu, 2014-10-02 at 09:34 +0100, Jan Beulich wrote:
> >>> On 02.10.14 at 03:11, <roy.franz@linaro.org> wrote:
> > The arm64 EFI boot support added a new 'dtb' value to the configuration file.
> > Update the documentation to describe this and how the coniguration file is 
> > not
> > used when GRUB loads the modules. Updates 'ucode' description to indicate 
> > that
> > it is x86 only.
> > 
> > Signed-off-by: Roy Franz <roy.franz@linaro.org>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC PATCH 2/2] arm64: Create xen.efi binary for arm64
  2014-10-02 14:08       ` Ian Campbell
@ 2014-10-02 16:56         ` Roy Franz
  0 siblings, 0 replies; 9+ messages in thread
From: Roy Franz @ 2014-10-02 16:56 UTC (permalink / raw)
  To: Ian Campbell
  Cc: keir, tim, xen-devel, Stefano Stabellini, Jan Beulich, Fu Wei

On Thu, Oct 2, 2014 at 7:08 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Thu, 2014-10-02 at 14:09 +0100, Jan Beulich wrote:
>> >>> On 02.10.14 at 15:03, <Ian.Campbell@citrix.com> wrote:
>> > On Wed, 2014-10-01 at 18:11 -0700, Roy Franz wrote:
>> >> The 'xen' binary for arm64 is both an Image file and a PE/COFF executable,
>> >> copy it to xen.efi so that the 'make install' processing is shared with
>> >> x86. Prior to this 'make install' was broken on arm64.
>> >>
>> >> Signed-off-by: Roy Franz <roy.franz@linaro.org>
>> >
>> > If the affect of this is only to install Xen (and some symlinks)
>> > into /usr/lib64/efi and optionally into the ESP then:
>> >         Acked-by: Ian Campbell <ian.campbell@citrix.com>
>> >
>> > What I don't want is for an extra xen.efi to show up in the
>> > regular /boot directory. I think this patch doesn't do that though.
>> >
>> > Jan, slight aside: what do you think about setting EFI_VENDOR to e.g.
>> > XenProject by default (i.e. installing into the ESP by default)?
>>
>> The respective directory on the EFI partition ought to exist (and
>> I don't think we should be creating it). This part of the installation
>> being only an aid for developers anyway, I'd prefer keeping
>> EFI_VENDOR undefined (and hence skipping that installation step)
>> by default.
>
> Makes sense to me, thanks.
>
> Ian.
>
Thanks.  I wasn't sure how important this was, and wanted a conscious
decision made
regarding it rather than being left out for ARM due to an oversight.

Roy

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-02 16:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02  1:11 [RFC PATCH 0/2] EFI/arm64 updates Roy Franz
2014-10-02  1:11 ` [RFC PATCH 1/2] EFI: Update documentation for arm64 Roy Franz
2014-10-02  8:34   ` Jan Beulich
2014-10-02 14:10     ` Ian Campbell
2014-10-02  1:11 ` [RFC PATCH 2/2] arm64: Create xen.efi binary " Roy Franz
2014-10-02 13:03   ` Ian Campbell
2014-10-02 13:09     ` Jan Beulich
2014-10-02 14:08       ` Ian Campbell
2014-10-02 16:56         ` Roy Franz

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.