X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fx86_64%2Fkernel%2Fhead-xen.S;h=e847d47c8b5f5a2ac88199fd967e6064cd7bd391;hb=refs%2Fheads%2Fvserver;hp=17ef60775f593e8b56815c9eaf1a881b8484857e;hpb=1db395853d4f30d6120458bd279ede1f882a8525;p=linux-2.6.git diff --git a/arch/x86_64/kernel/head-xen.S b/arch/x86_64/kernel/head-xen.S index 17ef60775..e847d47c8 100644 --- a/arch/x86_64/kernel/head-xen.S +++ b/arch/x86_64/kernel/head-xen.S @@ -6,8 +6,6 @@ * Copyright (C) 2000 Karsten Keil * Copyright (C) 2001,2002 Andi Kleen * - * $Id: head.S,v 1.49 2002/03/19 17:39:25 ak Exp $ - * * Jun Nakajima * Modified for Xen */ @@ -16,12 +14,15 @@ #include #include #include +#include #include #include #include #include #include +#include + .text .section .bootstrap.text .code64 @@ -107,22 +108,22 @@ gdt: /* The TLS descriptors are currently at a different place compared to i386. Hopefully nobody expects them at a fixed place (Wine?) */ - + ENTRY(cpu_gdt_table) .quad 0x0000000000000000 /* NULL descriptor */ .quad 0x0 /* unused */ .quad 0x00af9a000000ffff /* __KERNEL_CS */ .quad 0x00cf92000000ffff /* __KERNEL_DS */ .quad 0x00cffa000000ffff /* __USER32_CS */ - .quad 0x00cff2000000ffff /* __USER_DS, __USER32_DS */ + .quad 0x00cff2000000ffff /* __USER_DS, __USER32_DS */ .quad 0x00affa000000ffff /* __USER_CS */ .quad 0x00cf9a000000ffff /* __KERNEL32_CS */ .quad 0,0 /* TSS */ .quad 0,0 /* LDT */ - .quad 0,0,0 /* three TLS descriptors */ - .quad 0 /* unused */ -gdt_end: - /* asm/segment.h:GDT_ENTRIES must match this */ + .quad 0,0,0 /* three TLS descriptors */ + .quad 0x0000f40000000000 /* node/CPU stored in limit */ +gdt_end: + /* asm/segment.h:GDT_ENTRIES must match this */ /* This should be a multiple of the cache line size */ /* GDTs of other CPUs are now dynamically allocated */ @@ -139,6 +140,7 @@ ENTRY(idt_table) ENTRY(empty_zero_page) .skip PAGE_SIZE +#ifdef CONFIG_XEN_COMPAT_030002 /* * __xen_guest information */ @@ -158,12 +160,8 @@ ENTRY(empty_zero_page) .ascii ",XEN_VER=xen-3.0" .ascii ",VIRT_BASE=0x" utoh __START_KERNEL_map -#ifdef CONFIG_XEN_COMPAT_030002 .ascii ",ELF_PADDR_OFFSET=0x" utoh __START_KERNEL_map -#else - .ascii ",ELF_PADDR_OFFSET=0x0" -#endif /* !CONFIG_XEN_COMPAT_030002 */ .ascii ",VIRT_ENTRY=0x" utoh (__START_KERNEL_map + __PHYSICAL_START + VIRT_ENTRY_OFFSET) .ascii ",HYPERCALL_PAGE=0x" @@ -174,3 +172,18 @@ ENTRY(empty_zero_page) .ascii "|supervisor_mode_kernel" .ascii ",LOADER=generic" .byte 0 +#endif /* CONFIG_XEN_COMPAT_030002 */ + + ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "linux") + ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, "2.6") + ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz, "xen-3.0") + ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .quad, __START_KERNEL_map) +#ifdef CONFIG_XEN_COMPAT_030002 + ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, .quad, __START_KERNEL_map) +#else + ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, .quad, 0) +#endif /* !CONFIG_XEN_COMPAT_030002 */ + ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .quad, startup_64) + ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .quad, hypercall_page) + ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel") + ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic")