aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kexec.h
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-01-24 15:20:11 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-29 22:32:58 -0500
commit0212f9159694be61c6bc52e925fa76643e0c1abf (patch)
tree21fff008e27df08d3ab650d9c2421b490fcdc926 /include/linux/kexec.h
parent7d41a8a4a2b2438621a9159477bff36a11d79a42 (diff)
x86: Add Crash kernel low reservation
During kdump kernel's booting stage, it need to find low ram for swiotlb buffer when system does not support intel iommu/dmar remapping. kexed-tools is appending memmap=exactmap and range from /proc/iomem with "Crash kernel", and that range is above 4G for 64bit after boot protocol 2.12. We need to add another range in /proc/iomem like "Crash kernel low", so kexec-tools could find that info and append to kdump kernel command line. Try to reserve some under 4G if the normal "Crash kernel" is above 4G. User could specify the size with crashkernel_low=XX[KMG]. -v2: fix warning that is found by Fengguang's test robot. -v3: move out get_mem_size change to another patch, to solve compiling warning that is found by Borislav Petkov <bp@alien8.de> -v4: user must specify crashkernel_low if system does not support intel or amd iommu. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1359058816-7615-31-git-send-email-yinghai@kernel.org Cc: Eric Biederman <ebiederm@xmission.com> Cc: Rob Landley <rob@landley.net> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'include/linux/kexec.h')
-rw-r--r--include/linux/kexec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index d0b8458a703a..d2e6927bbaae 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -191,6 +191,7 @@ extern struct kimage *kexec_crash_image;
191/* Location of a reserved region to hold the crash kernel. 191/* Location of a reserved region to hold the crash kernel.
192 */ 192 */
193extern struct resource crashk_res; 193extern struct resource crashk_res;
194extern struct resource crashk_low_res;
194typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4]; 195typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4];
195extern note_buf_t __percpu *crash_notes; 196extern note_buf_t __percpu *crash_notes;
196extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; 197extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4];
@@ -199,6 +200,8 @@ extern size_t vmcoreinfo_max_size;
199 200
200int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, 201int __init parse_crashkernel(char *cmdline, unsigned long long system_ram,
201 unsigned long long *crash_size, unsigned long long *crash_base); 202 unsigned long long *crash_size, unsigned long long *crash_base);
203int parse_crashkernel_low(char *cmdline, unsigned long long system_ram,
204 unsigned long long *crash_size, unsigned long long *crash_base);
202int crash_shrink_memory(unsigned long new_size); 205int crash_shrink_memory(unsigned long new_size);
203size_t crash_get_memory_size(void); 206size_t crash_get_memory_size(void);
204void crash_free_reserved_phys_range(unsigned long begin, unsigned long end); 207void crash_free_reserved_phys_range(unsigned long begin, unsigned long end);