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>
13 * Hypercalls without parameter.
15 #define __HCALL0(name,hcall) \
18 br.ret.sptk.many rp; \
22 * Hypercalls with 1 parameter.
24 #define __HCALL1(name,hcall) \
28 br.ret.sptk.many rp; \
32 * Hypercalls with 2 parameters.
34 #define __HCALL2(name,hcall) \
39 br.ret.sptk.many rp; \
42 __HCALL0(xen_get_psr, HYPERPRIVOP_GET_PSR)
43 __HCALL0(xen_get_ivr, HYPERPRIVOP_GET_IVR)
44 __HCALL0(xen_get_tpr, HYPERPRIVOP_GET_TPR)
45 __HCALL0(xen_hyper_ssm_i, HYPERPRIVOP_SSM_I)
47 __HCALL1(xen_set_tpr, HYPERPRIVOP_SET_TPR)
48 __HCALL1(xen_eoi, HYPERPRIVOP_EOI)
49 __HCALL1(xen_thash, HYPERPRIVOP_THASH)
50 __HCALL1(xen_set_itm, HYPERPRIVOP_SET_ITM)
51 __HCALL1(xen_get_rr, HYPERPRIVOP_GET_RR)
52 __HCALL1(xen_fc, HYPERPRIVOP_FC)
53 __HCALL1(xen_get_cpuid, HYPERPRIVOP_GET_CPUID)
54 __HCALL1(xen_get_pmd, HYPERPRIVOP_GET_PMD)
56 __HCALL2(xen_ptcga, HYPERPRIVOP_PTC_GA)
57 __HCALL2(xen_set_rr, HYPERPRIVOP_SET_RR)
58 __HCALL2(xen_set_kr, HYPERPRIVOP_SET_KR)
60 #ifdef CONFIG_IA32_SUPPORT
61 __HCALL0(xen_get_eflag, HYPERPRIVOP_GET_EFLAG)
62 __HCALL1(xen_set_eflag, HYPERPRIVOP_SET_EFLAG) // refer SDM vol1 3.1.8
63 #endif /* CONFIG_IA32_SUPPORT */
65 GLOBAL_ENTRY(xen_set_rr0_to_rr4)
71 XEN_HYPER_SET_RR0_TO_RR4
74 END(xen_set_rr0_to_rr4)
76 GLOBAL_ENTRY(xen_send_ipi)
86 GLOBAL_ENTRY(__hypercall)