summaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2018-08-31 17:10:50 +0200
committerKhem Raj <raj.khem@gmail.com>2018-08-31 09:41:29 -0700
commitd128fcea07f3453433327ac0129ecf207f179e08 (patch)
treee8092bea33021a41190cfeb96d524812ad6eda13 /meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
parent4abf0f4d6ff9c1455d338075d578dcc683124b0a (diff)
downloadmeta-openembedded-d128fcea07f3453433327ac0129ecf207f179e08.tar.gz
kexec-tools-klibc: sync patches with oe-core
Following patches have been imported: 0001-Disable-PIE-during-link.patch 0001-purgatory-Pass-r-directly-to-linker.patch The two above are in the now modified 0011-purgatory-Makefile-adapt-to-klcc.patch These two have been imported and renamed: 0002-powerpc-change-the-memory-size-limit.patch 0010-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch')
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
new file mode 100644
index 000000000..c6afdfae7
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/arm_crashdump-fix-buffer-align.patch
@@ -0,0 +1,44 @@
1From 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