ia64/xen-unstable

changeset 8931:c93c6b392ce5

Eliminate hard coded items from i386 __xen_guest section
to allow the new VMSPLIT_* Kconfig options to work, and to
avoid problems when the position of the hypercall page
changes.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Feb 20 16:08:27 2006 +0000 (2006-02-20)
parents 946a45f07351
children 012e133941fc
files linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Mon Feb 20 15:18:38 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S	Mon Feb 20 16:08:27 2006 +0000
     1.3 @@ -1,23 +1,11 @@
     1.4  
     1.5 -#include <linux/config.h>
     1.6 -
     1.7 -.section __xen_guest
     1.8 -	.ascii	"GUEST_OS=linux,GUEST_VER=2.6"
     1.9 -	.ascii	",XEN_VER=xen-3.0"
    1.10 -	.ascii	",VIRT_BASE=0xC0000000"
    1.11 -	.ascii	",HYPERCALL_PAGE=0x104" /* __pa(hypercall_page) >> 12 */
    1.12 -#ifdef CONFIG_X86_PAE
    1.13 -	.ascii	",PAE=yes"
    1.14 -#else
    1.15 -	.ascii	",PAE=no"
    1.16 -#endif
    1.17 -	.ascii	",LOADER=generic"
    1.18 -	.byte	0
    1.19  
    1.20  .text
    1.21 +#include <linux/config.h>
    1.22  #include <linux/threads.h>
    1.23  #include <linux/linkage.h>
    1.24  #include <asm/segment.h>
    1.25 +#include <asm/page.h>
    1.26  #include <asm/thread_info.h>
    1.27  #include <asm/asm-offsets.h>
    1.28  #include <xen/interface/arch-x86_32.h>
    1.29 @@ -190,12 +178,47 @@ ENTRY(cpu_gdt_table)
    1.30  .org 0x3000
    1.31  ENTRY(default_ldt)
    1.32  
    1.33 -.org 0x4000
    1.34 +#define HYPERCALL_PAGE_OFFSET 0x4000
    1.35 +.org HYPERCALL_PAGE_OFFSET
    1.36  ENTRY(hypercall_page)
    1.37 +.skip 0x1000
    1.38  
    1.39 -.org 0x5000
    1.40  /*
    1.41   * Real beginning of normal "text" segment
    1.42   */
    1.43  ENTRY(stext)
    1.44  ENTRY(_stext)
    1.45 +
    1.46 +
    1.47 +/*
    1.48 + * __xen_guest information
    1.49 + */
    1.50 +.macro bigutoa value
    1.51 +	utoa (\value) >> 12
    1.52 +	.ascii "000"
    1.53 +.endm
    1.54 +.macro utoa value
    1.55 + .if (\value) >= 16
    1.56 +	utoa (\value) >> 4
    1.57 + .endif
    1.58 + .if (\value) % 16 < 10
    1.59 +  .byte '0' + (\value) % 16
    1.60 + .else
    1.61 +  .byte 'A' + (\value) % 16 - 10
    1.62 + .endif
    1.63 +.endm
    1.64 +
    1.65 +.section __xen_guest
    1.66 +	.ascii	"GUEST_OS=linux,GUEST_VER=2.6"
    1.67 +	.ascii	",XEN_VER=xen-3.0"
    1.68 +	.ascii	",VIRT_BASE=0x"
    1.69 +		 bigutoa __PAGE_OFFSET
    1.70 +	.ascii	",HYPERCALL_PAGE=0x"
    1.71 +		utoa ((__PHYSICAL_START+HYPERCALL_PAGE_OFFSET)>>PAGE_SHIFT)
    1.72 +#ifdef CONFIG_X86_PAE
    1.73 +	.ascii	",PAE=yes"
    1.74 +#else
    1.75 +	.ascii	",PAE=no"
    1.76 +#endif
    1.77 +	.ascii	",LOADER=generic"
    1.78 +	.byte	0