blob: 7c0cf6320a0aa0ed55d56b5c627856dcb579d377 [file] [log] [blame]
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -07001/* 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>
Sam Ravnborg08b6d292008-01-30 13:33:25 +01007#include <linux/init.h>
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -07008#include <asm/boot.h>
9#include <xen/interface/elfnote.h>
Jeremy Fitzhardinge7e0edc12008-05-31 01:33:04 +010010#include <asm/xen/interface.h>
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070011
Sam Ravnborg08b6d292008-01-30 13:33:25 +010012 __INIT
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070013ENTRY(startup_xen)
14 movl %esi,xen_start_info
15 cld
16 movl $(init_thread_union+THREAD_SIZE),%esp
17 jmp xen_start_kernel
Sam Ravnborg08b6d292008-01-30 13:33:25 +010018
19 __FINIT
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070020
Jeremy Fitzhardingea987b162008-06-16 15:01:56 -070021.pushsection .text
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070022 .align PAGE_SIZE_asm
23ENTRY(hypercall_page)
24 .skip 0x1000
25.popsection
26
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070027 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")
28 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6")
29 ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
30 ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long __PAGE_OFFSET)
31 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long startup_xen)
32 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long hypercall_page)
33 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070034 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070035 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
Jeremy Fitzhardinge7e0edc12008-05-31 01:33:04 +010036 ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
37 .quad _PAGE_PRESENT; .quad _PAGE_PRESENT)
38 ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
39 ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, .long __HYPERVISOR_VIRT_START)
Jeremy Fitzhardinge5ead97c2007-07-17 18:37:04 -070040
41#endif /*CONFIG_XEN */