blob: 5ebfe5d3c61ff23c8dd411f8ed8816d0e5286c01 [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/* Kdump kernel runs at 32 MB, change at your peril. */
7#define KDUMP_KERNELBASE 0x2000000
8
Michael Ellerman0cc47462005-12-04 18:39:37 +11009/* How many bytes to reserve at zero for kdump. The reserve limit should
Michael Ellerman47310412006-05-17 18:00:49 +100010 * be greater or equal to the trampoline's end address.
11 * Reserve to the end of the FWNMI area, see head_64.S */
Sachin P. Sante269d262006-09-08 07:59:52 +053012#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
Michael Ellerman0cc47462005-12-04 18:39:37 +110013
Michael Ellerman47310412006-05-17 18:00:49 +100014#ifdef CONFIG_CRASH_DUMP
15
Dale Farnsworthf8f50b12008-12-17 10:09:26 +000016/*
17 * On PPC64 translation is disabled during trampoline setup, so we use
18 * physical addresses. Though on PPC32 translation is already enabled,
19 * so we can't do the same. Luckily create_trampoline() creates relative
20 * branches, so we can just add the PAGE_OFFSET and don't worry about it.
21 */
22#ifdef __powerpc64__
Michael Ellerman0cc47462005-12-04 18:39:37 +110023#define KDUMP_TRAMPOLINE_START 0x0100
24#define KDUMP_TRAMPOLINE_END 0x3000
Dale Farnsworthf8f50b12008-12-17 10:09:26 +000025#else
26#define KDUMP_TRAMPOLINE_START (0x0100 + PAGE_OFFSET)
27#define KDUMP_TRAMPOLINE_END (0x3000 + PAGE_OFFSET)
28#endif /* __powerpc64__ */
Michael Ellerman0cc47462005-12-04 18:39:37 +110029
Haren Myneni5f508672006-06-22 23:35:10 -070030#define KDUMP_MIN_TCE_ENTRIES 2048
31
Michael Ellerman47310412006-05-17 18:00:49 +100032#endif /* CONFIG_CRASH_DUMP */
33
34#ifndef __ASSEMBLY__
Michael Ellerman47310412006-05-17 18:00:49 +100035
Mohan Kumar M54622f12008-10-21 17:38:10 +000036#if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_RELOCATABLE)
Michael Ellerman47310412006-05-17 18:00:49 +100037extern void reserve_kdump_trampoline(void);
38extern void setup_kdump_trampoline(void);
Mohan Kumar M54622f12008-10-21 17:38:10 +000039#else
40/* !CRASH_DUMP || RELOCATABLE */
Michael Ellerman47310412006-05-17 18:00:49 +100041static inline void reserve_kdump_trampoline(void) { ; }
42static inline void setup_kdump_trampoline(void) { ; }
Mohan Kumar M54622f12008-10-21 17:38:10 +000043#endif
Michael Ellerman47310412006-05-17 18:00:49 +100044
Michael Ellerman47310412006-05-17 18:00:49 +100045#endif /* __ASSEMBLY__ */
Michael Ellerman0cc47462005-12-04 18:39:37 +110046
47#endif /* __PPC64_KDUMP_H */