Accepting request 232374 from Kernel:kdump
(forwarded request 232373 from jones_tony) OBS-URL: https://build.opensuse.org/request/show/232374 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kexec-tools?expand=0&rev=100
This commit is contained in:
commit
bc8a935c77
@ -0,0 +1,54 @@
|
||||
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
Subject: [PATCH] kexec/fs2dt : Fix endianess issue with initrd base and size
|
||||
Date: Fri, 11 Apr 2014 12:10:30 +0200
|
||||
Git-commit: db3c32babc5279816344be8210ca91a64331f0fe
|
||||
References: bnc#873169
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
The initrd values exposed in the device tree of the kexeced kernel must be
|
||||
encoded in Big Endian format.
|
||||
|
||||
Without this patch, kexeced LE kernel are expected to panic when dealing
|
||||
with the initrd image.
|
||||
|
||||
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
---
|
||||
kexec/fs2dt.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
|
||||
index 5e6b98d..2a90979 100644
|
||||
--- a/kexec/fs2dt.c
|
||||
+++ b/kexec/fs2dt.c
|
||||
@@ -531,7 +531,7 @@ static void putnode(void)
|
||||
/* Add initrd entries to the second kernel */
|
||||
if (initrd_base && initrd_size && !strcmp(basename,"chosen/")) {
|
||||
int len = 8;
|
||||
- unsigned long long initrd_end;
|
||||
+ uint64_t bevalue;
|
||||
|
||||
dt_reserve(&dt, 12); /* both props, of 6 words ea. */
|
||||
*dt++ = cpu_to_be32(3);
|
||||
@@ -539,7 +539,8 @@ static void putnode(void)
|
||||
*dt++ = cpu_to_be32(propnum("linux,initrd-start"));
|
||||
pad_structure_block(len);
|
||||
|
||||
- memcpy(dt,&initrd_base,len);
|
||||
+ bevalue = cpu_to_be64(initrd_base);
|
||||
+ memcpy(dt, &bevalue, len);
|
||||
dt += (len + 3)/4;
|
||||
|
||||
len = 8;
|
||||
@@ -547,10 +548,10 @@ static void putnode(void)
|
||||
*dt++ = cpu_to_be32(len);
|
||||
*dt++ = cpu_to_be32(propnum("linux,initrd-end"));
|
||||
|
||||
- initrd_end = initrd_base + initrd_size;
|
||||
+ bevalue = cpu_to_be64(initrd_base + initrd_size);
|
||||
pad_structure_block(len);
|
||||
|
||||
- memcpy(dt,&initrd_end,len);
|
||||
+ memcpy(dt, &bevalue, len);
|
||||
dt += (len + 3)/4;
|
||||
|
||||
reserve(initrd_base, initrd_size);
|
@ -0,0 +1,45 @@
|
||||
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
Subject: ppc64/purgatory: Device tree values should be read/stored in Big Endian
|
||||
References: bnc#875485
|
||||
Git-commit: pending
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
The purgatory code reads the device tree's version and stores if needed the
|
||||
currently running CPU number. These 2 values are stored in Big Endian
|
||||
format in the device tree and should be byte swapped when running in Little
|
||||
Endian mode.
|
||||
|
||||
Without this fix, when running in SMP environment, kexec or kdump kernel may
|
||||
fail booting with the following message :
|
||||
Failed to identify boot CPU
|
||||
|
||||
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
---
|
||||
purgatory/arch/ppc64/v2wrap.S | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/purgatory/arch/ppc64/v2wrap.S b/purgatory/arch/ppc64/v2wrap.S
|
||||
index 6fc62e3..dc5034f 100644
|
||||
--- a/purgatory/arch/ppc64/v2wrap.S
|
||||
+++ b/purgatory/arch/ppc64/v2wrap.S
|
||||
@@ -90,10 +90,20 @@ master:
|
||||
LOADADDR(16, dt_offset)
|
||||
ld 3,0(16) # load device-tree address
|
||||
mr 16,3 # save dt address in reg16
|
||||
+#ifdef __BIG_ENDIAN__
|
||||
lwz 6,20(3) # fetch version number
|
||||
+#else
|
||||
+ li 4,20
|
||||
+ lwbrx 6,3,4 # fetch BE version number
|
||||
+#endif
|
||||
cmpwi 0,6,2 # v2 ?
|
||||
blt 80f
|
||||
+#ifdef __BIG_ENDIAN__
|
||||
stw 17,28(3) # save my cpu number as boot_cpu_phys
|
||||
+#else
|
||||
+ li 4,28
|
||||
+ stwbrx 17,3,4 # Store my cpu as BE value
|
||||
+#endif
|
||||
80:
|
||||
LOADADDR(6,opal_base) # For OPAL early debug
|
||||
ld 8,0(6) # load the OPAL base address in r8
|
@ -1,6 +1,9 @@
|
||||
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
|
||||
Date: Tue, 25 Mar 2014 10:55:53 +0100
|
||||
Subject: [PATCH] ppc64/purgatory: Disabling GCC's stack protection
|
||||
Git-commit: 7d33c8933ebf8e1788ffff0132b6e08a2388748c
|
||||
References: bnc#869161
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
Some Linux distributions, like Suse, are turning on the GCC's stack
|
||||
protection mechanism by default (-fstack-protector). When building the
|
||||
|
@ -1,7 +1,8 @@
|
||||
From: Tony Jones <tonyj@suse.de>
|
||||
Subject: Disable erroneous efi memory descriptor version message
|
||||
References: bnc#867785c5
|
||||
Upstream: not yet
|
||||
Git-commit: 3e5443fffb2c311a61fe157be25b80de53329604
|
||||
Signed-off-by: Tony Jones <tonyj@suse.de>
|
||||
|
||||
On non-EFI systems, efi_info section of boot_params is zero filled resulting
|
||||
in an erroneous message from kexec regarding "efi memory descriptor" version.
|
||||
|
@ -1,9 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 1 17:47:36 UTC 2014 - tonyj@suse.com
|
||||
|
||||
- Device tree values should be big endian for ppc64le (bnc#875485)
|
||||
New patch: kexec-tools-ppc64-purgatory-device-tree-values-should-be-read-stored-in-big-endian.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 11 18:08:41 UTC 2014 - tonyj@suse.com
|
||||
|
||||
- Expose flattened device trees (ppc64le) to new kexec'd kernel in Big Endian
|
||||
format (bnc#873169)
|
||||
New patch: kexec-tools-fs2dt-fix-endianess-issue-with-initrd-base-and-size.patch
|
||||
- Update patch headers to reflect upstream commit id's:
|
||||
Change patch: kexec-tools-ppc64-purgatory-disabling-gcc-stack-protection.patch
|
||||
Change patch: kexec-tools-zero-efi-info.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 18 16:45:14 UTC 2014 - tonyj@suse.com
|
||||
|
||||
- Disable stack protector for ppc64le (bnc#869161)
|
||||
New patch: kexec-tools-ppc64-purgatory-disabling-gcc-stack-protection.patch_
|
||||
- Disable erroneous (efi memory descriptor version message (bnc#867785c5)
|
||||
New patch: kexec-tools-ppc64-purgatory-disabling-gcc-stack-protection.patch
|
||||
- Disable erroneous (efi memory descriptor version) message (bnc#867785c5)
|
||||
New patch: kexec-tools-zero-efi-info.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
@ -42,6 +42,8 @@ Patch6: %{name}-enable-aarch64-fixup.patch
|
||||
Patch7: %{name}-i386-bzimage_efi.patch
|
||||
Patch8: %{name}-ppc64-purgatory-disabling-gcc-stack-protection.patch
|
||||
Patch9: %{name}-zero-efi-info.patch
|
||||
Patch10: %{name}-fs2dt-fix-endianess-issue-with-initrd-base-and-size.patch
|
||||
Patch11: %{name}-ppc64-purgatory-device-tree-values-should-be-read-stored-in-big-endian.patch
|
||||
Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#!BuildIgnore: fop
|
||||
@ -71,6 +73,8 @@ the loaded kernel after it panics.
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
|
||||
%build
|
||||
# disable as-needed
|
||||
|
Loading…
Reference in New Issue
Block a user