From 69cda7b1f06befb8d6a884b8a663d19dcaef590b Mon Sep 17 00:00:00 2001 From: "akpm@osdl.org" Date: Mon, 9 Jan 2006 20:51:46 -0800 Subject: [PATCH] kdump: x86_64: add memmmap command line option ) From: Vivek Goyal - This patch introduces the memmap option for x86_64 similar to i386. - memmap=exactmap enables setting of an exact E820 memory map, as specified by the user. Changes in this version: - Used e820_end_of_ram() to find the max_pfn as suggested by Andi kleen. - removed PFN_UP & PFN_DOWN macros - Printing the user defined map also. Signed-off-by: Murali M Chakravarthy Signed-off-by: Hariprasad Nellitheertha Signed-off-by: Vivek Goyal Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/e820.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'arch/x86_64/kernel/e820.c') diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 17579a1a174..293cd71a266 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c @@ -559,6 +559,27 @@ void __init parse_memopt(char *p, char **from) end_user_pfn >>= PAGE_SHIFT; } +void __init parse_memmapopt(char *p, char **from) +{ + unsigned long long start_at, mem_size; + + mem_size = memparse(p, from); + p = *from; + if (*p == '@') { + start_at = memparse(p+1, from); + add_memory_region(start_at, mem_size, E820_RAM); + } else if (*p == '#') { + start_at = memparse(p+1, from); + add_memory_region(start_at, mem_size, E820_ACPI); + } else if (*p == '$') { + start_at = memparse(p+1, from); + add_memory_region(start_at, mem_size, E820_RESERVED); + } else { + end_user_pfn = (mem_size >> PAGE_SHIFT); + } + p = *from; +} + unsigned long pci_mem_start = 0xaeedbabe; /* -- cgit v1.2.3