Xen Test Framework
head.S
Go to the documentation of this file.
1#include <xtf/asm_macros.h>
2
3#include <arch/page.h>
4
5#include <xen/elfnote.h>
6
7/* Guest name and version */
8ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "XTF")
9ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "0")
10
11/* PV loader */
12ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
13ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _WORD hypercall_page)
14
15/* Xen ABI information */
16ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
17ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
18ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
19
20 .section ".text.head", "ax", @progbits
21 __ASM_SEL(.code32, .code64)
22
23 /* PV entry point. */
24GLOBAL(_elf_start)
25
26 /* Stash the pv_start_info pointer from domain builder. */
27 mov %_ASM_SI, pv_start_info
28
29 /* Move onto own stack. */
30 mov $boot_stack + PAGE_SIZE, %esp
31
32 call xtf_main
33
34 /* panic() if xtf_main manages to return. */
35#ifdef __x86_64__
36 lea .Lmain_err_msg(%rip), %rdi
37#else
38 mov $.Lmain_err_msg, %eax
39#endif
40 call panic
41ENDFUNC(_elf_start)
42
43DECLSTR(.Lmain_err_msg, "xtf_main() returned\n")
44
45/*
46 * Local variables:
47 * tab-width: 8
48 * indent-tabs-mode: nil
49 * End:
50 */