xref: /dflybsd-src/sys/dev/virtual/hyperv/hyperv_machdep.h (revision 82b778547fb437620f0453271b4db5c69a9980b4)
1*82b77854SSepherosa Ziehau /*-
2*82b77854SSepherosa Ziehau  * Copyright (c) 2016 Microsoft Corp.
3*82b77854SSepherosa Ziehau  * All rights reserved.
4*82b77854SSepherosa Ziehau  *
5*82b77854SSepherosa Ziehau  * Redistribution and use in source and binary forms, with or without
6*82b77854SSepherosa Ziehau  * modification, are permitted provided that the following conditions
7*82b77854SSepherosa Ziehau  * are met:
8*82b77854SSepherosa Ziehau  * 1. Redistributions of source code must retain the above copyright
9*82b77854SSepherosa Ziehau  *    notice unmodified, this list of conditions, and the following
10*82b77854SSepherosa Ziehau  *    disclaimer.
11*82b77854SSepherosa Ziehau  * 2. Redistributions in binary form must reproduce the above copyright
12*82b77854SSepherosa Ziehau  *    notice, this list of conditions and the following disclaimer in the
13*82b77854SSepherosa Ziehau  *    documentation and/or other materials provided with the distribution.
14*82b77854SSepherosa Ziehau  *
15*82b77854SSepherosa Ziehau  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16*82b77854SSepherosa Ziehau  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17*82b77854SSepherosa Ziehau  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18*82b77854SSepherosa Ziehau  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19*82b77854SSepherosa Ziehau  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20*82b77854SSepherosa Ziehau  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21*82b77854SSepherosa Ziehau  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22*82b77854SSepherosa Ziehau  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23*82b77854SSepherosa Ziehau  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24*82b77854SSepherosa Ziehau  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*82b77854SSepherosa Ziehau  *
26*82b77854SSepherosa Ziehau  * $FreeBSD$
27*82b77854SSepherosa Ziehau  */
28*82b77854SSepherosa Ziehau 
29*82b77854SSepherosa Ziehau #ifndef _HYPERV_MACHDEP_H_
30*82b77854SSepherosa Ziehau #define _HYPERV_MACHDEP_H_
31*82b77854SSepherosa Ziehau 
32*82b77854SSepherosa Ziehau #include <sys/param.h>
33*82b77854SSepherosa Ziehau 
34*82b77854SSepherosa Ziehau uint64_t	hypercall_md(volatile void *hc_addr, uint64_t in_val,
35*82b77854SSepherosa Ziehau 		    uint64_t in_paddr, uint64_t out_paddr);
36*82b77854SSepherosa Ziehau int		hyperv_msi2vector(uint64_t msi_addr, uint32_t msi_data);
37*82b77854SSepherosa Ziehau void		hyperv_md_init(void);
38*82b77854SSepherosa Ziehau void		hyperv_md_uninit(void);
39*82b77854SSepherosa Ziehau 
40*82b77854SSepherosa Ziehau #endif	/* !_HYPERV_MACHDEP_H_ */
41