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/paravirt.h>
11 #include <asm/xen/privop.h>
12 #include <linux/elfnote.h>
13 #include <linux/init.h>
14 #include <xen/interface/elfnote.h>
16 .section .data..read_mostly
18 .global xen_domain_type
25 // Calculate load offset.
26 // The constant, LOAD_OFFSET, can't be used because the boot
27 // loader doesn't always load to the LMA specified by the vmlinux.lds.
28 mov r9=ip // must be the first instruction to make sure
29 // that r9 = the physical address of startup_xen.
30 // Usually r9 = startup_xen - LOAD_OFFSET
33 sub r9=r9,r8 // Usually r9 = -LOAD_OFFSET.
35 mov r10=PARAVIRT_HYPERVISOR_TYPE_XEN
39 movl r8=hypervisor_type
49 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")
50 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6")
51 ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0")
52 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, data8.ua startup_xen - LOAD_OFFSET)
54 #define isBP p3 // are we the Bootstrap Processor?
56 GLOBAL_ENTRY(xen_setup_hook)
57 mov r8=XEN_PV_DOMAIN_ASM
58 (isBP) movl r9=xen_domain_type;;
65 #define FW_HYPERCALL_SET_SHARED_INFO_VA 0x600
66 (isBP) mov r2=FW_HYPERCALL_SET_SHARED_INFO_VA
67 (isBP) movl r28=XSI_BASE;;
73 (isBP) br.call.sptk.many rp=xen_setup_pv_ops