Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 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> |
Sam Ravnborg | 08b6d29 | 2008-01-30 13:33:25 +0100 | [diff] [blame] | 7 | #include <linux/init.h> |
Jeremy Fitzhardinge | 7077c33 | 2008-07-08 15:06:35 -0700 | [diff] [blame] | 8 | |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 9 | #include <asm/boot.h> |
Jeremy Fitzhardinge | 7077c33 | 2008-07-08 15:06:35 -0700 | [diff] [blame] | 10 | #include <asm/asm.h> |
Jeremy Fitzhardinge | 8c5e5ac | 2008-07-08 15:06:44 -0700 | [diff] [blame] | 11 | #include <asm/page.h> |
Jeremy Fitzhardinge | 7077c33 | 2008-07-08 15:06:35 -0700 | [diff] [blame] | 12 | |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 13 | #include <xen/interface/elfnote.h> |
Jeremy Fitzhardinge | 7e0edc1 | 2008-05-31 01:33:04 +0100 | [diff] [blame] | 14 | #include <asm/xen/interface.h> |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 15 | |
Sam Ravnborg | 08b6d29 | 2008-01-30 13:33:25 +0100 | [diff] [blame] | 16 | __INIT |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 17 | ENTRY(startup_xen) |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 18 | cld |
Jeremy Fitzhardinge | 8c5e5ac | 2008-07-08 15:06:44 -0700 | [diff] [blame] | 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 |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 26 | jmp xen_start_kernel |
Sam Ravnborg | 08b6d29 | 2008-01-30 13:33:25 +0100 | [diff] [blame] | 27 | |
| 28 | __FINIT |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 29 | |
Jeremy Fitzhardinge | a987b16 | 2008-06-16 15:01:56 -0700 | [diff] [blame] | 30 | .pushsection .text |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 31 | .align PAGE_SIZE_asm |
| 32 | ENTRY(hypercall_page) |
Jeremy Fitzhardinge | 7077c33 | 2008-07-08 15:06:35 -0700 | [diff] [blame] | 33 | .skip PAGE_SIZE_asm |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 34 | .popsection |
| 35 | |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 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") |
Jeremy Fitzhardinge | 8c5e5ac | 2008-07-08 15:06:44 -0700 | [diff] [blame] | 39 | #ifdef CONFIG_X86_32 |
Jeremy Fitzhardinge | 7077c33 | 2008-07-08 15:06:35 -0700 | [diff] [blame] | 40 | ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __PAGE_OFFSET) |
Jeremy Fitzhardinge | 8c5e5ac | 2008-07-08 15:06:44 -0700 | [diff] [blame] | 41 | #else |
| 42 | ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __START_KERNEL_map) |
| 43 | #endif |
Jeremy Fitzhardinge | 7077c33 | 2008-07-08 15:06:35 -0700 | [diff] [blame] | 44 | ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, _ASM_PTR startup_xen) |
| 45 | ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page) |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 46 | ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb") |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 47 | ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes") |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 48 | ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") |
Jeremy Fitzhardinge | 7e0edc1 | 2008-05-31 01:33:04 +0100 | [diff] [blame] | 49 | ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID, |
| 50 | .quad _PAGE_PRESENT; .quad _PAGE_PRESENT) |
| 51 | ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1) |
Jeremy Fitzhardinge | 7077c33 | 2008-07-08 15:06:35 -0700 | [diff] [blame] | 52 | ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, _ASM_PTR __HYPERVISOR_VIRT_START) |
Jeremy Fitzhardinge | 8c5e5ac | 2008-07-08 15:06:44 -0700 | [diff] [blame] | 53 | ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, _ASM_PTR 0) |
Jeremy Fitzhardinge | 5ead97c | 2007-07-17 18:37:04 -0700 | [diff] [blame] | 54 | |
| 55 | #endif /*CONFIG_XEN */ |