Index: head-2006-02-14/arch/i386/kernel/head-xen.S =================================================================== --- head-2006-02-14.orig/arch/i386/kernel/head-xen.S 2006-02-14 10:30:39.000000000 +0100 +++ head-2006-02-14/arch/i386/kernel/head-xen.S 2006-02-15 14:20:45.000000000 +0100 @@ -1,11 +1,29 @@ #include +#include + +.macro utoa value, radix=16, upper=1 + .if (\radix) < 2 || (\radix) > 36 + .err + .elseif (\value) >= (\radix) + utoa (\value) / (\radix), (\radix), (\upper) + .endif + .if (\value) % (\radix) < 10 + .byte '0' + (\value) % (\radix) + .elseif (\upper) + .byte 'A' + (\value) % (\radix) - 10 + .else + .byte 'a' + (\value) % (\radix) - 10 + .endif +.endm + +#define HYPERCALL_PAGE_OFFSET 0x4000 .section __xen_guest .ascii "GUEST_OS=linux,GUEST_VER=2.6" .ascii ",XEN_VER=xen-3.0" - .ascii ",VIRT_BASE=0xC0000000" - .ascii ",HYPERCALL_PAGE=0x104" /* __pa(hypercall_page) >> 12 */ + .ascii ",VIRT_BASE=0x"; utoa __PAGE_OFFSET + .ascii ",HYPERCALL_PAGE=0x"; utoa (__PHYSICAL_START+HYPERCALL_PAGE_OFFSET)>>PAGE_SHIFT #ifdef CONFIG_X86_PAE .ascii ",PAE=yes" #else @@ -190,10 +212,10 @@ ENTRY(cpu_gdt_table) .org 0x3000 ENTRY(default_ldt) -.org 0x4000 +.org HYPERCALL_PAGE_OFFSET ENTRY(hypercall_page) +.skip 0x1000 -.org 0x5000 /* * Real beginning of normal "text" segment */