xen-head.S 1.6 KB

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