Skip to contentSkip to conversation

powerpc32: Kexec support for PPC440X chipsets

PATCH New Suzuki K. Poulose 1 participant 1 message Jul 18, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc32: Kexec support for PPC440X chipsets

UPDATE: Minor update in Copyright assignment in misc_32.S
Added requirement of upstream kexec-tools.

Changes from v1: Uses a tmp mapping in the other address space to setup
the 1:1 mapping (suggested by Sebastian Andrzej Siewior).

Note 1: Should we do the same for kernel entry code for PPC44x ?

This patch adds kexec support for PPC440 based chipsets.This work is based on the KEXEC patches for FSL BookE.

The FSL BookE patch and the code flow could be found at the link below:

	http://patchwork.ozlabs.org/patch/49359/

Steps:

1) Invalidate all the TLB entries except the one this code is run from
2) Create a tmp mapping for our code in the other address space and jump to it
3) Invalidate the entry we used
4) Create a 1:1 mapping for 0-2GiB in blocks of 256M
5) Jump to the new 1:1 mapping and invalidate the tmp mapping

I have tested this patches on Ebony, Sequoia boards and Virtex on QEMU. It would be great if somebody could test this on the other boards.

You need the latest snapshot of kexec-tools for ppc440x support, available at

git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git

Cc Sebastian Andrzej Siewior <[email protected]>

---

 arch/powerpc/Kconfig             |    2 
 arch/powerpc/include/asm/kexec.h |    2 
 arch/powerpc/kernel/misc_32.S    |  171 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 173 insertions(+), 2 deletions(-)
arch/powerpc/Kconfig +1 -1
index 423145a6..d04fae0 100644
@@ -349,7 +349,7 @@ config ARCH_ENABLE_MEMORY_HOTREMOVE
 
 config KEXEC
 	bool "kexec system call (EXPERIMENTAL)"
-	depends on (PPC_BOOK3S || FSL_BOOKE) && EXPERIMENTAL
+	depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP && !47x)) && EXPERIMENTAL
 	help
 	  kexec is a system call that implements the ability to shutdown your
 	  current kernel, and to start another kernel.  It is like a reboot
arch/powerpc/include/asm/kexec.h +1 -1
index 8a33698..f921eb1 100644
@@ -2,7 +2,7 @@
 #define _ASM_POWERPC_KEXEC_H
 #ifdef __KERNEL__
 
-#ifdef CONFIG_FSL_BOOKE
+#if defined(CONFIG_FSL_BOOKE) || defined(CONFIG_44x)
 
 /*
  * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory
arch/powerpc/kernel/misc_32.S +171 -0

183 lines not on this page · raw message