mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 22:55:21 +07:00
37dd2badcf
Added support to allow an 85xx kernel to be run from a non-zero physical address (useful for cooperative asymmetric multiprocessing situations and kdump). The support can be configured at compile time by setting CONFIG_PAGE_OFFSET, CONFIG_KERNEL_START, and CONFIG_PHYSICAL_START as desired. Alternatively, the kernel build can set CONFIG_RELOCATABLE. Setting this config option causes the kernel to determine at runtime the physical addresses of CONFIG_PAGE_OFFSET and CONFIG_KERNEL_START. If CONFIG_RELOCATABLE is set, then CONFIG_PHYSICAL_START has no meaning. However, CONFIG_PHYSICAL_START will always be used to set the LOAD program header physical address field in the resulting ELF image. Currently we are limited to running at a physical address that is a multiple of 256M. This is due to how we map TLBs to cover lowmem. This should be fixed to allow 64M or maybe even 16M alignment in the future. It is considered an error to try and run a kernel at a non-aligned physical address. All the magic for this support is accomplished by proper initialization of the kernel memory subsystem and use of ARCH_PFN_OFFSET. The use of ARCH_PFN_OFFSET only affects normal memory and not IO mappings. ioremap uses map_page and isn't affected by ARCH_PFN_OFFSET. /dev/mem continues to allow access to any physical address in the system regardless of how CONFIG_PHYSICAL_START is set. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
36 lines
906 B
C
36 lines
906 B
C
#ifndef _PPC64_KDUMP_H
|
|
#define _PPC64_KDUMP_H
|
|
|
|
/* Kdump kernel runs at 32 MB, change at your peril. */
|
|
#define KDUMP_KERNELBASE 0x2000000
|
|
|
|
/* How many bytes to reserve at zero for kdump. The reserve limit should
|
|
* be greater or equal to the trampoline's end address.
|
|
* Reserve to the end of the FWNMI area, see head_64.S */
|
|
#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */
|
|
|
|
#ifdef CONFIG_CRASH_DUMP
|
|
|
|
#define KDUMP_TRAMPOLINE_START 0x0100
|
|
#define KDUMP_TRAMPOLINE_END 0x3000
|
|
|
|
#define KDUMP_MIN_TCE_ENTRIES 2048
|
|
|
|
#endif /* CONFIG_CRASH_DUMP */
|
|
|
|
#ifndef __ASSEMBLY__
|
|
#ifdef CONFIG_CRASH_DUMP
|
|
|
|
extern void reserve_kdump_trampoline(void);
|
|
extern void setup_kdump_trampoline(void);
|
|
|
|
#else /* !CONFIG_CRASH_DUMP */
|
|
|
|
static inline void reserve_kdump_trampoline(void) { ; }
|
|
static inline void setup_kdump_trampoline(void) { ; }
|
|
|
|
#endif /* CONFIG_CRASH_DUMP */
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* __PPC64_KDUMP_H */
|