1263744Stychon/*- 2263744Stychon * Copyright (c) 2014 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com> 3263744Stychon * Copyright (c) 2011 NetApp, Inc. 4263744Stychon * All rights reserved. 5263744Stychon * 6263744Stychon * Redistribution and use in source and binary forms, with or without 7263744Stychon * modification, are permitted provided that the following conditions 8263744Stychon * are met: 9263744Stychon * 1. Redistributions of source code must retain the above copyright 10263744Stychon * notice, this list of conditions and the following disclaimer. 11263744Stychon * 2. Redistributions in binary form must reproduce the above copyright 12263744Stychon * notice, this list of conditions and the following disclaimer in the 13263744Stychon * documentation and/or other materials provided with the distribution. 14263744Stychon * 15263744Stychon * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND 16263744Stychon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17263744Stychon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18263744Stychon * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE 19263744Stychon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20263744Stychon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21263744Stychon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22263744Stychon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23263744Stychon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24263744Stychon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25263744Stychon * SUCH DAMAGE. 26263744Stychon * 27263744Stychon * $FreeBSD: releng/10.3/sys/amd64/vmm/io/vatpit.h 276429 2014-12-30 22:22:46Z neel $ 28263744Stychon */ 29263744Stychon 30263744Stychon#ifndef _VATPIT_H_ 31263744Stychon#define _VATPIT_H_ 32263744Stychon 33263744Stychon#include <machine/timerreg.h> 34263744Stychon 35268891Sjhb#define NMISC_PORT 0x61 36268891Sjhb 37263744Stychonstruct vatpit *vatpit_init(struct vm *vm); 38263744Stychonvoid vatpit_cleanup(struct vatpit *vatpit); 39263744Stychon 40276429Sneelint vatpit_handler(struct vm *vm, int vcpuid, bool in, int port, int bytes, 41268891Sjhb uint32_t *eax); 42276429Sneelint vatpit_nmisc_handler(struct vm *vm, int vcpuid, bool in, int port, 43276429Sneel int bytes, uint32_t *eax); 44263744Stychon 45263744Stychon#endif /* _VATPIT_H_ */ 46