Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 1 | #ifndef _PPC64_KDUMP_H |
| 2 | #define _PPC64_KDUMP_H |
| 3 | |
Dale Farnsworth | f8f50b1 | 2008-12-17 10:09:26 +0000 | [diff] [blame] | 4 | #include <asm/page.h> |
| 5 | |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 6 | #define KDUMP_KERNELBASE 0x2000000 |
| 7 | |
Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 8 | /* How many bytes to reserve at zero for kdump. The reserve limit should |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 9 | * be greater or equal to the trampoline's end address. |
| 10 | * Reserve to the end of the FWNMI area, see head_64.S */ |
Sachin P. Sant | e269d26 | 2006-09-08 07:59:52 +0530 | [diff] [blame] | 11 | #define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */ |
Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 12 | |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 13 | #ifdef CONFIG_CRASH_DUMP |
| 14 | |
Dale Farnsworth | f8f50b1 | 2008-12-17 10:09:26 +0000 | [diff] [blame] | 15 | /* |
| 16 | * On PPC64 translation is disabled during trampoline setup, so we use |
| 17 | * physical addresses. Though on PPC32 translation is already enabled, |
| 18 | * so we can't do the same. Luckily create_trampoline() creates relative |
| 19 | * branches, so we can just add the PAGE_OFFSET and don't worry about it. |
| 20 | */ |
| 21 | #ifdef __powerpc64__ |
Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 22 | #define KDUMP_TRAMPOLINE_START 0x0100 |
| 23 | #define KDUMP_TRAMPOLINE_END 0x3000 |
Dale Farnsworth | f8f50b1 | 2008-12-17 10:09:26 +0000 | [diff] [blame] | 24 | #else |
| 25 | #define KDUMP_TRAMPOLINE_START (0x0100 + PAGE_OFFSET) |
| 26 | #define KDUMP_TRAMPOLINE_END (0x3000 + PAGE_OFFSET) |
| 27 | #endif /* __powerpc64__ */ |
Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 28 | |
Haren Myneni | 5f50867 | 2006-06-22 23:35:10 -0700 | [diff] [blame] | 29 | #define KDUMP_MIN_TCE_ENTRIES 2048 |
| 30 | |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 31 | #endif /* CONFIG_CRASH_DUMP */ |
| 32 | |
| 33 | #ifndef __ASSEMBLY__ |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 34 | |
Suzuki Poulose | 0f890c8 | 2011-12-14 22:57:15 +0000 | [diff] [blame] | 35 | #if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_NONSTATIC_KERNEL) |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 36 | extern void reserve_kdump_trampoline(void); |
| 37 | extern void setup_kdump_trampoline(void); |
Mohan Kumar M | 54622f1 | 2008-10-21 17:38:10 +0000 | [diff] [blame] | 38 | #else |
Suzuki Poulose | 0f890c8 | 2011-12-14 22:57:15 +0000 | [diff] [blame] | 39 | /* !CRASH_DUMP || !NONSTATIC_KERNEL */ |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 40 | static inline void reserve_kdump_trampoline(void) { ; } |
| 41 | static inline void setup_kdump_trampoline(void) { ; } |
Mohan Kumar M | 54622f1 | 2008-10-21 17:38:10 +0000 | [diff] [blame] | 42 | #endif |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 43 | |
Michael Ellerman | 4731041 | 2006-05-17 18:00:49 +1000 | [diff] [blame] | 44 | #endif /* __ASSEMBLY__ */ |
Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 45 | |
| 46 | #endif /* __PPC64_KDUMP_H */ |