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