aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/Kconfig
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2005-06-25 17:58:07 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:51 -0400
commit70765aa4bdb8862a49fcf5b28f3deaf561cf5ae7 (patch)
tree602d7801848e2599f1f3d0d53253e30f85794514 /arch/ppc/Kconfig
parent5f5609df0c943b005847d3b2765d6dd47b624011 (diff)
[PATCH] kexec: kexec ppc support
I have tweaked this patch slightly to handle an empty list of pages to relocate passed to relocate_new_kernel. And I have added ppc_md.machine_crash_shutdown. To keep up with the changes in the generic kexec infrastructure. From: Albert Herranz <albert_herranz@yahoo.es> The following patch adds support for kexec on the ppc32 platform. Non-OpenFirmware based platforms are likely to work directly without additional changes on the kernel side. The kexec-tools userland package may need to be slightly updated, though. For OpenFirmware based machines, additional work is still needed on the kernel side before kexec support is ready. Benjamin Herrenschmidt is kindly working on that part. In order for a ppc platform to use the kexec kernel services it must implement some ppc_md hooks. Otherwise, kexec will be explicitly disabled, as suggested by benh. There are 3+1 new ppc_md hooks that a platform supporting kexec may implement. Two of them are mandatory for kexec to work. See include/asm-ppc/machdep.h for details. - machine_kexec_prepare(image) This function is called to make any arrangements to the image before it is loaded. This hook _MUST_ be provided by a platform in order to activate kexec support for that platform. Otherwise, the platform is considered to not support kexec and the kexec_load system call will fail (that makes all existing platforms by default non-kexec'able). - machine_kexec_cleanup(image) This function is called to make any cleanups on image after the loaded image data it is freed. This hook is optional. A platform may or may not provide this hook. - machine_kexec(image) This function is called to perform the _actual_ kexec. This hook _MUST_ be provided by a platform in order to activate kexec support for that platform. If a platform provides machine_kexec_prepare but forgets to provide machine_kexec, a kexec will fall back to a reboot. A ready-to-use machine_kexec_simple() generic function is provided to, hopefully, simplify kexec adoption for embedded platforms. A platform may call this function from its specific machine_kexec hook, like this: void myplatform_kexec(struct kimage *image) { machine_kexec_simple(image); } - machine_shutdown() This function is called to perform any machine specific shutdowns, not already done by drivers. This hook is optional. A platform may or may not provide this hook. An example (trimmed) platform specific module for a platform supporting kexec through the existing machine_kexec_simple follows: /* ... */ #ifdef CONFIG_KEXEC int myplatform_kexec_prepare(struct kimage *image) { /* here, we can place additional preparations */ return 0; /* yes, we support kexec */ } void myplatform_kexec(struct kimage *image) { machine_kexec_simple(image); } #endif /* CONFIG_KEXEC */ /* ... */ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { /* ... */ #ifdef CONFIG_KEXEC ppc_md.machine_kexec_prepare = myplatform_kexec_prepare; ppc_md.machine_kexec = myplatform_kexec; #endif /* CONFIG_KEXEC */ /* ... */ } The kexec ppc kernel support has been heavily tested on the GameCube Linux port, and, as reported in the fastboot mailing list, it has been tested too on a Moto 82xx ppc by Rick Richardson. Signed-off-by: Albert Herranz <albert_herranz@yahoo.es> Signed-off-by: Eric Biederman <ebiederm@xmission.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/Kconfig')
-rw-r--r--arch/ppc/Kconfig20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 979590a9baf9..a7835cd3f51f 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -217,6 +217,26 @@ config MATH_EMULATION
217 here. Saying Y here will not hurt performance (on any machine) but 217 here. Saying Y here will not hurt performance (on any machine) but
218 will increase the size of the kernel. 218 will increase the size of the kernel.
219 219
220config KEXEC
221 bool "kexec system call (EXPERIMENTAL)"
222 depends on EXPERIMENTAL
223 help
224 kexec is a system call that implements the ability to shutdown your
225 current kernel, and to start another kernel. It is like a reboot
226 but it is indepedent of the system firmware. And like a reboot
227 you can start any kernel with it, not just Linux.
228
229 The name comes from the similiarity to the exec system call.
230
231 It is an ongoing process to be certain the hardware in a machine
232 is properly shutdown, so do not be surprised if this code does not
233 initially work for you. It may help to enable device hotplugging
234 support. As of this writing the exact hardware interface is
235 strongly in flux, so no good recommendation can be made.
236
237 In the GameCube implementation, kexec allows you to load and
238 run DOL files, including kernel and homebrew DOLs.
239
220source "drivers/cpufreq/Kconfig" 240source "drivers/cpufreq/Kconfig"
221 241
222config CPU_FREQ_PMAC 242config CPU_FREQ_PMAC