From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org, Yinghai Lu <yinghai@kernel.org>,
Suresh Siddha <suresh.b.siddha@intel.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Jens Axboe <jens.axboe@oracle.com>,
Jack Steiner <steiner@sgi.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [Patch 1/1] x86 efi: Fill all reserved memmap entries if add_efi_memmap specified.
Date: Wed, 12 May 2010 11:10:24 -0700 [thread overview]
Message-ID: <4BEAEF10.9040809@sgi.com> (raw)
Currently, the e820_reserve_resources() function does not add entries
obtained via the "add_efi_memmap" kernel cmdline option. This causes
/sys/firmware/memmap/... to be incomplete (stops after 128 entries).
Utilities that examine these entries then do not get the complete
picture of system memory.
This patch causes the above function to use the e820 memmap instead
of the e820_saved memmap if "add_efi_memmap" cmdline option is
specified.
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Jack Steiner <steiner@sgi.com>
---
arch/x86/include/asm/e820.h | 1 +
arch/x86/kernel/e820.c | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
--- linux.orig/arch/x86/include/asm/e820.h
+++ linux/arch/x86/include/asm/e820.h
@@ -89,6 +89,7 @@ extern int e820_search_gap(unsigned long
unsigned long start_addr, unsigned long long end_addr);
struct setup_data;
extern void parse_e820_ext(struct setup_data *data, unsigned long pa_data);
+extern int add_efi_memmap;
#if defined(CONFIG_X86_64) || \
(defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION))
--- linux.orig/arch/x86/kernel/e820.c
+++ linux/arch/x86/kernel/e820.c
@@ -1074,6 +1074,7 @@ void __init e820_reserve_resources(void)
int i;
struct resource *res;
u64 end;
+ struct e820map *e_map = &e820_saved;
res = alloc_bootmem(sizeof(struct resource) * e820.nr_map);
e820_res = res;
@@ -1101,8 +1102,11 @@ void __init e820_reserve_resources(void)
res++;
}
- for (i = 0; i < e820_saved.nr_map; i++) {
- struct e820entry *entry = &e820_saved.map[i];
+ if (add_efi_memmap)
+ e_map = &e820;
+
+ for (i = 0; i < e_map->nr_map; i++) {
+ struct e820entry *entry = &e_map->map[i];
firmware_map_add_early(entry->addr,
entry->addr + entry->size - 1,
e820_type_to_string(entry->type));
next reply other threads:[~2010-05-12 18:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 18:10 Mike Travis [this message]
2010-05-12 18:55 ` [Patch 1/1] x86 efi: Fill all reserved memmap entries if add_efi_memmap specified H. Peter Anvin
2010-05-12 20:19 ` Yinghai
2010-05-12 21:02 ` Mike Travis
2010-05-13 21:18 ` Mike Travis
2010-05-13 21:48 ` Yinghai
2010-05-13 21:55 ` Mike Travis
2010-05-13 22:46 ` H. Peter Anvin
2010-05-24 23:04 ` [Patch 1/1] x86 efi: insert add_efi_memmap entries into both e820 maps Mike Travis
2010-05-25 22:34 ` [Patch 1/1] x86 efi: Fill all reserved memmap entries if add_efi_memmap specified Mike Travis
2010-05-25 22:41 ` H. Peter Anvin
2010-05-25 22:46 ` Mike Travis
2010-05-25 22:49 ` H. Peter Anvin
2010-05-26 17:39 ` Yinghai Lu
2010-05-26 17:42 ` Mike Travis
2010-05-26 18:22 ` H. Peter Anvin
2010-05-26 18:47 ` Mike Travis
2010-05-26 19:04 ` H. Peter Anvin
2010-05-26 19:09 ` Mike Travis
2010-05-26 20:10 ` H. Peter Anvin
2010-05-25 22:59 ` [Patch 1/1] x86 efi: Fill all reserved memmap entries if add_efi_memmap specified v2 Mike Travis
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=4BEAEF10.9040809@sgi.com \
--to=travis@sgi.com \
--cc=hpa@zytor.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=steiner@sgi.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yinghai@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 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.