Go to the documentation of this file. 1 #ifndef __ASM_SH_KEXEC_H
2 #define __ASM_SH_KEXEC_H
4 #include <asm/ptrace.h>
5 #include <asm/string.h>
18 #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
20 #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
22 #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
24 #define KEXEC_CONTROL_PAGE_SIZE 4096
27 #define KEXEC_ARCH KEXEC_ARCH_SH
33 static inline void crash_setup_regs(
struct pt_regs *newregs,
37 memcpy(newregs, oldregs,
sizeof(*newregs));
39 __asm__ __volatile__ (
"mov r0, %0" :
"=r" (newregs->
regs[0]));
40 __asm__ __volatile__ (
"mov r1, %0" :
"=r" (newregs->
regs[1]));
41 __asm__ __volatile__ (
"mov r2, %0" :
"=r" (newregs->
regs[2]));
42 __asm__ __volatile__ (
"mov r3, %0" :
"=r" (newregs->
regs[3]));
43 __asm__ __volatile__ (
"mov r4, %0" :
"=r" (newregs->
regs[4]));
44 __asm__ __volatile__ (
"mov r5, %0" :
"=r" (newregs->
regs[5]));
45 __asm__ __volatile__ (
"mov r6, %0" :
"=r" (newregs->
regs[6]));
46 __asm__ __volatile__ (
"mov r7, %0" :
"=r" (newregs->
regs[7]));
47 __asm__ __volatile__ (
"mov r8, %0" :
"=r" (newregs->
regs[8]));
48 __asm__ __volatile__ (
"mov r9, %0" :
"=r" (newregs->
regs[9]));
49 __asm__ __volatile__ (
"mov r10, %0" :
"=r" (newregs->
regs[10]));
50 __asm__ __volatile__ (
"mov r11, %0" :
"=r" (newregs->
regs[11]));
51 __asm__ __volatile__ (
"mov r12, %0" :
"=r" (newregs->
regs[12]));
52 __asm__ __volatile__ (
"mov r13, %0" :
"=r" (newregs->
regs[13]));
53 __asm__ __volatile__ (
"mov r14, %0" :
"=r" (newregs->
regs[14]));
54 __asm__ __volatile__ (
"mov r15, %0" :
"=r" (newregs->
regs[15]));
56 __asm__ __volatile__ (
"sts pr, %0" :
"=r" (newregs->
pr));
57 __asm__ __volatile__ (
"sts macl, %0" :
"=r" (newregs->
macl));
58 __asm__ __volatile__ (
"sts mach, %0" :
"=r" (newregs->
mach));
60 __asm__ __volatile__ (
"stc gbr, %0" :
"=r" (newregs->
gbr));
61 __asm__ __volatile__ (
"stc sr, %0" :
"=r" (newregs->
sr));