1258579Sneel/*-
2258579Sneel * Copyright (c) 2013 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com>
3258579Sneel * Copyright (c) 2013 Neel Natu <neel@freebsd.org>
4258579Sneel * All rights reserved.
5258579Sneel *
6258579Sneel * Redistribution and use in source and binary forms, with or without
7258579Sneel * modification, are permitted provided that the following conditions
8258579Sneel * are met:
9258579Sneel * 1. Redistributions of source code must retain the above copyright
10258579Sneel *    notice, this list of conditions and the following disclaimer.
11258579Sneel * 2. Redistributions in binary form must reproduce the above copyright
12258579Sneel *    notice, this list of conditions and the following disclaimer in the
13258579Sneel *    documentation and/or other materials provided with the distribution.
14258579Sneel *
15258579Sneel * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
16258579Sneel * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17258579Sneel * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18258579Sneel * ARE DISCLAIMED.  IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
19258579Sneel * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20258579Sneel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21258579Sneel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22258579Sneel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23258579Sneel * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24258579Sneel * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25258579Sneel * SUCH DAMAGE.
26258579Sneel *
27258579Sneel * $FreeBSD$
28258579Sneel */
29258579Sneel
30258579Sneel#ifndef _VHPET_H_
31258579Sneel#define	_VHPET_H_
32258579Sneel
33258579Sneel#define	VHPET_BASE	0xfed00000
34258579Sneel#define	VHPET_SIZE	1024
35258579Sneel
36258579Sneelstruct vhpet *vhpet_init(struct vm *vm);
37258579Sneelvoid 	vhpet_cleanup(struct vhpet *vhpet);
38258579Sneelint	vhpet_mmio_write(void *vm, int vcpuid, uint64_t gpa, uint64_t val,
39258579Sneel	    int size, void *arg);
40258579Sneelint	vhpet_mmio_read(void *vm, int vcpuid, uint64_t gpa, uint64_t *val,
41258579Sneel	    int size, void *arg);
42258579Sneelint	vhpet_getcap(struct vm_hpet_cap *cap);
43258579Sneel
44258579Sneel#endif	/* _VHPET_H_ */
45