From: Eric W. Biederman Date: Sat, 25 Jun 2005 21:58:01 +0000 (-0700) Subject: [PATCH] crashdump: x86 crashkernel option X-Git-Tag: v2.6.13-rc1~68^2~110 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bc3b91aeed71a904e431d12ca90e9b6bcb42c91;p=linux-2.6 [PATCH] crashdump: x86 crashkernel option This is the x86 implementation of the crashkernel option. It reserves a window of memory very early in the bootup process, so we never use it for anything but the kernel to switch to when the running kernel panics. In addition to reserving this memory a resource structure is registered so looking at /proc/iomem it is clear what happened to that memory. ISSUES: Is it possible to implement this in a architecture generic way? What should be done with architectures that always use an iommu and thus don't report their RAM memory resources in /proc/iomem? Signed-off-by: Eric Biederman Signed-off-by: Vivek Goyal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index f732f427b4..385883ea8c 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -598,6 +599,9 @@ efi_initialize_iomem_resources(struct resource *code_resource, if (md->type == EFI_CONVENTIONAL_MEMORY) { request_resource(res, code_resource); request_resource(res, data_resource); +#ifdef CONFIG_KEXEC + request_resource(res, &crashk_res); +#endif } } } diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 6337157f5d..d88ebdfa6c 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -43,7 +43,10 @@ #include #include #include +#include + #include