Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _PPC64_KDUMP_H
0003 #define _PPC64_KDUMP_H
0004 
0005 #include <asm/page.h>
0006 
0007 #define KDUMP_KERNELBASE    0x2000000
0008 
0009 /* How many bytes to reserve at zero for kdump. The reserve limit should
0010  * be greater or equal to the trampoline's end address.
0011  * Reserve to the end of the FWNMI area, see head_64.S */
0012 #define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
0013 
0014 #ifdef CONFIG_CRASH_DUMP
0015 
0016 /*
0017  * On PPC64 translation is disabled during trampoline setup, so we use
0018  * physical addresses. Though on PPC32 translation is already enabled,
0019  * so we can't do the same. Luckily create_trampoline() creates relative
0020  * branches, so we can just add the PAGE_OFFSET and don't worry about it.
0021  */
0022 #ifdef __powerpc64__
0023 #define KDUMP_TRAMPOLINE_START  0x0100
0024 #define KDUMP_TRAMPOLINE_END    0x3000
0025 #else
0026 #define KDUMP_TRAMPOLINE_START  (0x0100 + PAGE_OFFSET)
0027 #define KDUMP_TRAMPOLINE_END    (0x3000 + PAGE_OFFSET)
0028 #endif /* __powerpc64__ */
0029 
0030 #define KDUMP_MIN_TCE_ENTRIES   2048
0031 
0032 #endif /* CONFIG_CRASH_DUMP */
0033 
0034 #ifndef __ASSEMBLY__
0035 
0036 #if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_NONSTATIC_KERNEL)
0037 extern void reserve_kdump_trampoline(void);
0038 extern void setup_kdump_trampoline(void);
0039 #else
0040 /* !CRASH_DUMP || !NONSTATIC_KERNEL */
0041 static inline void reserve_kdump_trampoline(void) { ; }
0042 static inline void setup_kdump_trampoline(void) { ; }
0043 #endif
0044 
0045 #endif /* __ASSEMBLY__ */
0046 
0047 #endif /* __PPC64_KDUMP_H */