linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Fleming <matt@codeblueprint.co.uk>
To: Taku Izumi <izumi.taku@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
	x86@kernel.org, matt.fleming@intel.com, tglx@linutronix.de,
	mingo@redhat.com, hpa@zytor.com, tony.luck@intel.com,
	qiuxishi@huawei.com, kamezawa.hiroyu@jp.fujitsu.com,
	ard.biesheuvel@linaro.org
Subject: Re: [PATCH 2/2] x86, efi: Add "efi_fake_mem" boot option
Date: Sat, 10 Oct 2015 21:36:17 +0100	[thread overview]
Message-ID: <20151010203617.GE2723@codeblueprint.co.uk> (raw)
In-Reply-To: <1443621716-209818-1-git-send-email-izumi.taku@jp.fujitsu.com>

On Wed, 30 Sep, at 11:01:56PM, Taku Izumi wrote:
> This patch introduces new boot option named "efi_fake_mem".
> By specifying this parameter, you can add arbitrary attribute
> to specific memory range.
> This is useful for debugging of Address Range Mirroring feature.
> 
> For example, if "efi_fake_mem=2G@4G:0x10000,2G@0x10a0000000:0x10000"
> is specified, the original (firmware provided) EFI memmap will be
> updated so that the specified memory regions have
> EFI_MEMORY_MORE_RELIABLE attribute (0x10000):
> 
>  <original>
>    efi: mem36: [Conventional Memory|  |  |  |  |  |   |WB|WT|WC|UC] range=[0x0000000100000000-0x00000020a0000000) (129536MB)
> 
>  <updated>
>    efi: mem36: [Conventional Memory|  |MR|  |  |  |   |WB|WT|WC|UC] range=[0x0000000100000000-0x0000000180000000) (2048MB)
>    efi: mem37: [Conventional Memory|  |  |  |  |  |   |WB|WT|WC|UC] range=[0x0000000180000000-0x00000010a0000000) (61952MB)
>    efi: mem38: [Conventional Memory|  |MR|  |  |  |   |WB|WT|WC|UC] range=[0x00000010a0000000-0x0000001120000000) (2048MB)
>    efi: mem39: [Conventional Memory|  |  |  |  |  |   |WB|WT|WC|UC] range=[0x0000001120000000-0x00000020a0000000) (63488MB)
> 
> And you will find that the following message is output:
> 
>    efi: Memory: 4096M/131455M mirrored memory
> 
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
> ---
>  Documentation/kernel-parameters.txt |  15 +++
>  arch/x86/kernel/setup.c             |   4 +-
>  drivers/firmware/efi/Kconfig        |  22 ++++
>  drivers/firmware/efi/Makefile       |   1 +
>  drivers/firmware/efi/fake_mem.c     | 238 ++++++++++++++++++++++++++++++++++++
>  include/linux/efi.h                 |   6 +
>  6 files changed, 285 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/firmware/efi/fake_mem.c
 
Looks good to me! I've queued this up with one minor change...

> +config EFI_MAX_FAKE_MEM
> +	int "maximum allowable number of ranges in efi_fake_mem boot option"
> +	depends on EFI && X86 && EFI_FAKE_MEMMAP

We can simplify this depends line since EFI_FAKE_MEMMAP itself is
dependent on EFI and X86, and we should use that level of indirection
to our advantage to save updating this line if/when arm64 support is
added.

-- 
Matt Fleming, Intel Open Source Technology Center

      reply	other threads:[~2015-10-10 20:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 10:18 [PATCH 0/2] Introduce "efi_fake_mem" boot option Taku Izumi
     [not found] ` <1443608292-37686-1-git-send-email-izumi.taku-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2015-09-30 10:20   ` [PATCH 1/2] x86, efi: rename print_efi_memmap() to efi_print_memmap() Taku Izumi
     [not found]     ` <1443608400-37744-1-git-send-email-izumi.taku-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2015-10-10 19:31       ` Matt Fleming
2015-09-30 10:20   ` [PATCH 2/2] x86, efi: Add "efi_fake_mem" boot option Taku Izumi
     [not found]     ` <1443608419-37801-1-git-send-email-izumi.taku-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2015-09-30  1:36       ` kbuild test robot
     [not found]         ` <201509300948.PGoujrqX%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-09-30  4:51           ` Izumi, Taku
2015-09-30 14:01           ` Taku Izumi
2015-10-10 20:36             ` Matt Fleming [this message]

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=20151010203617.GE2723@codeblueprint.co.uk \
    --to=matt@codeblueprint.co.uk \
    --cc=ard.biesheuvel@linaro.org \
    --cc=hpa@zytor.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@redhat.com \
    --cc=qiuxishi@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).