summaryrefslogtreecommitdiff
path: root/kexec/arch/arm/crashdump-arm.c
AgeCommit message (Collapse)Author
2017-05-22kexec: generalize and rename get_kernel_stext_sym()Pratyush Anand
get_kernel_stext_sym() has been defined for both arm and i386. Other architecture might need some other kernel symbol address. Therefore rewrite this function as generic function to get any kernel symbol address. More over, kallsyms is not arch specific representation, therefore have common function for all arches. Signed-off-by: Pratyush Anand <panand@redhat.com> [created symbols.c] Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Tested-by: David Woodhouse <dwmw@amazon.co.uk> Tested-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2017-03-02crashdump/arm: Add get_crash_kernel_load_range() functionDaniel Kiper
Implement get_crash_kernel_load_range() in support of print crash kernel region size option. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Signed-off-by: Eric DeVolder <eric.devolder@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: report which ELF core format we will useRussell King
Report which ELF core format will be used to create the template ELF core dump in the debug information. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: clean up phys/page offset debugRussell King
Clean up the physical and page offset debug prints. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: fix type of phys_offsetRussell King
Some LPAE systems may have phys_offset above the 4GB mark. Hence, we need phys_offset to be a 64-bit integer. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: add debug of reserved and coredump memory rangesRussell King
Add debug of the reserved and coredump memory ranges for validation. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: add support for boot-time crash kernel resourceRussell King
Add support for detecting and using the boot-time crash kernel resource, which is needed for systems which have special boot-time memory views, such as Keystone 2. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: add support for multiple reserved regionsRussell King
Add support for reserving multiple memory regions rather than just a single region. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: rename crash_reserved_mem to crash_kernel_memRussell King
Rename crash_reserved_mem to crash_kernel_mem as we want to support multiple reserved memory ranges. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: move crash system RAM parsing earlierRussell King
Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: use generic mem_region sorting implementationRussell King
Use the generic mem_region sorting implementation. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: parse crash_reserved_mem earlyRussell King
We parse the crash kernel memory region in several locations in the kexec tools - once to check that there's a region, another time for real when we're locating the memory regions to dump, and another while loading the image. Move the real parsing step to is_crashkernel_mem_reserved(), which matches what x86 is doing. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: add maximum number of memory rangesRussell King
Add the maximum number of memory ranges to the list of usable memory ranges, so that we don't have to carry this around. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: report if crash kernel is out of boundsRussell King
Report an error if the crash kernel memory region is outside of the boot-view memory range - this can happen with systems such as Keystone 2. Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: fix ELF32/ELF64 checkRussell King
Rather than using ULONG_MAX to decide whether to use the ELF64 or ELF32 core dump format, use UINT32_MAX instead - we include stdint.h, so we might as well use a constant which is meaningful for the limits of the 32-bit ELF format. Signed-off-by: Russell King <rmk@arm.linux.org.uk> Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2016-06-08arm: fix get_kernel_stext_sym() to close its fileRussell King
Fix get_kernel_stext_sym() so that it closes its file once it's finsihed with it - there's no need to leak file descriptors. Reviewed-by: Pratyush Anand <panand@redhat.com> Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Simon Horman <horms@verge.net.au>
2014-06-06kexec: ARM: add LPAE supportLiu Hua
For 32-bit ARM systems with CONFIG_ARM_LPAE=y, when kexec utility loads the crash kernel. 32-bit elf header is not enough if the physical address exceeds 4G. This patch checkes whether the largest physical address of the system exceeds 4G. If so, kexec creates 64-bit elf header.Otherwise it creates 32-bit elf header. Signed-off-by: Wei Jitao <weijitao@huawei.com> Signed-off-by: Liu Hua <sdu.liu@huawei.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2014-06-06kexec: iomem: accept u64 parameters for callbacksLiu Hua
Since "start" and "end" in kexec_iomem_for_each_line are unsigned long long, this patch makes "callback"s accept unsigned-long-long-type parameters. Signed-off-by: Wei Jitao <weijitao@huawei.com> Signed-off-by: Liu Hua <sdu.liu@huawei.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2014-05-30kexec-tools: add --page-offset option for ARMWang Nan
When KALLSYMS is disabled or /proc is not mounted, this patch allows --page-offset cmdline option for user to setup correct page_offset. Signed-off-by: Wang Nan <wangnan0@huawei.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2014-05-30kexec-tools: detect page_offset dynamicallyWang Nan
ARM kernel can be compiled with CONFIG_VMSPLIT_1G, CONFIG_VMSPLIT_2G or CONFIG_VMSPLIT_3G. This patch dynamically detects PAGE_OFFSET according to _stext symbol from /proc/kallsyms. Signed-off-by: Wang Nan <wangnan0@huawei.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2014-01-14kexec: arm: Fix endianness in crashdump headerTaras Kondratiuk
Currently little-endian ELFDATA is hard-coded in crashdump header. This lead to a wrong header format if crashdump is generated on BE system. Set native endianness into ELFDATA field. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Signed-off-by: Simon Horman <horms@verge.net.au>
2012-09-12arm: Make use of memory_rangesSimon Horman
Make use of struct memory_ranges and provide a global usablemem_rgns. This is in preparation for adding device tree support. Signed-off-by: Simon Horman <horms@verge.net.au>
2012-03-29arm: move DEBUG code to --debugCong Wang
Like patch 1/5, this one moves code under #if DEBUG to --debug on arm arch. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
2010-05-19kexec: implement ARM crashdump supportMika Westerberg
Implement support for loading dump capture kernels for ARM architecture. ARM doesn't need any backup memory regions so only elfcore header is allocated from the top of the reserved memory region. Only zImages are supported. The dump capture kernel needs to be loaded to physical address corresponding to the memory region reserved with 'crashkernel=size@start' kernel command line parameter. Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com> Signed-off-by: Simon Horman <horms@verge.net.au>