From: Matt Fleming <matt.fleming@intel.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: x86 maintainers <x86@kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Rob Landley <rob@landley.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
bhelgaas@google.com, "H. Peter Anvin" <hpa@zytor.com>,
Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Garrett <mjg@redhat.com>
Subject: Re: [Patch v4] x86: make 'mem=' option to work for efi platform
Date: Wed, 05 Dec 2012 16:44:19 +0000 [thread overview]
Message-ID: <1354725859.7184.194.camel@mfleming-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <50A227C4.6050403@cn.fujitsu.com>
On Tue, 2012-11-13 at 18:58 +0800, Wen Congyang wrote:
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index ad44391..7592163 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -314,10 +314,17 @@ static void __init do_add_efi_memmap(void)
> int e820_type;
>
> switch (md->type) {
> - case EFI_LOADER_CODE:
> - case EFI_LOADER_DATA:
> case EFI_BOOT_SERVICES_CODE:
> case EFI_BOOT_SERVICES_DATA:
> + /* EFI_BOOT_SERVICES_{CODE,DATA} needs to be mapped */
> + if (md->attribute & EFI_MEMORY_WB)
> + e820_type = E820_RAM;
> + else
> + e820_type = E820_RESERVED;
> + e820_add_region(start, size, e820_type);
> + continue;
> + case EFI_LOADER_CODE:
> + case EFI_LOADER_DATA:
> case EFI_CONVENTIONAL_MEMORY:
> if (md->attribute & EFI_MEMORY_WB)
> e820_type = E820_RAM;
This chunk seems to cause one of my EFI machines to crash. If I include
EFI_LOADER_{CODE,DATA} in the same clause as EFI_BOOT_SERVICES* things
work. I'm not sure why that is since the e820_type is E820_RAM.
Maybe I need to use memmap= too when booting?
prev parent reply other threads:[~2013-01-03 15:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 10:58 [Patch v4] x86: make 'mem=' option to work for efi platform Wen Congyang
2012-12-05 16:44 ` 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=1354725859.7184.194.camel@mfleming-mobl1.ger.corp.intel.com \
--to=matt.fleming@intel.com \
--cc=akpm@linux-foundation.org \
--cc=bhelgaas@google.com \
--cc=hpa@zytor.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mjg@redhat.com \
--cc=rob@landley.net \
--cc=tglx@linutronix.de \
--cc=wency@cn.fujitsu.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).