: kexec: kexec.i386
PATCH 12/14 : kexec: kexec.i386
The is the i386 implementation of kexec.
arch/i386/Kconfig +17 -0
@@ -866,6 +866,23 @@ source "drivers/perfctr/Kconfig" +config KEXEC + bool "kexec system call (EXPERIMENTAL)" + depends on EXPERIMENTAL + help + kexec is a system call that implements the ability to shutdown your + current kernel, and to start another kernel. It is like a reboot + but it is indepedent of the system firmware. And like a reboot + you can start any kernel with it, not just Linux. + + The name comes from the similiarity to the exec system call. + + It is an ongoing process to be certain the hardware in a machine + is properly shutdown, so do not be surprised if this code does not + initially work for you. It may help to enable device hotplugging + support. As of this writing the exact hardware interface is + strongly in flux, so no good recommendation can be made. + endmenu
arch/i386/kernel/Makefile +1 -0
@@ -24,6 +24,7 @@ obj-$(CONFIG_X86_MPPARSE) += mpparse.o obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o obj-$(CONFIG_X86_IO_APIC) += io_apic.o +obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_X86_NUMAQ) += numaq.o obj-$(CONFIG_X86_SUMMIT_NUMA) += summit.o obj-$(CONFIG_KPROBES) += kprobes.o
arch/i386/kernel/entry.S +1 -1
@@ -936,7 +936,7 @@ .long sys_mq_timedreceive /* 280 */ .long sys_mq_notify .long sys_mq_getsetattr - .long sys_ni_syscall /* reserved for kexec */ + .long sys_kexec_load .long sys_perfctr_info .long sys_vperfctr_open .long sys_vperfctr_control
arch/i386/kernel/machine_kexec.c +208 -0
208 lines not on this page · raw message
arch/i386/kernel/relocate_kernel.S +118 -0
118 lines not on this page · raw message
include/asm-i386/kexec.h +25 -0
@@ -0,0 +1,25 @@ +#ifndef _I386_KEXEC_H +#define _I386_KEXEC_H + +#include <asm/fixmap.h> + +/* +* KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. +* I.e. Maximum page that is mapped directly into kernel memory, +* and kmap is not required. +* +* Someone correct me if FIXADDR_START - PAGEOFFSET is not the correct +* calculation for the amount of memory directly mappable into the +* kernel memory space. +*/ + +/* Maximum physical address we can use pages from */ +#define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) +/* Maximum address we can reach in physical address mode */ +#define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) +/* Maximum address we can use for the control code buffer */ +#define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE + +#define KEXEC_CONTROL_CODE_SIZE 4096 + +#endif /* _I386_KEXEC_H */