ia64/xen: introduce sync bitops which is necessary for ia64/xen support.
[linux-2.6] / arch / x86 / xen / xen-head.S
1 /* Xen-specific pieces of head.S, intended to be included in the right
2         place in head.S */
3
4 #ifdef CONFIG_XEN
5
6 #include <linux/elfnote.h>
7 #include <linux/init.h>
8
9 #include <asm/boot.h>
10 #include <asm/asm.h>
11 #include <asm/page.h>
12
13 #include <xen/interface/elfnote.h>
14 #include <asm/xen/interface.h>
15
16         __INIT
17 ENTRY(startup_xen)
18         cld
19 #ifdef CONFIG_X86_32
20         mov %esi,xen_start_info
21         mov $init_thread_union+THREAD_SIZE,%esp
22 #else
23         mov %rsi,xen_start_info
24         mov $init_thread_union+THREAD_SIZE,%rsp
25 #endif
26         jmp xen_start_kernel
27
28         __FINIT
29
30 .pushsection .text
31         .align PAGE_SIZE_asm
32 ENTRY(hypercall_page)
33         .skip PAGE_SIZE_asm
34 .popsection
35
36         ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS,       .asciz "linux")
37         ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION,  .asciz "2.6")
38         ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION,    .asciz "xen-3.0")
39 #ifdef CONFIG_X86_32
40         ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE,      _ASM_PTR __PAGE_OFFSET)
41 #else
42         ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE,      _ASM_PTR __START_KERNEL_map)
43 #endif
44         ELFNOTE(Xen, XEN_ELFNOTE_ENTRY,          _ASM_PTR startup_xen)
45         ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page)
46         ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz "!writable_page_tables|pae_pgdir_above_4gb")
47         ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE,       .asciz "yes")
48         ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz "generic")
49         ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
50                 .quad _PAGE_PRESENT; .quad _PAGE_PRESENT)
51         ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
52         ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW,   _ASM_PTR __HYPERVISOR_VIRT_START)
53         ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET,   _ASM_PTR 0)
54
55 #endif /*CONFIG_XEN */