Blame view
arch/arm/include/asm/kexec.h
1.56 KB
c587e4a6a [ARM] 4137/1: Add... |
1 2 3 4 5 6 7 8 9 10 |
#ifndef _ARM_KEXEC_H #define _ARM_KEXEC_H #ifdef CONFIG_KEXEC /* 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 */ |
5ce94e9e8 [ARM] 4838/1: Fix... |
11 |
#define KEXEC_CONTROL_MEMORY_LIMIT (-1UL) |
c587e4a6a [ARM] 4137/1: Add... |
12 |
|
163f6876f kexec jump: renam... |
13 |
#define KEXEC_CONTROL_PAGE_SIZE 4096 |
c587e4a6a [ARM] 4137/1: Add... |
14 15 |
#define KEXEC_ARCH KEXEC_ARCH_ARM |
4cd9d6f77 [ARM] 4736/1: Exp... |
16 17 |
#define KEXEC_ARM_ATAGS_OFFSET 0x1000 #define KEXEC_ARM_ZIMAGE_OFFSET 0x8000 |
c587e4a6a [ARM] 4137/1: Add... |
18 |
#ifndef __ASSEMBLY__ |
24b776bfb ARM: 6117/1: kdum... |
19 20 21 22 23 24 25 26 |
/** * crash_setup_regs() - save registers for the panic kernel * @newregs: registers are saved here * @oldregs: registers to be saved (may be %NULL) * * Function copies machine registers from @oldregs to @newregs. If @oldregs is * %NULL then current registers are stored there. */ |
c587e4a6a [ARM] 4137/1: Add... |
27 |
static inline void crash_setup_regs(struct pt_regs *newregs, |
24b776bfb ARM: 6117/1: kdum... |
28 29 30 31 32 |
struct pt_regs *oldregs) { if (oldregs) { memcpy(newregs, oldregs, sizeof(*newregs)); } else { |
cd849ae9c ARM: 6518/1: kexe... |
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
__asm__ __volatile__ ( "stmia %[regs_base], {r0-r12} \t" "mov %[_ARM_sp], sp \t" "str lr, %[_ARM_lr] \t" "adr %[_ARM_pc], 1f \t" "mrs %[_ARM_cpsr], cpsr \t" "1:" : [_ARM_pc] "=r" (newregs->ARM_pc), [_ARM_cpsr] "=r" (newregs->ARM_cpsr), [_ARM_sp] "=r" (newregs->ARM_sp), [_ARM_lr] "=o" (newregs->ARM_lr) : [regs_base] "r" (&newregs->ARM_r0) : "memory" ); |
24b776bfb ARM: 6117/1: kdum... |
52 53 |
} } |
c587e4a6a [ARM] 4137/1: Add... |
54 |
|
868d172b8 [ARM] add machine... |
55 56 |
/* Function pointer to optional machine-specific reinitialization */ extern void (*kexec_reinit)(void); |
c587e4a6a [ARM] 4137/1: Add... |
57 58 59 60 61 |
#endif /* __ASSEMBLY__ */ #endif /* CONFIG_KEXEC */ #endif /* _ARM_KEXEC_H */ |