blob: c9776202d7ec5af080a6a5eea868229c97978f32 [file] [log] [blame]
Michael Ellerman0cc47462005-12-04 18:39:37 +11001#ifndef _PPC64_KDUMP_H
2#define _PPC64_KDUMP_H
3
Dale Farnsworthf8f50b12008-12-17 10:09:26 +00004#include <asm/page.h>
5
Michael Ellerman47310412006-05-17 18:00:49 +10006#define KDUMP_KERNELBASE 0x2000000
7
Michael Ellerman0cc47462005-12-04 18:39:37 +11008/* How many bytes to reserve at zero for kdump. The reserve limit should
Michael Ellerman47310412006-05-17 18:00:49 +10009 * 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. Sante269d262006-09-08 07:59:52 +053011#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
Michael Ellerman0cc47462005-12-04 18:39:37 +110012
Michael Ellerman47310412006-05-17 18:00:49 +100013#ifdef CONFIG_CRASH_DUMP
14
Dale Farnsworthf8f50b12008-12-17 10:09:26 +000015/*
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 Ellerman0cc47462005-12-04 18:39:37 +110022#define KDUMP_TRAMPOLINE_START 0x0100
23#define KDUMP_TRAMPOLINE_END 0x3000
Dale Farnsworthf8f50b12008-12-17 10:09:26 +000024#else
25#define KDUMP_TRAMPOLINE_START (0x0100 + PAGE_OFFSET)
26#define KDUMP_TRAMPOLINE_END (0x3000 + PAGE_OFFSET)
27#endif /* __powerpc64__ */
Michael Ellerman0cc47462005-12-04 18:39:37 +110028
Haren Myneni5f508672006-06-22 23:35:10 -070029#define KDUMP_MIN_TCE_ENTRIES 2048
30
Michael Ellerman47310412006-05-17 18:00:49 +100031#endif /* CONFIG_CRASH_DUMP */
32
33#ifndef __ASSEMBLY__
Michael Ellerman47310412006-05-17 18:00:49 +100034
Suzuki Poulose0f890c82011-12-14 22:57:15 +000035#if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_NONSTATIC_KERNEL)
Michael Ellerman47310412006-05-17 18:00:49 +100036extern void reserve_kdump_trampoline(void);
37extern void setup_kdump_trampoline(void);
Mohan Kumar M54622f12008-10-21 17:38:10 +000038#else
Suzuki Poulose0f890c82011-12-14 22:57:15 +000039/* !CRASH_DUMP || !NONSTATIC_KERNEL */
Michael Ellerman47310412006-05-17 18:00:49 +100040static inline void reserve_kdump_trampoline(void) { ; }
41static inline void setup_kdump_trampoline(void) { ; }
Mohan Kumar M54622f12008-10-21 17:38:10 +000042#endif
Michael Ellerman47310412006-05-17 18:00:49 +100043
Michael Ellerman47310412006-05-17 18:00:49 +100044#endif /* __ASSEMBLY__ */
Michael Ellerman0cc47462005-12-04 18:39:37 +110045
46#endif /* __PPC64_KDUMP_H */