public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Salter <msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	catalin.marinas-5wv7dgnIgG8@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
	leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	roy.franz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v2 2/5] efi/x86: efistub: move shared dependencies to <asm/efi.h>
Date: Wed, 02 Jul 2014 08:59:56 -0400	[thread overview]
Message-ID: <1404305996.19665.7.camel@deneb.redhat.com> (raw)
In-Reply-To: <1403792617-25792-3-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

On Thu, 2014-06-26 at 16:23 +0200, Ard Biesheuvel wrote:
> This moves definitions depended upon both by code under arch/x86/boot and
> under drivers/firmware/efi to <asm/efi.h>. This is in preparation of turning
> the stub code under drivers/firmware/efi into a static library.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  arch/x86/boot/compressed/eboot.c |  5 +----
>  arch/x86/boot/compressed/eboot.h | 16 ----------------
>  arch/x86/include/asm/efi.h       | 25 +++++++++++++++++++++++++
>  3 files changed, 26 insertions(+), 20 deletions(-)
> 
> diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
> index 0331d765c2bb..2fd5e2643623 100644
> --- a/arch/x86/boot/compressed/eboot.c
> +++ b/arch/x86/boot/compressed/eboot.c
> @@ -19,10 +19,7 @@
>  
>  static efi_system_table_t *sys_table;
>  
> -static struct efi_config *efi_early;
> -
> -#define efi_call_early(f, ...)						\
> -	efi_early->call(efi_early->f, __VA_ARGS__);
> +struct efi_config *efi_early;
>  
>  #define BOOT_SERVICES(bits)						\
>  static void setup_boot_services##bits(struct efi_config *c)		\
> diff --git a/arch/x86/boot/compressed/eboot.h b/arch/x86/boot/compressed/eboot.h
> index c88c31ecad12..d487e727f1ec 100644
> --- a/arch/x86/boot/compressed/eboot.h
> +++ b/arch/x86/boot/compressed/eboot.h
> @@ -103,20 +103,4 @@ struct efi_uga_draw_protocol {
>  	void *blt;
>  };
>  
> -struct efi_config {
> -	u64 image_handle;
> -	u64 table;
> -	u64 allocate_pool;
> -	u64 allocate_pages;
> -	u64 get_memory_map;
> -	u64 free_pool;
> -	u64 free_pages;
> -	u64 locate_handle;
> -	u64 handle_protocol;
> -	u64 exit_boot_services;
> -	u64 text_output;
> -	efi_status_t (*call)(unsigned long, ...);
> -	bool is64;
> -} __packed;
> -
>  #endif /* BOOT_COMPRESSED_EBOOT_H */
> diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
> index 1eb5f6433ad8..55059a50a01f 100644
> --- a/arch/x86/include/asm/efi.h
> +++ b/arch/x86/include/asm/efi.h
> @@ -156,6 +156,31 @@ static inline efi_status_t efi_thunk_set_virtual_address_map(
>  	return EFI_SUCCESS;
>  }
>  #endif /* CONFIG_EFI_MIXED */
> +
> +
> +/* arch specific definitions used by the stub code */
> +
> +struct efi_config {
> +	u64 image_handle;
> +	u64 table;
> +	u64 allocate_pool;
> +	u64 allocate_pages;
> +	u64 get_memory_map;
> +	u64 free_pool;
> +	u64 free_pages;
> +	u64 locate_handle;
> +	u64 handle_protocol;
> +	u64 exit_boot_services;
> +	u64 text_output;
> +	efi_status_t (*call)(unsigned long, ...);
> +	bool is64;
> +} __packed;
> +
> +extern struct efi_config *efi_early;
> +
> +#define efi_call_early(f, ...)						\
> +	efi_early->call(efi_early->f, __VA_ARGS__);

That shouldn't have the trailing ;

> +
>  #else
>  /*
>   * IF EFI is not configured, have the EFI calls return -ENOSYS.

  parent reply	other threads:[~2014-07-02 12:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 14:23 [PATCH v2 0/5] efistub: convert into static library Ard Biesheuvel
     [not found] ` <1403792617-25792-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-26 14:23   ` [PATCH v2 1/5] efi/arm64: avoid EFI_ERROR as a generic return code Ard Biesheuvel
2014-06-26 14:23   ` [PATCH v2 2/5] efi/x86: efistub: move shared dependencies to <asm/efi.h> Ard Biesheuvel
     [not found]     ` <1403792617-25792-3-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-02 12:59       ` Mark Salter [this message]
     [not found]         ` <1404305996.19665.7.camel-PDpCo7skNiwAicBL8TP8PQ@public.gmane.org>
2014-07-02 13:02           ` Ard Biesheuvel
2014-06-26 14:23   ` [PATCH v2 3/5] efi/arm64: " Ard Biesheuvel
2014-06-26 14:23   ` [PATCH v2 4/5] efi: efistub: refactor stub components Ard Biesheuvel
     [not found]     ` <1403792617-25792-5-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-01 15:11       ` Matt Fleming
     [not found]         ` <20140701151130.GF7539-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-01 15:18           ` Ard Biesheuvel
     [not found]             ` <CAKv+Gu9tY7RqVXdWejwOPnpBTX0S5M9QxBH2te71kpysOV3vWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-01 15:20               ` Ard Biesheuvel
     [not found]                 ` <CAKv+Gu8sHpHNEJhDrrJcN12rVrhRgprzmNeJ_BoMCbL+Gh2-NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-01 16:22                   ` Matt Fleming
2014-06-26 14:23   ` [PATCH v2 5/5] efi: efistub: convert into static library Ard Biesheuvel
     [not found]     ` <1403792617-25792-6-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-02 11:15       ` Matt Fleming
     [not found]         ` <20140702111528.GL7539-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-02 11:23           ` Ard Biesheuvel
     [not found]             ` <CAKv+Gu9N_p49603oy0rKaq+G6sX+GS5ueSfJ2B=Yh7DrF301Cg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-02 11:49               ` Ard Biesheuvel
2014-07-01 18:39   ` [PATCH v2 0/5] " Matt Fleming
     [not found]     ` <20140701183906.GH7539-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-07-01 18:55       ` Ard Biesheuvel
     [not found]         ` <CAKv+Gu8eN4s9V6=mmQFpMDKuuMRE0y5T6pxk27=BLMFRX1O57w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-01 19:01           ` Matt Fleming

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=1404305996.19665.7.camel@deneb.redhat.com \
    --to=msalter-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=roy.franz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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