All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] UEFI arm64: add noefi boot param
Date: Wed, 6 Aug 2014 13:39:59 +0100	[thread overview]
Message-ID: <20140806123958.GK25953@arm.com> (raw)
In-Reply-To: <20140806083825.GA31711@dhcp-16-198.nay.redhat.com>

On Wed, Aug 06, 2014 at 09:38:25AM +0100, Dave Young wrote:
> Adding a noefi boot param like in X86 to disable efi runtime services support.
> 
> This will be useful for debugging uefi problems. Also it will be useful
> for later kexec/kdump work. Kexec on uefi support in X86 depends on a fixed vm
> area specific for uefi runtime 1:1 mapping, kernel will switch to a different
> page table for any uefi runtime callback in virtual mode. In arm64 similar
> work probably is necessary. But kexec boot will just works with 'noefi' with
> the limitaion of lacking runtime services. The runtime services is not critical
> for kdump kernel for now. So as for kexec/kdump just leave the 1:1 mapping a
> future work.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

This looks fine to me, but I'd like Leif's ack before I merge it. Leif?

Will

> ---
>  arch/arm64/kernel/efi.c |   17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6/arch/arm64/kernel/efi.c
> ===================================================================
> --- linux-2.6.orig/arch/arm64/kernel/efi.c
> +++ linux-2.6/arch/arm64/kernel/efi.c
> @@ -31,6 +31,14 @@ static efi_runtime_services_t *runtime;
>  
>  static u64 efi_system_table;
>  
> +static bool disable_runtime __initdata = false;
> +static int __init setup_noefi(char *arg)
> +{
> +	disable_runtime = true;
> +	return 0;
> +}
> +early_param("noefi", setup_noefi);
> +
>  static int uefi_debug __initdata;
>  static int __init uefi_debug_setup(char *str)
>  {
> @@ -391,11 +399,14 @@ static int __init arm64_enter_virtual_mo
>  		return -1;
>  	}
>  
> -	pr_info("Remapping and enabling EFI services.\n");
> -
> -	/* replace early memmap mapping with permanent mapping */
>  	mapsize = memmap.map_end - memmap.map;
>  	early_memunmap(memmap.map, mapsize);
> +
> +	if (disable_runtime)
> +		return -ENODEV;
> +
> +	pr_info("Remapping and enabling EFI services.\n");
> +	/* replace early memmap mapping with permanent mapping */
>  	memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
>  						   mapsize);
>  	memmap.map_end = memmap.map + mapsize;
> 

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Dave Young <dyoung@redhat.com>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
	"matt.fleming@intel.com" <matt.fleming@intel.com>,
	"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
	"msalter@redhat.com" <msalter@redhat.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] UEFI arm64: add noefi boot param
Date: Wed, 6 Aug 2014 13:39:59 +0100	[thread overview]
Message-ID: <20140806123958.GK25953@arm.com> (raw)
In-Reply-To: <20140806083825.GA31711@dhcp-16-198.nay.redhat.com>

On Wed, Aug 06, 2014 at 09:38:25AM +0100, Dave Young wrote:
> Adding a noefi boot param like in X86 to disable efi runtime services support.
> 
> This will be useful for debugging uefi problems. Also it will be useful
> for later kexec/kdump work. Kexec on uefi support in X86 depends on a fixed vm
> area specific for uefi runtime 1:1 mapping, kernel will switch to a different
> page table for any uefi runtime callback in virtual mode. In arm64 similar
> work probably is necessary. But kexec boot will just works with 'noefi' with
> the limitaion of lacking runtime services. The runtime services is not critical
> for kdump kernel for now. So as for kexec/kdump just leave the 1:1 mapping a
> future work.
> 
> Signed-off-by: Dave Young <dyoung@redhat.com>

This looks fine to me, but I'd like Leif's ack before I merge it. Leif?

Will

> ---
>  arch/arm64/kernel/efi.c |   17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6/arch/arm64/kernel/efi.c
> ===================================================================
> --- linux-2.6.orig/arch/arm64/kernel/efi.c
> +++ linux-2.6/arch/arm64/kernel/efi.c
> @@ -31,6 +31,14 @@ static efi_runtime_services_t *runtime;
>  
>  static u64 efi_system_table;
>  
> +static bool disable_runtime __initdata = false;
> +static int __init setup_noefi(char *arg)
> +{
> +	disable_runtime = true;
> +	return 0;
> +}
> +early_param("noefi", setup_noefi);
> +
>  static int uefi_debug __initdata;
>  static int __init uefi_debug_setup(char *str)
>  {
> @@ -391,11 +399,14 @@ static int __init arm64_enter_virtual_mo
>  		return -1;
>  	}
>  
> -	pr_info("Remapping and enabling EFI services.\n");
> -
> -	/* replace early memmap mapping with permanent mapping */
>  	mapsize = memmap.map_end - memmap.map;
>  	early_memunmap(memmap.map, mapsize);
> +
> +	if (disable_runtime)
> +		return -ENODEV;
> +
> +	pr_info("Remapping and enabling EFI services.\n");
> +	/* replace early memmap mapping with permanent mapping */
>  	memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
>  						   mapsize);
>  	memmap.map_end = memmap.map + mapsize;
> 

  reply	other threads:[~2014-08-06 12:39 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  8:38 [PATCH 1/2] UEFI arm64: add noefi boot param Dave Young
2014-08-06  8:38 ` Dave Young
2014-08-06 12:39 ` Will Deacon [this message]
2014-08-06 12:39   ` Will Deacon
2014-08-06 12:40 ` Ard Biesheuvel
2014-08-06 12:40   ` Ard Biesheuvel
2014-08-07  1:28   ` Dave Young
2014-08-07  1:28     ` Dave Young
2014-08-07  7:07     ` Ard Biesheuvel
2014-08-07  7:07       ` Ard Biesheuvel
     [not found] ` <20140806083825.GA31711-je1gSBvt1Tc/CGXRbJeUwh/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-08-06 13:06   ` Leif Lindholm
2014-08-06 13:06     ` Leif Lindholm
2014-08-06 13:06     ` Leif Lindholm
2014-08-06 13:20     ` Matt Fleming
2014-08-06 13:20       ` Matt Fleming
     [not found]       ` <20140806132021.GB15082-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-08-06 13:29         ` Leif Lindholm
2014-08-06 13:29           ` Leif Lindholm
2014-08-06 13:29           ` Leif Lindholm
     [not found]           ` <20140806132941.GJ4179-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-08-06 14:01             ` Matt Fleming
2014-08-06 14:01               ` Matt Fleming
2014-08-06 14:01               ` Matt Fleming
     [not found]               ` <20140806140155.GC15082-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-08-06 14:10                 ` Ard Biesheuvel
2014-08-06 14:10                   ` Ard Biesheuvel
2014-08-06 14:10                   ` Ard Biesheuvel
     [not found]                   ` <CAKv+Gu8ey1iKu-_wS6yYaEXQaQMDXa+PF5Kiw+edA9a_OE1EAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-06 14:18                     ` Matt Fleming
2014-08-06 14:18                       ` Matt Fleming
2014-08-06 14:18                       ` Matt Fleming
     [not found]                       ` <20140806141814.GD15082-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-08-06 14:48                         ` Leif Lindholm
2014-08-06 14:48                           ` Leif Lindholm
2014-08-06 14:48                           ` Leif Lindholm
     [not found]                           ` <20140806144839.GK4179-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-08-06 14:55                             ` Matt Fleming
2014-08-06 14:55                               ` Matt Fleming
2014-08-06 14:55                               ` Matt Fleming
2014-08-07  6:19                       ` Dave Young
2014-08-07  6:19                         ` Dave Young
2014-08-07  6:19                         ` Dave Young
     [not found]                         ` <20140807061945.GE20295-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
2014-08-07 20:26                           ` Matt Fleming
2014-08-07 20:26                             ` Matt Fleming
2014-08-07 20:26                             ` Matt Fleming
2014-08-11  9:00                             ` Dave Young
2014-08-11  9:00                               ` Dave Young
2014-08-07  1:27               ` Dave Young
2014-08-07  1:27                 ` Dave Young
     [not found]                 ` <20140807012708.GA20295-4/PLUo9XfK+sDdueE5tM26fLeoKvNuZc@public.gmane.org>
2014-08-07 20:09                   ` Matt Fleming
2014-08-07 20:09                     ` Matt Fleming
2014-08-07 20:09                     ` 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=20140806123958.GK25953@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.