diff options
author | Baoquan He <bhe@redhat.com> | 2015-08-19 17:03:49 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-09-02 10:03:16 +0900 |
commit | cb9a818ff2ac437e76512ec01c0eb22d0d7456b2 (patch) | |
tree | 228c166633c2add75ed95ca4974725b440f18bfa /kexec/arch/i386/crashdump-x86.c | |
parent | c9c21cc107dcc9b6053e39ead1069e03717513f9 (diff) |
Add persistent memory support
Kernel add E820_PRAM or E820_PMEM type for NVDIMM memory device.
Now support them in kexec too.
Reported-by: Toshi Kani <toshi.kani@hp.com>
Tested-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/i386/crashdump-x86.c')
-rw-r--r-- | kexec/arch/i386/crashdump-x86.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index 569c99a..63959b7 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -301,6 +301,10 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges, type = RANGE_ACPI; } else if(memcmp(str,"ACPI Non-volatile Storage\n",26) == 0 ) { type = RANGE_ACPI_NVS; + } else if(memcmp(str,"Persistent Memory (legacy)\n",27) == 0 ) { + type = RANGE_PRAM; + } else if(memcmp(str,"Persistent Memory\n",18) == 0 ) { + type = RANGE_PMEM; } else if(memcmp(str,"reserved\n",9) == 0 ) { type = RANGE_RESERVED; } else if (memcmp(str, "GART\n", 5) == 0) { @@ -640,6 +644,8 @@ static void cmdline_add_memmap_internal(char *cmdline, unsigned long startk, strcat (str_mmap, "K$"); else if (type == RANGE_ACPI || type == RANGE_ACPI_NVS) strcat (str_mmap, "K#"); + else if (type == RANGE_PRAM) + strcat (str_mmap, "K!"); ultoa(startk, str_tmp); strcat (str_mmap, str_tmp); @@ -674,10 +680,11 @@ static int cmdline_add_memmap(char *cmdline, struct memory_range *memmap_p) endk = (memmap_p[i].end + 1)/1024; type = memmap_p[i].type; - /* Only adding memory regions of RAM and ACPI */ + /* Only adding memory regions of RAM and ACPI and Persistent Mem */ if (type != RANGE_RAM && type != RANGE_ACPI && - type != RANGE_ACPI_NVS) + type != RANGE_ACPI_NVS && + type != RANGE_PRAM) continue; if (type == RANGE_ACPI || type == RANGE_ACPI_NVS) @@ -997,7 +1004,9 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline, unsigned long start, end, size, type; if ( !( mem_range[i].type == RANGE_ACPI || mem_range[i].type == RANGE_ACPI_NVS - || mem_range[i].type == RANGE_RESERVED)) + || mem_range[i].type == RANGE_RESERVED + || mem_range[i].type == RANGE_PMEM + || mem_range[i].type == RANGE_PRAM)) continue; start = mem_range[i].start; end = mem_range[i].end; |