kdump.h 1.3 KB
Newer Older
1 2 3
#ifndef _PPC64_KDUMP_H
#define _PPC64_KDUMP_H

4 5
#include <asm/page.h>

6 7
#define KDUMP_KERNELBASE	0x2000000

8
/* How many bytes to reserve at zero for kdump. The reserve limit should
9 10
 * be greater or equal to the trampoline's end address.
 * Reserve to the end of the FWNMI area, see head_64.S */
11
#define KDUMP_RESERVE_LIMIT	0x10000 /* 64K */
12

13 14
#ifdef CONFIG_CRASH_DUMP

15 16 17 18 19 20 21
/*
 * On PPC64 translation is disabled during trampoline setup, so we use
 * physical addresses. Though on PPC32 translation is already enabled,
 * so we can't do the same. Luckily create_trampoline() creates relative
 * branches, so we can just add the PAGE_OFFSET and don't worry about it.
 */
#ifdef __powerpc64__
22 23
#define KDUMP_TRAMPOLINE_START	0x0100
#define KDUMP_TRAMPOLINE_END	0x3000
24 25 26 27
#else
#define KDUMP_TRAMPOLINE_START	(0x0100 + PAGE_OFFSET)
#define KDUMP_TRAMPOLINE_END	(0x3000 + PAGE_OFFSET)
#endif /* __powerpc64__ */
28

29 30
#define KDUMP_MIN_TCE_ENTRIES	2048

31 32 33 34
#endif /* CONFIG_CRASH_DUMP */

#ifndef __ASSEMBLY__

35
#if defined(CONFIG_CRASH_DUMP) && !defined(CONFIG_RELOCATABLE)
36 37
extern void reserve_kdump_trampoline(void);
extern void setup_kdump_trampoline(void);
38 39
#else
/* !CRASH_DUMP || RELOCATABLE */
40 41
static inline void reserve_kdump_trampoline(void) { ; }
static inline void setup_kdump_trampoline(void) { ; }
42
#endif
43 44

#endif /* __ASSEMBLY__ */
45 46

#endif /* __PPC64_KDUMP_H */