[PATCH] kexec on ia64

From: Khalid Aziz <khalid_aziz_at_hp.com>
Date: 2004-11-16 07:32:02
I have been able to get kexec working on ia64. I am attaching the kernel
patch and kexec-tools patch. For the kernel patch, start with 2.6.8
kernel from kernel.org, apply ia64 patch
<http://www.kernel.org/pub/linux/kernel/ports/ia64/v2.6/linux-2.6.8-ia64-040901.diff.bz2>, apply Eric' patch <http://www.xmission.com/~ebiederm/files/kexec/> and apply attached patch. For kexec-tools, apply attached kexec-tools-1.98-ia64.diff patch to Eric's kexec-tools 1.98 sources <http://www.xmission.com/~ebiederm/files/kexec/kexec-tools-1.98.tgz>.

At this point, I have done minimal testing. Here is what I know does not
work currently:

1. No support for initrd for kexec'd kernel

2. No support for new kernel parameters for kexec'd kernel.

3. If a kernel is booted up with "mem=" or "max_addr=" to restrict the
amount of memory, a kernel kexec'd from this kernel will only see the
same amount of memory as this one. This is not only due to the new
kernel being kexec'd with the same parameter, but also becuase the EFI
memory map as passed to the kernel by ELILO gets trimmed very early on
by the kernel. I have tried adding code to save the memory map early on
and then pass this saved memory map to kexec'd kernel, but apparently I
still am not saving it early enough. I wait until bootmem allocator has
been initailized so I can allocate memory to save unmolested EFI memory
map in. In the process of initializing bootmem allocator, kernel calls
efi-Memory_map_walk() which in turn trims the memory map. I am looking
into allocating memory out of the EFI memory map before the first
efi_mem_map_walk() happens, so I can save pristine EFI memmap for use
later by kexec.

Here is what I have not tested yet:

1. I am not sure if  ACPI subsystem is happy in kexec'd kernel. I have
not seen any problems, but I have not tested it enough either.

2. Stability of kexec'd kernel over long term. It ran fine for an hour
not doing much :)

Here is what I am working on next:

1. Save EFI memory map before it is trimmed.

2. Fix up /proc/iomem on ia64 so we can enable validating memory range
in kexec tools.

3. Add a /proc interface to enable reboots on panic and INIT (and
possibly MCA) to be kexec reboots.

4. Add initrd support.

Any feedback on these patches is welcome. Any patch to fix problems in
these patches is very much appreciated :)


Khalid Aziz                                Linux and Open Source Lab
(970)898-9214                                        Hewlett-Packard
khalid_aziz@hp.com                                  Fort Collins, CO

"The Linux kernel is subject to relentless development" 
				- Alessandro Rubini

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Mon Nov 15 15:39:29 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:32 EST