xref: /freebsd/sys/amd64/vmm/io/vatpit.h (revision e883c9bb40062fca0f3b25229a146d72e54939c2)
1*e883c9bbSTycho Nightingale /*-
2*e883c9bbSTycho Nightingale  * Copyright (c) 2014 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com>
3*e883c9bbSTycho Nightingale  * Copyright (c) 2011 NetApp, Inc.
4*e883c9bbSTycho Nightingale  * All rights reserved.
5*e883c9bbSTycho Nightingale  *
6*e883c9bbSTycho Nightingale  * Redistribution and use in source and binary forms, with or without
7*e883c9bbSTycho Nightingale  * modification, are permitted provided that the following conditions
8*e883c9bbSTycho Nightingale  * are met:
9*e883c9bbSTycho Nightingale  * 1. Redistributions of source code must retain the above copyright
10*e883c9bbSTycho Nightingale  *    notice, this list of conditions and the following disclaimer.
11*e883c9bbSTycho Nightingale  * 2. Redistributions in binary form must reproduce the above copyright
12*e883c9bbSTycho Nightingale  *    notice, this list of conditions and the following disclaimer in the
13*e883c9bbSTycho Nightingale  *    documentation and/or other materials provided with the distribution.
14*e883c9bbSTycho Nightingale  *
15*e883c9bbSTycho Nightingale  * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
16*e883c9bbSTycho Nightingale  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*e883c9bbSTycho Nightingale  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*e883c9bbSTycho Nightingale  * ARE DISCLAIMED.  IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
19*e883c9bbSTycho Nightingale  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*e883c9bbSTycho Nightingale  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21*e883c9bbSTycho Nightingale  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*e883c9bbSTycho Nightingale  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*e883c9bbSTycho Nightingale  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*e883c9bbSTycho Nightingale  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*e883c9bbSTycho Nightingale  * SUCH DAMAGE.
26*e883c9bbSTycho Nightingale  *
27*e883c9bbSTycho Nightingale  * $FreeBSD$
28*e883c9bbSTycho Nightingale  */
29*e883c9bbSTycho Nightingale 
30*e883c9bbSTycho Nightingale #ifndef _VATPIT_H_
31*e883c9bbSTycho Nightingale #define	_VATPIT_H_
32*e883c9bbSTycho Nightingale 
33*e883c9bbSTycho Nightingale #include <machine/timerreg.h>
34*e883c9bbSTycho Nightingale 
35*e883c9bbSTycho Nightingale struct vatpit *vatpit_init(struct vm *vm);
36*e883c9bbSTycho Nightingale void vatpit_cleanup(struct vatpit *vatpit);
37*e883c9bbSTycho Nightingale 
38*e883c9bbSTycho Nightingale int vatpit_handler(void *vm, int vcpuid, struct vm_exit *vmexit);
39*e883c9bbSTycho Nightingale 
40*e883c9bbSTycho Nightingale #endif	/* _VATPIT_H_ */
41