summaryrefslogtreecommitdiff
path: root/kexec/arch/i386/kexec-x86-common.c
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2015-08-19 17:03:49 +0800
committerSimon Horman <horms@verge.net.au>2015-09-02 10:03:16 +0900
commitcb9a818ff2ac437e76512ec01c0eb22d0d7456b2 (patch)
tree228c166633c2add75ed95ca4974725b440f18bfa /kexec/arch/i386/kexec-x86-common.c
parentc9c21cc107dcc9b6053e39ead1069e03717513f9 (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/kexec-x86-common.c')
-rw-r--r--kexec/arch/i386/kexec-x86-common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kexec/arch/i386/kexec-x86-common.c b/kexec/arch/i386/kexec-x86-common.c
index 91e4f94..041c8ec 100644
--- a/kexec/arch/i386/kexec-x86-common.c
+++ b/kexec/arch/i386/kexec-x86-common.c
@@ -94,6 +94,12 @@ static int get_memory_ranges_proc_iomem(struct memory_range **range, int *ranges
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 {
continue;
}
@@ -149,6 +155,10 @@ unsigned xen_e820_to_kexec_type(uint32_t type)
return RANGE_ACPI;
case E820_NVS:
return RANGE_ACPI_NVS;
+ case E820_PMEM:
+ return RANGE_PMEM;
+ case E820_PRAM:
+ return RANGE_PRAM;
case E820_RESERVED:
default:
return RANGE_RESERVED;