2 * Support routines for Xen
4 * Copyright (C) 2005 Dan Magenheimer <dan.magenheimer@hp.com>
7 #include <asm/processor.h>
8 #include <asm/asmmacro.h>
9 #include <asm/pgtable.h>
10 #include <asm/system.h>
11 #include <asm/paravirt.h>
12 #include <asm/xen/privop.h>
13 #include <linux/elfnote.h>
14 #include <linux/init.h>
15 #include <xen/interface/elfnote.h>
17 .section .data.read_mostly
19 .global xen_domain_type
26 // Calculate load offset.
27 // The constant, LOAD_OFFSET, can't be used because the boot
28 // loader doesn't always load to the LMA specified by the vmlinux.lds.
29 mov r9=ip // must be the first instruction to make sure
30 // that r9 = the physical address of startup_xen.
31 // Usually r9 = startup_xen - LOAD_OFFSET
34 sub r9=r9,r8 // Usually r9 = -LOAD_OFFSET.
36 mov r10=PARAVIRT_HYPERVISOR_TYPE_XEN
40 movl r8=hypervisor_type
50 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")
51 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6")
52 ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
53 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, data8.ua startup_xen - LOAD_OFFSET)
55 #define isBP p3 // are we the Bootstrap Processor?
57 GLOBAL_ENTRY(xen_setup_hook)
58 mov r8=XEN_PV_DOMAIN_ASM
59 (isBP) movl r9=xen_domain_type;;
66 #define FW_HYPERCALL_SET_SHARED_INFO_VA 0x600
67 (isBP) mov r2=FW_HYPERCALL_SET_SHARED_INFO_VA
68 (isBP) movl r28=XSI_BASE;;
74 (isBP) br.call.sptk.many rp=xen_setup_pv_ops