From: Chris Wright Subject: [RFC PATCH 07/35] Make LOAD_OFFSET defined by subarch Date: Tue, 09 May 2006 00:00:07 -0700 Message-ID: <20060509085150.509458000@sous-sol.org> References: <20060509084945.373541000@sous-sol.org> Return-path: Content-Disposition: inline; filename=i386-load-offset Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org Cc: virtualization@lists.osdl.org, xen-devel@lists.xensource.com, Ian Pratt , Christian Limpach List-Id: xen-devel@lists.xenproject.org Change LOAD_OFFSET so that the kernel has virtual addresses in the elf header fields. Unlike bare metal kernels, Xen kernels start with virtual address management turned on and thus the addresses to load to should be virtual addresses. Signed-off-by: Ian Pratt Signed-off-by: Christian Limpach Signed-off-by: Chris Wright --- arch/i386/kernel/vmlinux.lds.S | 2 +- include/asm-i386/mach-default/mach_vmlinux.lds.h | 6 ++++++ include/asm-i386/mach-xen/mach_vmlinux.lds.h | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) --- linus-2.6.orig/arch/i386/kernel/vmlinux.lds.S +++ linus-2.6/arch/i386/kernel/vmlinux.lds.S @@ -2,7 +2,7 @@ * Written by Martin Mares ; */ -#define LOAD_OFFSET __PAGE_OFFSET +#include "mach_vmlinux.lds.h" #include #include --- /dev/null +++ linus-2.6/include/asm-i386/mach-default/mach_vmlinux.lds.h @@ -0,0 +1,6 @@ +#ifndef __ASM_MACH_VMLINUX_LDS_H +#define __ASM_MACH_VMLINUX_LDS_H + +#define LOAD_OFFSET __PAGE_OFFSET + +#endif /* __ASM_MACH_VMLINUX_LDS_H */ --- /dev/null +++ linus-2.6/include/asm-i386/mach-xen/mach_vmlinux.lds.h @@ -0,0 +1,6 @@ +#ifndef __ASM_MACH_VMLINUX_LDS_H +#define __ASM_MACH_VMLINUX_LDS_H + +#define LOAD_OFFSET 0 + +#endif /* __ASM_MACH_VMLINUX_LDS_H */ --