2 * Support routines for Xen hypercalls
4 * Copyright (C) 2005 Dan Magenheimer <dan.magenheimer@hp.com>
5 * Copyright (C) 2008 Yaozu (Eddie) Dong <eddie.dong@intel.com>
8 #include <asm/asmmacro.h>
9 #include <asm/intrinsics.h>
10 #include <asm/xen/privop.h>
12 #ifdef __INTEL_COMPILER
14 * Hypercalls without parameter.
16 #define __HCALL0(name,hcall) \
19 br.ret.sptk.many rp; \
23 * Hypercalls with 1 parameter.
25 #define __HCALL1(name,hcall) \
29 br.ret.sptk.many rp; \
33 * Hypercalls with 2 parameters.
35 #define __HCALL2(name,hcall) \
40 br.ret.sptk.many rp; \
43 __HCALL0(xen_get_psr, HYPERPRIVOP_GET_PSR)
44 __HCALL0(xen_get_ivr, HYPERPRIVOP_GET_IVR)
45 __HCALL0(xen_get_tpr, HYPERPRIVOP_GET_TPR)
46 __HCALL0(xen_hyper_ssm_i, HYPERPRIVOP_SSM_I)
48 __HCALL1(xen_set_tpr, HYPERPRIVOP_SET_TPR)
49 __HCALL1(xen_eoi, HYPERPRIVOP_EOI)
50 __HCALL1(xen_thash, HYPERPRIVOP_THASH)
51 __HCALL1(xen_set_itm, HYPERPRIVOP_SET_ITM)
52 __HCALL1(xen_get_rr, HYPERPRIVOP_GET_RR)
53 __HCALL1(xen_fc, HYPERPRIVOP_FC)
54 __HCALL1(xen_get_cpuid, HYPERPRIVOP_GET_CPUID)
55 __HCALL1(xen_get_pmd, HYPERPRIVOP_GET_PMD)
57 __HCALL2(xen_ptcga, HYPERPRIVOP_PTC_GA)
58 __HCALL2(xen_set_rr, HYPERPRIVOP_SET_RR)
59 __HCALL2(xen_set_kr, HYPERPRIVOP_SET_KR)
61 GLOBAL_ENTRY(xen_set_rr0_to_rr4)
67 XEN_HYPER_SET_RR0_TO_RR4
70 END(xen_set_rr0_to_rr4)
73 GLOBAL_ENTRY(xen_send_ipi)
83 GLOBAL_ENTRY(__hypercall)