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>
25 mov $__bss_start, %_ASM_DI
26 mov $__bss_stop, %_ASM_CX
27 sub %_ASM_DI, %_ASM_CX
28 shr $__ASM_SEL(2, 3), %_ASM_CX
31 mov %_ASM_SI, xen_start_info
32 mov $init_thread_union+THREAD_SIZE, %_ASM_SP
43 #define HYPERCALL(n) \
44 .equ xen_hypercall_##n, hypercall_page + __HYPERVISOR_##n * 32; \
45 .type xen_hypercall_##n, @function; .size xen_hypercall_##n, 32
46 #include <asm/xen-hypercalls.h>
51 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")
52 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6")
53 ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
55 ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __PAGE_OFFSET)
57 ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __START_KERNEL_map)
58 /* Map the p2m table to a 512GB-aligned user address. */
59 ELFNOTE(Xen, XEN_ELFNOTE_INIT_P2M, .quad PGDIR_SIZE)
61 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, _ASM_PTR startup_xen)
62 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page)
63 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,
64 .ascii "!writable_page_tables|pae_pgdir_above_4gb")
65 ELFNOTE(Xen, XEN_ELFNOTE_SUPPORTED_FEATURES,
66 .long (1 << XENFEAT_writable_page_tables) | (1 << XENFEAT_dom0))
67 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
68 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
69 ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
70 .quad _PAGE_PRESENT; .quad _PAGE_PRESENT)
71 ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
72 ELFNOTE(Xen, XEN_ELFNOTE_MOD_START_PFN, .long 1)
73 ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, _ASM_PTR __HYPERVISOR_VIRT_START)
74 ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, _ASM_PTR 0)
76 #endif /*CONFIG_XEN */