diff options
Diffstat (limited to 'meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch')
-rw-r--r-- | meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch b/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch deleted file mode 100644 index 1a1c317436..0000000000 --- a/meta/recipes-kernel/kexec/kexec-tools/0003-arm64-identify-PHYS_OFFSET-correctly.patch +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | From 16df170ad4808d12acd5e919ac4f6e7f33a247b3 Mon Sep 17 00:00:00 2001 | ||
2 | From: AKASHI Takahiro <takahiro.akashi@linaro.org> | ||
3 | Date: Thu, 1 Sep 2016 10:57:42 +0900 | ||
4 | Subject: [PATCH 3/9] arm64: identify PHYS_OFFSET correctly | ||
5 | |||
6 | Due to the kernel patch, commit e7cd190385d1 ("arm64: mark reserved | ||
7 | memblock regions explicitly in iomem"), the current code will not be able | ||
8 | to identify the correct value of PHYS_OFFSET if some "reserved" memory | ||
9 | region, which is likely to be UEFI runtime services code/data, exists at | ||
10 | an address below the first "System RAM" regions. | ||
11 | |||
12 | This patch fixes this issue. | ||
13 | |||
14 | Upstream-Status: Backport [https://git.linaro.org/people/takahiro.akashi/kexec-tools.git] | ||
15 | |||
16 | Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> | ||
17 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
18 | --- | ||
19 | kexec/arch/arm64/iomem.h | 7 +++++++ | ||
20 | kexec/arch/arm64/kexec-arm64.c | 12 ++++++++++-- | ||
21 | 2 files changed, 17 insertions(+), 2 deletions(-) | ||
22 | create mode 100644 kexec/arch/arm64/iomem.h | ||
23 | |||
24 | diff --git a/kexec/arch/arm64/iomem.h b/kexec/arch/arm64/iomem.h | ||
25 | new file mode 100644 | ||
26 | index 0000000..7fd66eb | ||
27 | --- /dev/null | ||
28 | +++ b/kexec/arch/arm64/iomem.h | ||
29 | @@ -0,0 +1,7 @@ | ||
30 | +#ifndef IOMEM_H | ||
31 | +#define IOMEM_H | ||
32 | + | ||
33 | +#define SYSTEM_RAM "System RAM\n" | ||
34 | +#define IOMEM_RESERVED "reserved\n" | ||
35 | + | ||
36 | +#endif | ||
37 | diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c | ||
38 | index 2e8839a..8ac811d 100644 | ||
39 | --- a/kexec/arch/arm64/kexec-arm64.c | ||
40 | +++ b/kexec/arch/arm64/kexec-arm64.c | ||
41 | @@ -21,6 +21,7 @@ | ||
42 | #include "crashdump-arm64.h" | ||
43 | #include "dt-ops.h" | ||
44 | #include "fs2dt.h" | ||
45 | +#include "iomem.h" | ||
46 | #include "kexec-syscall.h" | ||
47 | #include "arch/options.h" | ||
48 | |||
49 | @@ -475,7 +476,14 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str, | ||
50 | return -1; | ||
51 | |||
52 | r = (struct memory_range *)data + nr; | ||
53 | - r->type = RANGE_RAM; | ||
54 | + | ||
55 | + if (!strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM))) | ||
56 | + r->type = RANGE_RAM; | ||
57 | + else if (!strncmp(str, IOMEM_RESERVED, strlen(IOMEM_RESERVED))) | ||
58 | + r->type = RANGE_RESERVED; | ||
59 | + else | ||
60 | + return 1; | ||
61 | + | ||
62 | r->start = base; | ||
63 | r->end = base + length - 1; | ||
64 | |||
65 | @@ -494,7 +502,7 @@ static int get_memory_ranges_iomem_cb(void *data, int nr, char *str, | ||
66 | static int get_memory_ranges_iomem(struct memory_range *array, | ||
67 | unsigned int *count) | ||
68 | { | ||
69 | - *count = kexec_iomem_for_each_line("System RAM\n", | ||
70 | + *count = kexec_iomem_for_each_line(NULL, | ||
71 | get_memory_ranges_iomem_cb, array); | ||
72 | |||
73 | if (!*count) { | ||
74 | -- | ||
75 | 1.9.1 | ||
76 | |||