12 #include <linux/kexec.h>
14 #include <linux/reboot.h>
19 #include <asm/pgtable.h>
20 #include <asm/pgalloc.h>
21 #include <asm/mmu_context.h>
23 #include <asm/cacheflush.h>
24 #include <asm/sh_bios.h>
25 #include <asm/reboot.h>
28 unsigned long reboot_code_buffer,
29 unsigned long start_address);
54 static void kexec_info(
struct kimage *
image)
57 printk(
"kexec information\n");
58 for (i = 0; i < image->nr_segments; i++) {
59 printk(
" segment[%d]: 0x%08x - 0x%08x (0x%08x)\n",
61 (
unsigned int)image->segment[i].mem,
62 (
unsigned int)image->segment[i].mem +
63 image->segment[i].memsz,
64 (
unsigned int)image->segment[i].memsz);
66 printk(
" start : 0x%08x\n\n", (
unsigned int)image->start);
75 unsigned long page_list;
76 unsigned long reboot_code_buffer;
80 int save_ftrace_enabled;
87 for (ptr = &image->head; (entry = *ptr) && !(entry & IND_DONE);
88 ptr = (entry & IND_INDIRECTION) ?
90 if (*ptr & IND_SOURCE || *ptr & IND_INDIRECTION ||
91 *ptr & IND_DESTINATION)
95 #ifdef CONFIG_KEXEC_JUMP
96 if (image->preserve_context)
100 save_ftrace_enabled = __ftrace_enabled_save();
105 page_list = image->head;
122 (*rnk)(page_list, reboot_code_buffer,
125 #ifdef CONFIG_KEXEC_JUMP
126 asm volatile(
"ldc %0, vbr" : :
"r" (&
vbr_base) :
"memory");
128 if (image->preserve_context)
132 for (ptr = &image->head; (entry = *ptr) && !(entry & IND_DONE);
133 ptr = (*ptr & IND_INDIRECTION) ?
135 if (*ptr & IND_SOURCE || *ptr & IND_INDIRECTION ||
136 *ptr & IND_DESTINATION)
141 __ftrace_enabled_restore(save_ftrace_enabled);
151 VMCOREINFO_CONFIG(X2TLB);
157 unsigned long long crash_size, crash_base;
161 &crash_size, &crash_base);
162 if (ret == 0 && crash_size > 0) {
175 pr_err(
"crashkernel allocation failed\n");
181 pr_err(
"crashkernel reservation failed - "
182 "memory is in use\n");
194 pr_info(
"Disabled memory limit for crashkernel\n");
197 pr_info(
"Reserving %ldMB of memory at 0x%08lx "
198 "for crashkernel (System RAM: %ldMB)\n",
199 (
unsigned long)(crash_size >> 20),