From: "Eric W. Biederman" 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: Andrew Morton --- 25-akpm/arch/i386/kernel/efi.c | 4 ++++ 25-akpm/arch/i386/kernel/setup.c | 30 ++++++++++++++++++++++++++++++ 25-akpm/arch/i386/mm/discontig.c | 6 ++++++ 3 files changed, 40 insertions(+) diff -puN arch/i386/kernel/efi.c~x86-crashkernel arch/i386/kernel/efi.c --- 25/arch/i386/kernel/efi.c~x86-crashkernel Wed Jan 19 15:22:21 2005 +++ 25-akpm/arch/i386/kernel/efi.c Wed Jan 19 15:22:21 2005 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -596,6 +597,9 @@ efi_initialize_iomem_resources(struct re 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 -puN arch/i386/kernel/setup.c~x86-crashkernel arch/i386/kernel/setup.c --- 25/arch/i386/kernel/setup.c~x86-crashkernel Wed Jan 19 15:22:21 2005 +++ 25-akpm/arch/i386/kernel/setup.c Wed Jan 19 15:22:21 2005 @@ -40,6 +40,7 @@ #include #include #include +#include #include