hyperv_var.h revision 307310
1300834Ssephe/*- 2300834Ssephe * Copyright (c) 2016 Microsoft Corp. 3300834Ssephe * All rights reserved. 4300834Ssephe * 5300834Ssephe * Redistribution and use in source and binary forms, with or without 6300834Ssephe * modification, are permitted provided that the following conditions 7300834Ssephe * are met: 8300834Ssephe * 1. Redistributions of source code must retain the above copyright 9300834Ssephe * notice unmodified, this list of conditions, and the following 10300834Ssephe * disclaimer. 11300834Ssephe * 2. Redistributions in binary form must reproduce the above copyright 12300834Ssephe * notice, this list of conditions and the following disclaimer in the 13300834Ssephe * documentation and/or other materials provided with the distribution. 14300834Ssephe * 15300834Ssephe * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16300834Ssephe * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17300834Ssephe * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18300834Ssephe * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19300834Ssephe * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20300834Ssephe * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21300834Ssephe * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22300834Ssephe * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23300834Ssephe * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24300834Ssephe * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25300834Ssephe * 26300834Ssephe * $FreeBSD: stable/11/sys/dev/hyperv/vmbus/hyperv_var.h 307310 2016-10-14 09:10:41Z sephe $ 27300834Ssephe */ 28300834Ssephe 29300834Ssephe#ifndef _HYPERV_VAR_H_ 30300834Ssephe#define _HYPERV_VAR_H_ 31300834Ssephe 32300992Ssephe#ifndef NANOSEC 33300992Ssephe#define NANOSEC 1000000000ULL 34300992Ssephe#endif 35300992Ssephe#define HYPERV_TIMER_NS_FACTOR 100ULL 36300992Ssephe#define HYPERV_TIMER_FREQ (NANOSEC / HYPERV_TIMER_NS_FACTOR) 37300992Ssephe 38300834Ssepheextern u_int hyperv_features; 39300834Ssepheextern u_int hyperv_recommends; 40300834Ssephe 41307278Ssepheuint64_t hypercall_post_message(bus_addr_t msg_paddr); 42307310Ssepheuint64_t hypercall_signal_event(bus_addr_t monprm_paddr); 43307278Ssephe 44300834Ssephe#endif /* !_HYPERV_VAR_H_ */ 45