1273683Sneel/*- 2336190Saraujo * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3336190Saraujo * 4273683Sneel * Copyright (c) 2014 Neel Natu (neel@freebsd.org) 5273683Sneel * All rights reserved. 6273683Sneel * 7273683Sneel * Redistribution and use in source and binary forms, with or without 8273683Sneel * modification, are permitted provided that the following conditions 9273683Sneel * are met: 10273683Sneel * 1. Redistributions of source code must retain the above copyright 11273683Sneel * notice unmodified, this list of conditions, and the following 12273683Sneel * disclaimer. 13273683Sneel * 2. Redistributions in binary form must reproduce the above copyright 14273683Sneel * notice, this list of conditions and the following disclaimer in the 15273683Sneel * documentation and/or other materials provided with the distribution. 16273683Sneel * 17273683Sneel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18273683Sneel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19273683Sneel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20273683Sneel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21273683Sneel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22273683Sneel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23273683Sneel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24273683Sneel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25273683Sneel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26273683Sneel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27273683Sneel * 28273683Sneel * $FreeBSD: stable/11/sys/amd64/vmm/io/vpmtmr.h 336190 2018-07-11 07:19:42Z araujo $ 29273683Sneel */ 30273683Sneel 31273683Sneel#ifndef _VPMTMR_H_ 32273683Sneel#define _VPMTMR_H_ 33273683Sneel 34273683Sneel#define IO_PMTMR 0x408 35273683Sneel 36273683Sneelstruct vpmtmr; 37273683Sneel 38273683Sneelstruct vpmtmr *vpmtmr_init(struct vm *vm); 39273683Sneelvoid vpmtmr_cleanup(struct vpmtmr *pmtmr); 40273683Sneel 41273706Sneelint vpmtmr_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes, 42273683Sneel uint32_t *val); 43273683Sneel 44273683Sneel#endif 45