Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * kexec.h for kexec
0004  * Created by <nschichan@corp.free.fr> on Thu Oct 12 14:59:34 2006
0005  */
0006 
0007 #ifndef _MIPS_KEXEC
0008 # define _MIPS_KEXEC
0009 
0010 #include <asm/stacktrace.h>
0011 
0012 /* Maximum physical address we can use pages from */
0013 #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL)
0014 /* Maximum address we can reach in physical address mode */
0015 #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL)
0016  /* Maximum address we can use for the control code buffer */
0017 #define KEXEC_CONTROL_MEMORY_LIMIT (-1UL)
0018 /* Reserve 3*4096 bytes for board-specific info */
0019 #define KEXEC_CONTROL_PAGE_SIZE (4096 + 3*4096)
0020 
0021 /* The native architecture */
0022 #define KEXEC_ARCH KEXEC_ARCH_MIPS
0023 #define MAX_NOTE_BYTES 1024
0024 
0025 static inline void crash_setup_regs(struct pt_regs *newregs,
0026                     struct pt_regs *oldregs)
0027 {
0028     if (oldregs)
0029         memcpy(newregs, oldregs, sizeof(*newregs));
0030     else
0031         prepare_frametrace(newregs);
0032 }
0033 
0034 #ifdef CONFIG_KEXEC
0035 struct kimage;
0036 extern unsigned long kexec_args[4];
0037 extern int (*_machine_kexec_prepare)(struct kimage *);
0038 extern void (*_machine_kexec_shutdown)(void);
0039 extern void (*_machine_crash_shutdown)(struct pt_regs *regs);
0040 void default_machine_crash_shutdown(struct pt_regs *regs);
0041 void kexec_nonboot_cpu_jump(void);
0042 void kexec_reboot(void);
0043 #ifdef CONFIG_SMP
0044 extern const unsigned char kexec_smp_wait[];
0045 extern unsigned long secondary_kexec_args[4];
0046 extern atomic_t kexec_ready_to_reboot;
0047 extern void (*_crash_smp_send_stop)(void);
0048 #endif
0049 #endif
0050 
0051 #endif /* !_MIPS_KEXEC */