Obtain PAGE_OFFSET from running kernel
PATCH 1/1 Obtain PAGE_OFFSET from running kernel
Currently the page offset is hard coded to 0xe000000000000000UL at compile time of kexec-tools. This patch changes things around so the page offset is handed to purgatory by the kexecing kernel.
Note that this changes the ABI between purgatory (part of kexec-tools) and the kernel kexec code. There is an accomanying kexec-tools patch.
Index: kexec-ia64-2.6/arch/ia64/kernel/relocate_kernel.S
=================================--- kexec-ia64-2.6.orig/arch/ia64/kernel/relocate_kernel.S 2006-10-05 11:56:24.000000000 +0900
+++ kexec-ia64-2.6/arch/ia64/kernel/relocate_kernel.S 2006-10-05 11:57:24.000000000 +0900
@@ -22,7 +22,7 @@
*/
GLOBAL_ENTRY(relocate_new_kernel)
.prologue
- alloc r31=ar.pfs,4,0,0,0
+ alloc r31=ar.pfs,4,0,1,0
.body
.reloc_entry:
{
@@ -180,6 +180,7 @@
;;
srlz.d
;;
+ movl out0=PAGE_OFFSET;;
br.call.sptk.many b0¶;;
.align 32
--
Signature · 3 lines
Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/