1 /* Xen-specific pieces of head.S, intended to be included in the right
6 #include <linux/elfnote.h>
7 #include <linux/init.h>
11 #include <asm/page_types.h>
13 #include <xen/interface/elfnote.h>
14 #include <xen/interface/features.h>
15 #include <xen/interface/xen.h>
16 #include <xen/interface/xen-mca.h>
17 #include <asm/xen/interface.h>
26 mov $__bss_start, %_ASM_DI
27 mov $__bss_stop, %_ASM_CX
28 sub %_ASM_DI, %_ASM_CX
29 shr $__ASM_SEL(2, 3), %_ASM_CX
32 mov %_ASM_SI, xen_start_info
33 mov $init_thread_union+THREAD_SIZE, %_ASM_SP
45 #define HYPERCALL(n) \
46 .equ xen_hypercall_##n, hypercall_page + __HYPERVISOR_##n * 32; \
47 .type xen_hypercall_##n, @function; .size xen_hypercall_##n, 32
48 #include <asm/xen-hypercalls.h>
53 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")
54 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6")
55 ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
57 ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __PAGE_OFFSET)
59 ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __START_KERNEL_map)
60 /* Map the p2m table to a 512GB-aligned user address. */
61 ELFNOTE(Xen, XEN_ELFNOTE_INIT_P2M, .quad PGDIR_SIZE)
64 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, _ASM_PTR startup_xen)
66 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page)
67 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,
68 .ascii "!writable_page_tables|pae_pgdir_above_4gb")
69 ELFNOTE(Xen, XEN_ELFNOTE_SUPPORTED_FEATURES,
70 .long (1 << XENFEAT_writable_page_tables) | (1 << XENFEAT_dom0))
71 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
72 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
73 ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
74 .quad _PAGE_PRESENT; .quad _PAGE_PRESENT)
75 ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
76 ELFNOTE(Xen, XEN_ELFNOTE_MOD_START_PFN, .long 1)
77 ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, _ASM_PTR __HYPERVISOR_VIRT_START)
78 ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, _ASM_PTR 0)
80 #endif /*CONFIG_XEN */