blob: c6afdfae7187706c911ad46afc699c433b417bba [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 06b0d43c20f7c6200902d4c6db3d33416877f71c Mon Sep 17 00:00:00 2001
2From: Andrea Adami <andrea.adami@gmail.com>
3Date: Sun, 26 Aug 2018 21:40:06 +0200
4Subject: [PATCH 1/1] arm- backport from oe-core
5
6Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
7---
8 kexec/arch/arm/crashdump-arm.c | 5 ++++-
9 1 file changed, 4 insertions(+), 1 deletion(-)
10
11diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
12index 2530b29..af2600d 100644
13--- a/kexec/arch/arm/crashdump-arm.c
14+++ b/kexec/arch/arm/crashdump-arm.c
15@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
16 void *buf;
17 int err;
18 int last_ranges;
19+ unsigned short align_bit_shift = 20;
20
21 /*
22 * First fetch all the memory (RAM) ranges that we are going to pass to
23@@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
24
25 /* for support LPAE enabled kernel*/
26 elf_info.class = ELFCLASS64;
27+ align_bit_shift = 21;
28
29 err = crash_create_elf64_headers(info, &elf_info,
30 usablemem_rgns.ranges,
31@@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
32 * 1MB) so that available memory passed in kernel command line will be
33 * aligned to 1MB. This is because kernel create_mapping() wants memory
34 * regions to be aligned to SECTION_SIZE.
35+ * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in pgtable-3level.h
36 */
37- elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
38+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << align_bit_shift,
39 crash_kernel_mem.start,
40 crash_kernel_mem.end, -1, 0);
41
42--
432.7.4
44